From 019b99508af49e7fc089b2357a86c91dbef44159 Mon Sep 17 00:00:00 2001 From: laggykiller Date: Mon, 2 Oct 2023 05:34:57 +0800 Subject: [PATCH] Disable hack for console app --- compile.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compile.py b/compile.py index 65818b4..d9596bb 100755 --- a/compile.py +++ b/compile.py @@ -135,7 +135,7 @@ def nuitka(python_bin, arch): cmd_list.append(f'--macos-target-arch={arch}') # https://github.com/pyinstaller/pyinstaller/issues/5154#issuecomment-1567603461 # Or else macOS complain about not able to open - cmd_list.append(f'--disable-console') + # cmd_list.append(f'--disable-console') cmd_list.append('src/sticker-convert.py') if platform.system() == 'Darwin': @@ -164,12 +164,12 @@ def osx_patch(): os.symlink(src='__dot__dylibs', dst='.dylibs', target_is_directory=True, dir_fd=os.open('sticker-convert.app/Contents/MacOS/PIL', os.O_RDONLY)) # https://github.com/pyinstaller/pyinstaller/issues/5154#issuecomment-1567603461 - os.rename('sticker-convert.app/Contents/MacOS/sticker-convert', 'sticker-convert.app/Contents/MacOS/sticker-convert-cli') - with open('sticker-convert.app/Contents/MacOS/sticker-convert', 'w+') as f: - f.write('#!/bin/bash\n') - f.write('cd "$(dirname "$0")"\n') - f.write('open ./sticker-convert-cli') - os.chmod('sticker-convert.app/Contents/MacOS/sticker-convert', 0o744) + # os.rename('sticker-convert.app/Contents/MacOS/sticker-convert', 'sticker-convert.app/Contents/MacOS/sticker-convert-cli') + # with open('sticker-convert.app/Contents/MacOS/sticker-convert', 'w+') as f: + # f.write('#!/bin/bash\n') + # f.write('cd "$(dirname "$0")"\n') + # f.write('open ./sticker-convert-cli') + # os.chmod('sticker-convert.app/Contents/MacOS/sticker-convert', 0o744) osx_run_in_venv(f'codesign --force --deep -s - sticker-convert.app')