Skip to content

Commit

Permalink
Forgot to codesign last release, making sure that doesn't happen again
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberSahdev committed May 12, 2024
1 parent daf835f commit 0fe2c54
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ def build(signing_key=None):
compile(signing_key)

macos = platform.system() == 'Darwin'
if macos and signing_key:
if macos and signing_key:
# Codesign
os.system(
f'codesign --deep --force --verbose --sign "{signing_key}" dist/{app_name}.app --options runtime')

zip_name = zip()

if macos and signing_key:
if macos and signing_key:
keychain_profile = signing_key.split('(')[0].strip()

# Notarize
Expand Down Expand Up @@ -122,7 +122,7 @@ def compile(signing_key=None):

# Apple Notarization has a problem because this binary used in speech_recognition is signed with too old an SDK
from PyInstaller.utils.osx import set_macos_sdk_version
set_macos_sdk_version('venv/lib/python3.9/site-packages/speech_recognition/flac-mac', 10, 9, 0) # NOTE: Change the path according to where your binary is located
set_macos_sdk_version('env/lib/python3.12/site-packages/speech_recognition/flac-mac', 10, 9, 0) # NOTE: Change the path according to where your binary is located

elif platform.system() == 'Linux':
pyinstaller_options.extend([
Expand Down Expand Up @@ -171,5 +171,7 @@ def zip():
if len(sys.argv) > 1:
apple_code_signing_key = sys.argv[1] # Developer ID Application: ... (...)
print("apple_code_signing_key: ", apple_code_signing_key)
elif len(sys.argv) == 1 and platform.system() == 'Darwin':
input("Are you sure you don't wanna sign your code? ")

build(apple_code_signing_key)

0 comments on commit 0fe2c54

Please sign in to comment.