Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 2.05 KB

developing.md

File metadata and controls

56 lines (41 loc) · 2.05 KB

Basics

The project makes use of poetry and pyinstaller to manage dependencies + bundle everything needed together.

To create a release:

Which will run poetry run build which calls pyinstaller.py

poetry shell starts a poetry shell (you can switch python version swith poetry env use python3...)

Package signing for macOS

Following: https://github.com/txoof/codesign (which is also included under dev/pycodesign.py)

Also add Developer ID Application and Developer ID Installer in xcode under certificates if they aren't there already.

Finding IDs available by running security find-identity -p basic -v. There should be a few different identities, but we must store the one marked "Developer ID Application" as env var MACOS_CODESIGN_DEV_ID and the one marked "Developer ID Installer as env var MACOS_CODESIGN_INSTALL_ID. Might need to also make the keychain profile with:

xcrun notarytool store-credentials {some name, must match keychain-profile in the pycodesign.ini} --apple-id {apple id (email)} --team-id {team_id}
export MACOS_CODESIGN_DEV_ID=...
export MACOS_CODESIGN_INSTALL_ID=...
poetry run build
mkdir -p package
cp -R dist/fflipper.app package/fflipper.app
cp dev/entitlements.plist package/entitlements.plist
cp dev/pycodesign.ini package/pycodesign.ini
sed -i "" "s/{{MACOS_CODESIGN_DEV_ID}}/${MACOS_CODESIGN_DEV_ID}/g" package/pycodesign.ini
sed -i "" "s/{{MACOS_CODESIGN_INSTALL_ID}}/${MACOS_CODESIGN_INSTALL_ID}/g" package/pycodesign.ini
pushd package
../dev/pycodesign.py pycodesign.ini

Example pycodesign.ini

[identification]
application_id = {Developer ID Application from `security find-identity -p basic -v`}
installer_id = {Developer ID Installer from `security find-identity -p basic -v`}
keychain-profile = {name from store-credentials}

[package_details]
package_name = fflipper
bundle_id = com.jonkeane.pacfflipperkagename
file_list = fflipper.app
installation_path = /Applications/
entitlements = ./entitlements.plist
version = 0.1.0

Debugging

Can't find tkinter? Try installing brew install [email protected]