Skip to content

Commit

Permalink
update asciiviewer.spec for macos and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tumregels authored and tumregels committed Jan 20, 2021
1 parent 266833e commit 6120e83
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Create macos app
run: |
$CONDA/envs/asciiviewer/bin/pyinstaller --clean -y --dist ./dist/macos ./asciiviewer.spec
rm -f ./dist/macos/asciiviewer
rm -rf ./dist/macos/asciiviewer
- uses: actions/upload-artifact@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Create macos app
run: |
$CONDA/envs/asciiviewer/bin/pyinstaller --clean -y --dist ./dist/macos ./asciiviewer.spec
rm -f ./dist/macos/asciiviewer
rm -rf ./dist/macos/asciiviewer
- name: Zip binary
run: |
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ build-spec: ## build spec file for pyinstaller
--onedir --windowed --noupx \
--name asciiviewer-raw \
--path ./ \
--add-data="./asciiviewer/assets/splash.jpg:assets" \
--add-data="./asciiviewer/assets/splash.png:assets" \
--add-data="./asciiviewer/assets/default.cfg:assets" \
--add-data="./asciiviewer/examples/fmap:examples" \
--add-data="./asciiviewer/examples/MCOMPO_UOX_TBH:examples" \
--log-level DEBUG \
--debug all \
--icon "./asciiviewer/assets/icon.ico"
./asciiviewer/main.py

.PHONY: centos-up
Expand Down
26 changes: 16 additions & 10 deletions asciiviewer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import platform
block_cipher = None

datas = [
('asciiviewer/assets/splash.jpg', 'assets'),
('asciiviewer/assets/splash.png', 'assets'),
('asciiviewer/assets/default.cfg', 'assets'),
('asciiviewer/examples/fmap', 'examples'),
('asciiviewer/examples/MCOMPO_UOX_TBH', 'examples')
Expand Down Expand Up @@ -39,7 +39,8 @@ if platform.system() == 'Windows':
upx=False,
upx_exclude=[],
runtime_tmpdir=None,
console=False)
console=False,
icon='asciiviewer/assets/icon.ico')

elif platform.system() == 'Linux':

Expand Down Expand Up @@ -90,19 +91,24 @@ elif platform.system() == 'Darwin':
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
exclude_binaries=True,
name='asciiviewer',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False)
app = BUNDLE(exe,
console=False,
icon='asciiviewer/assets/icon.icns')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='asciiviewer')
app = BUNDLE(coll,
name='asciiviewer.app',
icon=None,
icon='asciiviewer/assets/icon.icns',
bundle_identifier=None)

0 comments on commit 6120e83

Please sign in to comment.