Skip to content

Commit 8973e65

Browse files
committed
Add build for macOS, dmg builder script.
1 parent c910b85 commit 8973e65

4 files changed

Lines changed: 68 additions & 0 deletions

File tree

app.spec

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
4+
block_cipher = None
5+
6+
7+
a = Analysis(['diffcast/app.py'],
8+
pathex=[],
9+
binaries=[],
10+
datas=[],
11+
hiddenimports=[],
12+
hookspath=[],
13+
hooksconfig={},
14+
runtime_hooks=[],
15+
excludes=[],
16+
win_no_prefer_redirects=False,
17+
win_private_assemblies=False,
18+
cipher=block_cipher,
19+
noarchive=False)
20+
pyz = PYZ(a.pure, a.zipped_data,
21+
cipher=block_cipher)
22+
23+
exe = EXE(pyz,
24+
a.scripts,
25+
[],
26+
exclude_binaries=True,
27+
name='app',
28+
debug=False,
29+
bootloader_ignore_signals=False,
30+
strip=False,
31+
upx=True,
32+
console=False,
33+
disable_windowed_traceback=False,
34+
target_arch=None,
35+
codesign_identity=None,
36+
entitlements_file=None )
37+
coll = COLLECT(exe,
38+
a.binaries,
39+
a.zipfiles,
40+
a.datas,
41+
strip=False,
42+
upx=True,
43+
upx_exclude=[],
44+
name='app')
45+
app = BUNDLE(coll,
46+
name='app.app',
47+
icon=None,
48+
bundle_identifier=None)

builddmg.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/sh
2+
mkdir -p dist/dmg
3+
rm -r dist/dmg/*
4+
cp -r dist/DiffCast.app dist/dmg
5+
test -f dist/DiffCast.dmg && rm dist/DiffCast.dmg
6+
create-dmg \
7+
--volname "DiffCast" \
8+
--volicon "diffcast/images/icon.icns" \
9+
--window-pos 200 120 \
10+
--window-size 800 400 \
11+
--icon-size 100 \
12+
--icon "DiffCast.app" 200 190 \
13+
--hide-extension "DiffCast.app" \
14+
--app-drop-link 600 185 \
15+
"dist/DiffCast.dmg" \
16+
"dist/dmg/"

diffcast.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ coll = COLLECT(exe,
4242
upx=True,
4343
upx_exclude=[],
4444
name='DiffCast')
45+
app = BUNDLE(coll,
46+
name='DiffCast.app',
47+
icon='diffcast/images/icon.icns',
48+
bundle_identifier=None)

diffcast/images/icon.icns

13.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)