Skip to content

Commit

Permalink
Add packaging scripts for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mak448a committed Feb 18, 2024
1 parent 323e4e1 commit da90a68
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,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
Binary file added icon.ico
Binary file not shown.
47 changes: 47 additions & 0 deletions main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['src\\main.py'],
pathex=[],
binaries=[],
datas=[
("licenses", "licenses"),
("src/smiley.svg", ".")
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='QTCord',
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,
icon=['icon.ico'],
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='QTCord',
)
File renamed without changes.
20 changes: 20 additions & 0 deletions package_windows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import shutil


try:
import PyInstaller
if PyInstaller:
print("PyInstaller is good to go!")
except ModuleNotFoundError:
raise Exception("You need pyinstaller installed. Use pip install pyinstaller.")


os.system("pyinstaller main.spec")

choice = input("Delete build cache? (N/y) ").strip().lower()

if choice == "yes" or choice == "y":
quit()
else:
shutil.rmtree("build")
3 changes: 0 additions & 3 deletions utilities/package_windows.py

This file was deleted.

0 comments on commit da90a68

Please sign in to comment.