From 7d363b9fc68e7b48702925ffcc3b734515b29006 Mon Sep 17 00:00:00 2001 From: Sam Lade Date: Sat, 2 May 2020 16:58:10 +0100 Subject: [PATCH] bundle script for macos --- bundle-macos.sh | 7 +++++++ dr-macos.spec | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 bundle-macos.sh create mode 100644 dr-macos.spec diff --git a/bundle-macos.sh b/bundle-macos.sh new file mode 100755 index 0000000..448eb5f --- /dev/null +++ b/bundle-macos.sh @@ -0,0 +1,7 @@ +#! /bin/sh +pyinstaller dr-macos.spec +codesign --remove-signature dist/dr.app/Contents/MacOS/Python +codesign --deep -s "Sentynel Code-Signing" dist/dr.app +cd dist +hdiutil create ./dr.dmg -srcfolder dr.app -ov +cd .. diff --git a/dr-macos.spec b/dr-macos.spec new file mode 100644 index 0000000..054d8ed --- /dev/null +++ b/dr-macos.spec @@ -0,0 +1,42 @@ +# -*- mode: python ; coding: utf-8 -*- +from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal, hookspath + +block_cipher = None + +args = {**get_deps_minimal(video=None, audio=None, camera=None, spelling=None)} +args["hiddenimports"].append('plyer.platforms.macosx.filechooser') +args["binaries"].append(('assets/ffmpeg', 'assets')) +a = Analysis(['dr.py'], + pathex=['/Users/orion/devel/drpy'], + datas=[], + hookspath=[], + runtime_hooks=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, + **args ) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + [], + exclude_binaries=True, + name='dr', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False ) +coll = COLLECT(exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='dr') +app = BUNDLE(coll, + name='dr.app', + icon=None, + bundle_identifier=None)