Skip to content

Commit

Permalink
migrate to spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
mastercoms committed Aug 6, 2024
1 parent 58f37a9 commit 3b7a164
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 11 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
Expand Down
45 changes: 45 additions & 0 deletions PBSync.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- mode: python ; coding: utf-8 -*-

options = [
('X utf8', None, 'OPTION'),
('hash_seed=0', None, 'OPTION'),
('OO', None, 'OPTION')
]

a = Analysis(
['pbsync\\__main__.py'],
pathex=['.'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=['hooks'],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=2,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
options,
name='PBSync',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir='Saved',
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
version='version.rc',
icon=['resources\\icon.ico'],
)
13 changes: 3 additions & 10 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
@echo off
set PYTHONOPTIMIZE=1
set PYTHONUTF8=1
set PYTHONOPTIMIZE=2
set PYTHONHASHSEED=0
set PYI_STATIC_ZLIB=1
set OBJECT_MODE=64
pyinstaller --onefile ^
--additional-hooks-dir=hooks ^
-n PBSync ^
--clean ^
--console ^
--runtime-tmpdir Saved ^
-i resources/icon.ico ^
--version-file version.rc ^
-p . pbsync/__main__.py %*
pyinstaller --clean PBSync.spec %*

0 comments on commit 3b7a164

Please sign in to comment.