Skip to content

Commit

Permalink
Add build for macOS, dmg builder script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfitzp committed Jan 26, 2022
1 parent c910b85 commit 8973e65
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
48 changes: 48 additions & 0 deletions app.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['diffcast/app.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='app',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='app')
app = BUNDLE(coll,
name='app.app',
icon=None,
bundle_identifier=None)
16 changes: 16 additions & 0 deletions builddmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
mkdir -p dist/dmg
rm -r dist/dmg/*
cp -r dist/DiffCast.app dist/dmg
test -f dist/DiffCast.dmg && rm dist/DiffCast.dmg
create-dmg \
--volname "DiffCast" \
--volicon "diffcast/images/icon.icns" \
--window-pos 200 120 \
--window-size 800 400 \
--icon-size 100 \
--icon "DiffCast.app" 200 190 \
--hide-extension "DiffCast.app" \
--app-drop-link 600 185 \
"dist/DiffCast.dmg" \
"dist/dmg/"
4 changes: 4 additions & 0 deletions diffcast.spec
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ coll = COLLECT(exe,
upx=True,
upx_exclude=[],
name='DiffCast')
app = BUNDLE(coll,
name='DiffCast.app',
icon='diffcast/images/icon.icns',
bundle_identifier=None)
Binary file added diffcast/images/icon.icns
Binary file not shown.

0 comments on commit 8973e65

Please sign in to comment.