Skip to content

Commit

Permalink
Disable hack for console app
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Oct 1, 2023
1 parent 31d3829 commit 019b995
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 019b995

Please sign in to comment.