mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 59e45efbb6 | |||
| 27f0a3f71d | |||
| 1d500305f7 |
@@ -90,9 +90,16 @@ jobs:
|
|||||||
}'
|
}'
|
||||||
$json | Out-File -Encoding utf8 build_info.json
|
$json | Out-File -Encoding utf8 build_info.json
|
||||||
|
|
||||||
|
- name: Download aria2c (Windows)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: |
|
||||||
|
mkdir -p deps
|
||||||
|
C:\msys64\usr\bin\wget.exe https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip
|
||||||
|
unzip -j aria2-1.37.0-win-64bit-build1.zip aria2-1.37.0-win-64bit-build1/aria2c.exe -d deps/
|
||||||
|
|
||||||
- name: Build executable with PyInstaller (Windows)
|
- name: Build executable with PyInstaller (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --name ${{ env.APP_NAME }} main.py
|
run: pyinstaller --onefile --windowed --add-data "build_info.json:." --add-data "deps/aria2c.exe:." --name ${{ env.APP_NAME }} main.py
|
||||||
|
|
||||||
- name: Build executable with PyInstaller (Unix)
|
- name: Build executable with PyInstaller (Unix)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ from core.interface.utils.searchhelper import return_pressed
|
|||||||
from core.interface.dialogs.settings import settings_dialog
|
from core.interface.dialogs.settings import settings_dialog
|
||||||
from core.network.aria2_integration import dlprogress
|
from core.network.aria2_integration import dlprogress
|
||||||
|
|
||||||
print(os.path.abspath(__file__))
|
|
||||||
|
|
||||||
def download_update(latest_version):
|
def download_update(latest_version):
|
||||||
old_filename = f"SoftwareManager-dev-{state.version.replace('-dev', '')}-windows.exe"
|
old_filename = f"SoftwareManager-dev-{state.version.replace('-dev', '')}-windows.exe"
|
||||||
@@ -52,11 +51,12 @@ def download_update(latest_version):
|
|||||||
with open(new_filename, "wb") as f:
|
with open(new_filename, "wb") as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
if not os.path.exists(new_filename):
|
if not os.path.exists(new_filename):
|
||||||
raise FileNotFoundError(f"Executable not found")
|
raise FileNotFoundError("Executable not found")
|
||||||
subprocess.Popen([new_filename], shell=True)
|
subprocess.Popen([new_filename], shell=True)
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@@ -77,7 +77,7 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
msg = QMessageBox()
|
msg = QMessageBox()
|
||||||
msg.setIcon(QMessageBox.Information)
|
msg.setIcon(QMessageBox.Information)
|
||||||
msg.setWindowTitle("Update Available")
|
msg.setWindowTitle("Update Available")
|
||||||
msg.setText(f"A new version is available.")
|
msg.setText("A new version is available.")
|
||||||
msg.setInformativeText("Please visit the GitHub releases page to download the latest version.")
|
msg.setInformativeText("Please visit the GitHub releases page to download the latest version.")
|
||||||
msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Ignore)
|
msg.setStandardButtons(QMessageBox.Ok | QMessageBox.Ignore)
|
||||||
|
|
||||||
@@ -105,7 +105,6 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
self.emptyResults.setAlignment(Qt.AlignCenter)
|
self.emptyResults.setAlignment(Qt.AlignCenter)
|
||||||
self.emptyResults.hide()
|
self.emptyResults.hide()
|
||||||
|
|
||||||
|
|
||||||
self.download_model = None
|
self.download_model = None
|
||||||
self.downloadList = QTableView()
|
self.downloadList = QTableView()
|
||||||
self.emptyLibrary = QLabel("No items in library.")
|
self.emptyLibrary = QLabel("No items in library.")
|
||||||
|
|||||||
Reference in New Issue
Block a user