Skip to content

Commit 89ac4ee

Browse files
authored
Merge pull request #2765 from Collinw24/macos-onedir-startup-zip-symlinks
Use onedir PyInstaller bundles for faster macOS launch
2 parents b7b0584 + 33107f7 commit 89ac4ee

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

dist_assets/mac/pyfa.spec

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,28 @@ pyz = PYZ(a.pure, a.zipped_data,
6565

6666
exe = EXE(pyz,
6767
a.scripts,
68-
a.binaries,
69-
a.zipfiles,
70-
a.datas,
68+
exclude_binaries=True,
7169
name='pyfa',
7270
debug=False,
7371
strip=False,
7472
upx=True,
75-
runtime_tmpdir=None,
7673
console=False ,
7774
icon=icon,
75+
contents_directory='app',
7876
)
7977

80-
app = BUNDLE(
78+
coll = COLLECT(
8179
exe,
80+
a.binaries,
81+
a.zipfiles,
82+
a.datas,
83+
strip=False,
84+
upx=True,
85+
name='pyfa',
86+
)
87+
88+
app = BUNDLE(
89+
coll,
8290
name='pyfa.app',
8391
version=os.getenv('PYFA_VERSION'),
8492
icon=icon,

pyfa.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if platform.system() == 'Darwin':
116116
'CFBundleVersion': '1.2.3',
117117
'CFBundleShortVersionString': '1.2.3',
118118
}
119-
app = BUNDLE(exe,
119+
app = BUNDLE(coll,
120120
name='pyfa.app',
121121
icon=icon,
122122
bundle_identifier=None,

scripts/osx-package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ echo "Building distributive..."
77
python3 -m PyInstaller -y --clean dist_assets/mac/pyfa.spec
88
echo "Compressing distributive..."
99
cd dist
10-
zip -r "pyfa-$PYFA_VERSION-mac.zip" pyfa.app
10+
zip -yr "pyfa-$PYFA_VERSION-mac.zip" pyfa.app
1111
md5 -r "pyfa-$PYFA_VERSION-mac.zip"

0 commit comments

Comments
 (0)