Skip to content

Commit

Permalink
Merge pull request #21 from daniilS/Pyinstaller
Browse files Browse the repository at this point in the history
Pyinstaller
  • Loading branch information
daniilS authored Sep 3, 2024
2 parents cf21277 + d10c388 commit ccab14e
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ dist/

.vscode/

*.DS_Store

cx_freeze/build/
cx_freeze/dist/
cx_freeze/venv/
cx_freeze/settings.py

pyinstaller/build/
pyinstaller/dist/
pyinstaller/venv/
1 change: 1 addition & 0 deletions cx_freeze/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
mac_options = {
"bundle_name": "Musketeer",
"iconfile": "logo 512px.icns",
"codesign_identity": "-",
"plist_items": [
("CFBundleIdentifier", "daniilS.musketeer"),
("CFBundleVersion", musketeer.__version__),
Expand Down
63 changes: 63 additions & 0 deletions pyinstaller/Musketeer.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# -*- mode: python ; coding: utf-8 -*-
import platform

from PyInstaller.utils.hooks import collect_all

import musketeer

datas = []
binaries = []
hiddenimports = ['musketeer']
tmp_ret = collect_all('musketeer')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]


a = Analysis(
['musketeer_loader.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='Musketeer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=platform.machine(),
codesign_identity=None,
entitlements_file=None,
icon=['logo 512px.icns'],
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='Musketeer',
)
app = BUNDLE(
coll,
name='Musketeer.app',
icon='logo 512px.icns',
bundle_identifier='daniilS.musketeer',
version=musketeer.__version__,
)
4 changes: 4 additions & 0 deletions pyinstaller/build_dmg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

pyinstaller --noconfirm Musketeer.spec
dmgbuild -s dmgbuild_settings.py Musketeer dist/Musketeer-0.0.0-macOS.dmg
30 changes: 30 additions & 0 deletions pyinstaller/dmgbuild_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import musketeer

filename = f"dist/Musketeer-{musketeer.__version__}-macOS.dmg"
volume_name = "Musketeer"
format = "UDZO"
filesystem = "HFS+"
size = None
files = ["dist/Musketeer.app"]
symlinks = {"Applications": "/Applications"}
badge_icon = "logo 512px.icns"
background = None
show_status_bar = False
show_tab_view = False
show_pathbar = False
show_sidebar = False
sidebar_width = None
show_icon_preview = False
include_icon_view_settings = "auto"
include_list_view_settings = "auto"
arrange_by = None
grid_offset = (0, 0)
grid_spacing = 100
scroll_position = (0, 0)
label_pos = "bottom"
text_size = 16
icon_size = 128
list_sort_by = None
list_use_relative_dates = None
list_calculate_all_sizes = None
license = None
Binary file added pyinstaller/logo 48px.ico
Binary file not shown.
Binary file added pyinstaller/logo 512px.icns
Binary file not shown.
1 change: 1 addition & 0 deletions pyinstaller/musketeer_loader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from musketeer import __main__ # noqa: F401

0 comments on commit ccab14e

Please sign in to comment.