creating building files for packaging the app into an executable file

This commit is contained in:
Bernd 2025-07-25 22:11:59 +05:00
parent 8403e7b7c5
commit 1741024090
11 changed files with 64 additions and 0 deletions

3
.gitignore vendored
View File

@ -7,3 +7,6 @@ todo.txt
anime_backlog.db.bk
*.db-wal
*.db-shm
dist/
build/
anime_env/

55
build.spec Normal file
View File

@ -0,0 +1,55 @@
# -*- mode: python -*-
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
block_cipher = None
a = Analysis(
['frontend.py'],
pathex=[],
binaries=[],
datas=[
('icons', 'icons'),
('anime_backlog.db', '.')
],
hiddenimports=[
'backend',
'sqlite3',
*collect_submodules('PyQt5')
],
hookspath=['.'],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='AnimeTracker',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_tracker=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon='icons/anime-app-icon.png'
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='AnimeTracker',
)

View File

@ -152,6 +152,11 @@ class AnimeTracker(QMainWindow):
self.settings = QSettings("xAI", "AnimeBacklogTracker")
self.last_used_season = self.settings.value("lastUsedSeason", "winter")
self.setWindowTitle("Anime Backlog Tracker")
# Add application icon
icon_path = os.path.join(os.path.dirname(__file__), './icons/anime-app-icon.png')
print("icon_path = " + icon_path)
if os.path.exists(icon_path):
self.setWindowIcon(QIcon(icon_path))
self.resize(800, 600)
self.backend = AnimeBackend()
self.tab_widget = QTabWidget()

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

BIN
icons/anime-app-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
icons/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
icons/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

BIN
icons/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
icons/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
PyQt5==5.15.10