Skip to content

Commit

Permalink
add mac os app and dmg support
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Apr 10, 2024
1 parent 2b98f44 commit 3ee15fe
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ddt4all_data/mac-os/builddmg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
pyinstaller --noconfirm main.spec
# Create a folder (named dmg) to prepare our DMG in (if it doesn't already exist).
mkdir -p dist/dmg
# Empty the dmg folder.
rm -r dist/dmg/*
# Copy the app bundle to the dmg folder.
cp -r "dist/DDT4ALL.app" dist/dmg
# If the DMG already exists, delete it.
test -f "dist/DDT4ALL.dmg" && rm "dist/DDT4ALL.dmg"
create-dmg \
--volname "DDT4ALL" \
--volicon "../icons/obd.icns" \
--window-pos 200 120 \
--window-size 600 300 \
--icon-size 100 \
--icon "DDT4ALL.app" 175 120 \
--hide-extension "DDT4ALL.app" \
--app-drop-link 425 120 \
"dist/DDT4ALL.dmg" \
"dist/dmg/"
59 changes: 59 additions & 0 deletions ddt4all_data/mac-os/main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['../../main.py'],
pathex=[],
binaries=[],
datas=[
('../../ddt4all_data/icons', 'ddt4all_data/icons'),
('../../ddt4all_data/locale', 'ddt4all_data/locale'),
('../../ddt4all_data/*.json', 'ddt4all_data'),
('../../ddt4all_data/*.qss', 'ddt4all_data'),
('../../ddtplugins/*.py', 'ddtplugins'),
('../../dataeditor.py', '.'),
('../../displaymod.py', '.'),
('../../*.py', '.'),
##('../../ecu.zip', '.')
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='DDT4ALL',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='DDT4ALL',
)
app = BUNDLE(
coll,
name='DDT4ALL.app',
icon='../icons/obd.icns',
bundle_identifier='com.github.cedric.ddt4all',
)

0 comments on commit 3ee15fe

Please sign in to comment.