mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 01:49:42 +02:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 356f3bf070 | |||
| 6ff29e2ea6 | |||
| 847b50ab10 | |||
| 5bc81b5215 | |||
| efe83613d0 | |||
| 3597cba207 | |||
| 749051aa4f |
@@ -67,7 +67,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install pyinstaller
|
pip install pyinstaller backports.tarfile
|
||||||
|
|
||||||
- name: Generate version
|
- name: Generate version
|
||||||
id: version
|
id: version
|
||||||
@@ -105,6 +105,11 @@ jobs:
|
|||||||
--add-data "build_info.json;." \
|
--add-data "build_info.json;." \
|
||||||
--add-data "deps/aria2c.exe;." \
|
--add-data "deps/aria2c.exe;." \
|
||||||
--add-data "core/interface/assets;core/interface/assets" \
|
--add-data "core/interface/assets;core/interface/assets" \
|
||||||
|
--hidden-import=backports.tarfile \
|
||||||
|
--hidden-import=backports \
|
||||||
|
--hidden-import=jaraco.context \
|
||||||
|
--hidden-import=jaraco.text \
|
||||||
|
--hidden-import=jaraco.functools \
|
||||||
--name ${{ env.APP_NAME }} \
|
--name ${{ env.APP_NAME }} \
|
||||||
main.py
|
main.py
|
||||||
|
|
||||||
@@ -115,6 +120,11 @@ jobs:
|
|||||||
pyinstaller --onefile --windowed \
|
pyinstaller --onefile --windowed \
|
||||||
--add-data "build_info.json:." \
|
--add-data "build_info.json:." \
|
||||||
--add-data "core/interface/assets:core/interface/assets" \
|
--add-data "core/interface/assets:core/interface/assets" \
|
||||||
|
--hidden-import=backports.tarfile \
|
||||||
|
--hidden-import=backports \
|
||||||
|
--hidden-import=jaraco.context \
|
||||||
|
--hidden-import=jaraco.text \
|
||||||
|
--hidden-import=jaraco.functools \
|
||||||
--name ${{ env.APP_NAME }} \
|
--name ${{ env.APP_NAME }} \
|
||||||
main.py
|
main.py
|
||||||
|
|
||||||
@@ -158,11 +168,30 @@ jobs:
|
|||||||
chmod +x release/SoftwareManager-dev-*-linux release/SoftwareManager-dev-*-macos
|
chmod +x release/SoftwareManager-dev-*-linux release/SoftwareManager-dev-*-macos
|
||||||
ls -la release/
|
ls -la release/
|
||||||
|
|
||||||
|
- name: Generate release notes
|
||||||
|
run: |
|
||||||
|
SHORT_SHA="${{ needs.build.outputs.short_sha }}"
|
||||||
|
cat > release_notes.md << EOF
|
||||||
|
## Development Build
|
||||||
|
|
||||||
|
**Commit:** [\`${SHORT_SHA}\`](https://github.com/${{ github.repository }}/commit/${{ github.sha }})
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
$(git log -1 --pretty=format:"- %s" ${{ github.sha }})
|
||||||
|
|
||||||
|
### Downloads
|
||||||
|
- Linux: \`SoftwareManager-dev-${SHORT_SHA}-linux\`
|
||||||
|
- Windows: \`SoftwareManager-dev-${SHORT_SHA}-windows.exe\`
|
||||||
|
- macOS: \`SoftwareManager-dev-${SHORT_SHA}-macos\`
|
||||||
|
EOF
|
||||||
|
cat release_notes.md
|
||||||
|
|
||||||
- name: Create Release (Public)
|
- name: Create Release (Public)
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ needs.build.outputs.version }}
|
tag_name: ${{ needs.build.outputs.version }}
|
||||||
name: ${{ needs.build.outputs.version }}
|
name: ${{ needs.build.outputs.version }}
|
||||||
|
body_path: release_notes.md
|
||||||
files: |
|
files: |
|
||||||
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-linux
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-linux
|
||||||
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows.exe
|
release/SoftwareManager-dev-${{ needs.build.outputs.short_sha }}-windows.exe
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
+24
-14
@@ -1,5 +1,4 @@
|
|||||||
from PySide6 import QtWidgets
|
from PySide6 import QtWidgets
|
||||||
from PySide6 import QtCore
|
|
||||||
from PySide6.QtCore import Qt, QTimer, QModelIndex, QAbstractTableModel, Signal
|
from PySide6.QtCore import Qt, QTimer, QModelIndex, QAbstractTableModel, Signal
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QLineEdit,
|
QLineEdit,
|
||||||
@@ -16,7 +15,7 @@ from PySide6.QtWidgets import (
|
|||||||
QHeaderView,
|
QHeaderView,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QTableWidget,
|
QTableWidget,
|
||||||
QTextEdit
|
QTextEdit,
|
||||||
)
|
)
|
||||||
|
|
||||||
from PySide6.QtGui import QIcon, QAction, QCloseEvent, QImage, QPixmap
|
from PySide6.QtGui import QIcon, QAction, QCloseEvent, QImage, QPixmap
|
||||||
@@ -45,7 +44,7 @@ def download_update(latest_version):
|
|||||||
new_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
new_filename = f"SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||||
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
url = f"https://github.com/KeksPirates/SoftwareManager/releases/latest/download/SoftwareManager-dev-{latest_version.replace('-dev', '')}-windows.exe"
|
||||||
|
|
||||||
consoleLog("Downloading update...")
|
consoleLog("Downloading update...", True)
|
||||||
response = r.get(url, allow_redirects=True)
|
response = r.get(url, allow_redirects=True)
|
||||||
with open(new_filename, "wb") as f:
|
with open(new_filename, "wb") as f:
|
||||||
f.write(response.content)
|
f.write(response.content)
|
||||||
@@ -71,6 +70,15 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
MainWindow._instance = self
|
MainWindow._instance = self
|
||||||
self.log_signal.connect(self._on_log_signal)
|
self.log_signal.connect(self._on_log_signal)
|
||||||
|
self.setWindowIcon(QIcon(os.path.join('core/interface/assets/logo.png')))
|
||||||
|
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
try:
|
||||||
|
import ctypes
|
||||||
|
myappid = 'SoftwareManager.App.1'
|
||||||
|
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
|
||||||
|
except Exception as e:
|
||||||
|
consoleLog(f"Could not set app ID: {e}")
|
||||||
|
|
||||||
build_info_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "build_info.json")
|
build_info_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "build_info.json")
|
||||||
if os.path.exists(build_info_path):
|
if os.path.exists(build_info_path):
|
||||||
@@ -210,18 +218,20 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
self.tab2 = create_tab("Library", self.emptyLibrary, self.libraryList, self.tabs, None, None)
|
self.tab2 = create_tab("Library", self.emptyLibrary, self.libraryList, self.tabs, None, None)
|
||||||
self.tab3 = create_tab("Downloads", self.emptyDownload, self.downloadList, self.tabs, None, None)
|
self.tab3 = create_tab("Downloads", self.emptyDownload, self.downloadList, self.tabs, None, None)
|
||||||
|
|
||||||
self.image = QImage(state.image_path)
|
if state.image_path is not None and os.path.exists(state.image_path):
|
||||||
self.pixmap = QPixmap.fromImage(self.image)
|
self.image = QImage(state.image_path)
|
||||||
self.overlay_label = QLabel(self)
|
self.pixmap = QPixmap.fromImage(self.image)
|
||||||
self.overlay_label.setPixmap(self.pixmap)
|
self.overlay_label = QLabel(self)
|
||||||
self.overlay_label.adjustSize()
|
self.overlay_label.setPixmap(self.pixmap)
|
||||||
self.overlay_label.raise_()
|
self.overlay_label.adjustSize()
|
||||||
|
self.overlay_label.raise_()
|
||||||
|
|
||||||
|
offset_x = -1350
|
||||||
|
offset_y = -550
|
||||||
|
x = self.width() - self.overlay_label.width() - offset_x
|
||||||
|
y = self.height() - self.overlay_label.height() - offset_y
|
||||||
|
self.overlay_label.move(x, y)
|
||||||
|
|
||||||
offset_x = -1350
|
|
||||||
offset_y = -550
|
|
||||||
x = self.width() - self.overlay_label.width() - offset_x
|
|
||||||
y = self.height() - self.overlay_label.height() - offset_y
|
|
||||||
self.overlay_label.move(x, y)
|
|
||||||
|
|
||||||
# temporarily disabled
|
# temporarily disabled
|
||||||
# state.image_changed.connect(self.update_image_overlay)
|
# state.image_changed.connect(self.update_image_overlay)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import aria2p
|
|||||||
import subprocess
|
import subprocess
|
||||||
from core.utils.data.state import state
|
from core.utils.data.state import state
|
||||||
from core.utils.general.logs import update_download_completed_by_hash
|
from core.utils.general.logs import update_download_completed_by_hash
|
||||||
|
from core.utils.general.logs import consoleLog
|
||||||
from plyer import notification
|
from plyer import notification
|
||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ def set_main_window(window):
|
|||||||
global _main_window
|
global _main_window
|
||||||
_main_window = window
|
_main_window = window
|
||||||
|
|
||||||
def consoleLog(text):
|
def consoleLog(text, printAnyways = False):
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
current_time = now.strftime("%H:%M:%S")
|
current_time = now.strftime("%H:%M:%S")
|
||||||
|
|
||||||
@@ -175,5 +175,5 @@ def consoleLog(text):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if state.debug:
|
if state.debug or printAnyways:
|
||||||
print(f"[{current_time}] {text}")
|
print(f"[{current_time}] {text}")
|
||||||
@@ -52,8 +52,11 @@ if __name__ == "__main__":
|
|||||||
state.aria2process = run_aria2server()
|
state.aria2process = run_aria2server()
|
||||||
signal.signal(signal.SIGINT, keyboardinterrupthandler)
|
signal.signal(signal.SIGINT, keyboardinterrupthandler)
|
||||||
run_thread(threading.Thread(target=send_notification, args=(shutdown_event,), daemon=True))
|
run_thread(threading.Thread(target=send_notification, args=(shutdown_event,), daemon=True))
|
||||||
|
consoleLog("Started send_notification thread")
|
||||||
run_thread(threading.Thread(target=update_log, args=(shutdown_event,), daemon=True))
|
run_thread(threading.Thread(target=update_log, args=(shutdown_event,), daemon=True))
|
||||||
|
consoleLog("Started update_log thread")
|
||||||
run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume)))
|
run_thread(threading.Thread(target=check_completed, args=(downloads, state.autoresume)))
|
||||||
|
consoleLog("Started check_completed thread")
|
||||||
consoleLog("Launching GUI")
|
consoleLog("Launching GUI")
|
||||||
run_gui()
|
run_gui()
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
requests==2.32.2
|
requests==2.32.2
|
||||||
PySide6==6.9.2
|
PySide6==6.10.1
|
||||||
beautifulsoup4==4.13.5
|
beautifulsoup4==4.13.5
|
||||||
darkdetect==0.8.0
|
darkdetect==0.8.0
|
||||||
aria2p==0.12.1
|
aria2p==0.12.1
|
||||||
|
|||||||
Reference in New Issue
Block a user