Skip to content

Commit 89cceef

Browse files
committed
Rename utils.resource_path() to utils.path()
1 parent 23124c8 commit 89cceef

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Python/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def convert():
5050
zips_py.create_zips(input_folder_path, output_folder_path)
5151

5252
if cfg.sg.user_settings_get_entry("play_finish_sound"):
53-
playsound(utils.resource_path("Media/finish.wav"), block=(platform.system() == "Linux"))
53+
playsound(utils.path("Media/finish.wav"), block=(platform.system() == "Linux"))
5454

5555
elapsed = math.floor(time.time() - time_start)
5656
print(f"Finished in {elapsed} {pluralize('second', elapsed)}.")

Python/gui/gui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def init_window():
3737
window = sg.Window(
3838
f"Legacy Mod Converter {cfg.CONVERTER_VERSION} for CCCP {cfg.GAME_VERSION}",
3939
gui_layout.get_layout(),
40-
icon=utils.resource_path("Media/legacy-mod-converter.ico"),
40+
icon=utils.path("Media/legacy-mod-converter.ico"),
4141
font=("Helvetica", 16)
4242
)
4343
cfg.progress_bar = window["PROGRESS_BAR"]

Python/gui/gui_layout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ def get_info_column():
130130
layout=[
131131
[
132132
sg.Image(
133-
utils.resource_path("Media/github-icon.png"),
133+
utils.path("Media/github-icon.png"),
134134
enable_events=True,
135135
key="GITHUB",
136136
tooltip=" Visit this program's GitHub page ",
137137
size=(56, 47)
138138
),
139139
sg.Image(
140-
utils.resource_path("Media/discord-icon.png"),
140+
utils.path("Media/discord-icon.png"),
141141
enable_events=True,
142142
key="DISCORD",
143143
tooltip=" Visit the CCCP Discord server for help ",

Python/stylua.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def run(input_folder_path, output_folder_path):
1919
output_path = utils.get_output_path_from_input_path(input_folder_path, output_folder_path, input_path)
2020

2121
if os.name == "nt": # If the OS is Windows
22-
stylua_path = utils.resource_path("Lib/stylua/Windows/stylua.exe")
22+
stylua_path = utils.path("Lib/stylua/Windows/stylua.exe")
2323
elif os.name == "posix": # If the OS is Linux
24-
stylua_path = utils.resource_path("Lib/stylua/Linux/stylua")
24+
stylua_path = utils.path("Lib/stylua/Linux/stylua")
2525

2626
result = subprocess.run([stylua_path, output_path], capture_output=True, text=True)
2727

Python/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def run():
1414

1515

1616
def get_test_path_from_filename(filename):
17-
return Path(utils.resource_path(f"Python/ini_converting/ini_test_files/{filename}.ini"))
17+
return Path(utils.path(f"Python/ini_converting/ini_test_files/{filename}.ini"))
1818

1919

2020
def read_test(filepath):

Python/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pathlib import Path
44

55

6-
def resource_path(relative_path):
6+
def path(relative_path):
77
"""
88
sys._MEIPASS is a temporary folder for PyInstaller
99
See https://stackoverflow.com/a/13790741/13279557 for more information

0 commit comments

Comments
 (0)