make icon cross-platform
Marco Andronaco andronacomarco@gmail.com
Wed, 06 Jul 2022 19:09:03 +0200
3 files changed,
5 insertions(+),
5 deletions(-)
M
Constants.py
→
Constants.py
@@ -24,9 +24,6 @@
SUCCESS_TITLE = "Finito!" SUCCESS_CONTENT = f"La ROM {FINAL_ROM_NAME} รจ stata creata con successo!" -PATH_TOOLS = os.path.join('.', 'tools') -PATH_ALT = os.path.join(PATH_TOOLS, 'alt') - PRESETS = { "Scelte consigliate": { # default preset 'font': 'font_og',@@ -110,6 +107,10 @@
DEF_PRESET = next(iter(PRESETS.items())) DEF_PATCHES = DEF_PRESET[1].keys() - DEF_FILENAMES.keys() +PATH_TOOLS = os.path.join('.', 'tools') +PATH_ALT = os.path.join(PATH_TOOLS, 'alt') +PATH_ICON = os.path.join(PATH_TOOLS, 'icon.png') + OS_SUFFIX = ( '.exe' if platform.startswith('win32') else '_mac' if platform.startswith('darwin')@@ -121,5 +122,4 @@ 'xkas': os.path.join('.', 'xkas' + OS_SUFFIX),
'insert': os.path.join('.', 'insert' + OS_SUFFIX), 'introconv': os.path.join('.', 'introconv' + OS_SUFFIX) } - OS_SHELL = True if os.name == 'nt' else False
M
patcher.py
→
patcher.py
@@ -91,7 +91,7 @@ return
root = tkinter.Tk() root.title(Constants.VAR_WINDOW_TITLE) - root.iconbitmap(os.path.join(Constants.PATH_TOOLS, 'icon.ico')) + root.iconphoto(False, tkinter.PhotoImage(file=Constants.PATH_ICON)) root.resizable(False, False) app = PatcherApp(root) app.run()