File tree Expand file tree Collapse file tree 13 files changed +271
-5
lines changed
Expand file tree Collapse file tree 13 files changed +271
-5
lines changed Original file line number Diff line number Diff line change 1+ # To get started with Dependabot version updates, you'll need to specify which
2+ # package ecosystems to update and where the package manifests are located.
3+ # Please see the documentation for all configuration options:
4+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+ version : 2
7+ updates :
8+ - package-ecosystem : " pip" # See documentation for possible values
9+ directory : " /" # Location of package manifests
10+ schedule :
11+ interval : " weekly"
Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ push :
5+ branches :
6+ - " **"
7+ pull_request :
8+
9+ jobs :
10+ pyinstaller-build-windows :
11+ name : Build Windows x64 executable
12+ runs-on : windows-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - name : Set up Python 3.x
16+ uses : actions/setup-python@v5
17+ with :
18+ python-version : " >=3.7 <3.13"
19+ cache : ' pip'
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
24+ - name : Build with pyinstaller
25+ run : |
26+ pyinstaller -F -n XboxBackupManager-win64 -i icon.ico main.py --add-data "database/xbox360.json;database" --add-data "database/MobCatsOGXboxTitleIDs.db;database" --noconsole
27+ - name : Upload artifact
28+ uses : actions/upload-artifact@v4
29+ with :
30+ name : XboxBackupManager-win64
31+ path : dist/XboxBackupManager-win64.exe
32+
33+ permissions :
34+ contents : write
Original file line number Diff line number Diff line change 1+ name : Build & Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*" # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+ jobs :
9+ build_and_release :
10+ name : Build packages and release
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ include :
15+ - os : windows-latest
16+ TARGET : windows
17+ CMD_BUILD_MAIN : pyinstaller -F -n XboxBackupManager-win64 -i icon.ico main.py --add-data "database/xbox360.json;database" --add-data "database/MobCatsOGXboxTitleIDs.db;database" --noconsole
18+ CMD_BUILD_UPDATER : pyinstaller -F -n updater -i icon.ico updater.py
19+ OUT_FILE_NAME_MAIN : XboxBackupManager-win64.exe
20+ OUT_FILE_NAME_UPDATER : updater.exe
21+ steps :
22+ - uses : actions/checkout@v4
23+ - name : Set up Python 3.x
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : " >=3.7 <3.13"
27+ cache : ' pip'
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install -r requirements.txt
32+ - name : Build main executable with pyinstaller for ${{matrix.TARGET}}
33+ run : ${{matrix.CMD_BUILD_MAIN}}
34+ - name : Build updater executable with pyinstaller for ${{matrix.TARGET}}
35+ run : ${{matrix.CMD_BUILD_UPDATER}}
36+ - name : Create Release
37+ uses : softprops/action-gh-release@v2
38+ with :
39+ draft : true
40+ generate_release_notes : true
41+ prerelease : false
42+ files : |
43+ dist/${{matrix.OUT_FILE_NAME_MAIN}}
44+ dist/${{matrix.OUT_FILE_NAME_UPDATER}}
45+
46+ permissions :
47+ contents : write
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches :
6+ - " **"
7+ pull_request :
8+
9+ jobs :
10+ lint :
11+ name : Lint
12+ runs-on : windows-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - name : Set up Python 3.x
16+ uses : actions/setup-python@v5
17+ with :
18+ python-version : " >=3.7 <3.13"
19+ cache : ' pip'
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install -r requirements.txt
24+ - name : Run black
25+ run : black . --check
Original file line number Diff line number Diff line change 11cache /
22__pycache__ /
3- XboxBackupManager.ini
3+ XboxBackupManager.ini
4+ build /
5+ dist /
6+ * .spec
Original file line number Diff line number Diff line change 1+ import os
2+ import sys
3+
14APP_NAME = "Xbox and Xbox 360 Backup Manager"
25VERSION = "0.0.0"
6+ REPO = "SavageCore/XboxBackupManager"
7+ APP_PATH = os .path .dirname (os .path .abspath (sys .executable ))
Original file line number Diff line number Diff line change 11import json
2- import os
32from typing import Dict
43
54from PyQt6 .QtCore import QObject , pyqtSignal
65
6+ from utils .resource_path import ResourcePath
7+
78
89class TitleDatabaseLoader (QObject ):
910 """Handles loading and managing the Xbox title database"""
@@ -15,8 +16,9 @@ def __init__(self):
1516 super ().__init__ ()
1617 self .title_database : Dict [str , str ] = {}
1718
18- def load_database (self , file_path : str = "database" + os . sep + "xbox360.json" ):
19+ def load_database (self ):
1920 """Load the Xbox title database from file"""
21+ file_path = ResourcePath .get_resource_path ("database/xbox360.json" )
2022 try :
2123 with open (file_path , "r" , encoding = "utf-8" ) as f :
2224 database_list = json .load (f )
Original file line number Diff line number Diff line change 1212
1313from PyQt6 .QtCore import QObject , pyqtSignal
1414
15+ from utils .resource_path import ResourcePath
16+
1517
1618class XboxTitleDatabaseLoader (QObject ):
1719 """Loads and manages Xbox title database from SQLite"""
@@ -21,7 +23,9 @@ class XboxTitleDatabaseLoader(QObject):
2123
2224 def __init__ (self ):
2325 super ().__init__ ()
24- self .database_path = "database" + os .sep + "MobCatsOGXboxTitleIDs.db"
26+ self .database_path = ResourcePath .get_resource_path (
27+ "database/MobCatsOGXboxTitleIDs.db"
28+ )
2529 self .title_database : Dict [str , Dict [str , str ]] = {}
2630 self .md5_cache : Dict [str , str ] = {} # Cache MD5s to avoid recalculating
2731
Original file line number Diff line number Diff line change 55
66from constants import APP_NAME , VERSION
77from ui .main_window import XboxBackupManager # type: ignore
8+ from utils .github import auto_update # type: ignore
89
910
1011def main ():
1112 """Main application entry point"""
13+ # Check for updates
14+ auto_update ()
15+
16+ # Initialize the application
1217 app = QApplication (sys .argv )
1318 app .setApplicationName (APP_NAME )
1419 app .setApplicationVersion (VERSION )
Original file line number Diff line number Diff line change 11black == 25.1.0
22darkdetect == 0.8.0
3+ psutil == 7.0.0
4+ pyinstaller == 6.15.0
35PyQt6 == 6.9.1
46qdarkstyle == 3.2.3
57QtAwesome == 1.4.0
6- requests == 2.32.5
8+ requests == 2.32.5
9+ semver == 3.0.4
You can’t perform that action at this time.
0 commit comments