all repos — m12-patcher @ bdc5a2e0ea16893a72389ca8757b9dcf51630f99

make icon cross-platform
Marco Andronaco andronacomarco@gmail.com
Wed, 06 Jul 2022 19:09:03 +0200
commit

bdc5a2e0ea16893a72389ca8757b9dcf51630f99

parent

b9ba83b93f227a992b3d7027bfe8fb602e85561c

3 files changed, 5 insertions(+), 5 deletions(-)

jump to
M Constants.pyConstants.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.pypatcher.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()