forked from Boria138/PortProtonQt
Compare commits
1 Commits
download-t
...
69360f7e7e
Author | SHA1 | Date | |
---|---|---|---|
69360f7e7e |
@@ -14,6 +14,43 @@ env:
|
|||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-appimage:
|
||||||
|
name: Build AppImage
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install required dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools python3-build python3-venv squashfs-tools strace util-linux zsync git zstd adwaita-icon-theme
|
||||||
|
|
||||||
|
- name: Upgrade pip toolchain
|
||||||
|
run: |
|
||||||
|
python3 -m pip install --upgrade \
|
||||||
|
pip setuptools setuptools-scm wheel packaging build
|
||||||
|
|
||||||
|
- name: Install appimage-builder
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/Boria138/appimage-builder
|
||||||
|
cd appimage-builder
|
||||||
|
pip install .
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: |
|
||||||
|
pip install uv
|
||||||
|
|
||||||
|
- name: Build AppImage
|
||||||
|
run: |
|
||||||
|
cd build-aux
|
||||||
|
appimage-builder
|
||||||
|
|
||||||
|
- name: Upload AppImage
|
||||||
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: PortProtonQt-AppImage
|
||||||
|
path: build-aux/PortProtonQt*.AppImage*
|
||||||
|
|
||||||
build-arch:
|
build-arch:
|
||||||
name: Build Arch Package
|
name: Build Arch Package
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@@ -58,7 +95,7 @@ jobs:
|
|||||||
su user -c "yes '' | makepkg --noconfirm -s"
|
su user -c "yes '' | makepkg --noconfirm -s"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://gitea.com/actions/checkout@v5
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Upload Arch package
|
- name: Upload Arch package
|
||||||
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||||
@@ -66,9 +103,53 @@ jobs:
|
|||||||
name: PortProtonQt-Arch
|
name: PortProtonQt-Arch
|
||||||
path: ${{ env.PKGDEST }}/*
|
path: ${{ env.PKGDEST }}/*
|
||||||
|
|
||||||
|
build-fedora:
|
||||||
|
name: Build Fedora RPM
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
fedora_version: [41, 42, 43, rawhide]
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: fedora:${{ matrix.fedora_version }}
|
||||||
|
options: --privileged
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
dnf install -y git rpmdevtools python3-devel python3-wheel python3-pip \
|
||||||
|
python3-build pyproject-rpm-macros python3-setuptools \
|
||||||
|
redhat-rpm-config nodejs npm
|
||||||
|
|
||||||
|
- name: Setup rpmbuild environment
|
||||||
|
run: |
|
||||||
|
useradd rpmbuild -u 5002 -g users || true
|
||||||
|
mkdir -p /home/rpmbuild/{BUILD,RPMS,SPECS,SRPMS,SOURCES}
|
||||||
|
chown -R rpmbuild:users /home/rpmbuild
|
||||||
|
echo '%_topdir /home/rpmbuild' > /home/rpmbuild/.rpmmacros
|
||||||
|
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: https://gitea.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Copy fedora.spec
|
||||||
|
run: |
|
||||||
|
cp build-aux/fedora.spec /home/rpmbuild/SPECS/${{ env.PACKAGE }}.spec
|
||||||
|
chown -R rpmbuild:users /home/rpmbuild
|
||||||
|
|
||||||
|
- name: Build RPM
|
||||||
|
run: |
|
||||||
|
su rpmbuild -c "rpmbuild -ba /home/rpmbuild/SPECS/${{ env.PACKAGE }}.spec"
|
||||||
|
|
||||||
|
- name: Upload RPM package
|
||||||
|
uses: https://gitea.com/actions/gitea-upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: PortProtonQt-RPM-Fedora-${{ matrix.fedora_version }}
|
||||||
|
path: /home/rpmbuild/RPMS/**/*.rpm
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create and Publish Release
|
name: Create and Publish Release
|
||||||
needs: [ build-arch ]
|
needs: [build-appimage, build-arch, build-fedora]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: https://gitea.com/actions/checkout@v4
|
- uses: https://gitea.com/actions/checkout@v4
|
||||||
@@ -79,6 +160,30 @@ jobs:
|
|||||||
sudo apt install -y original-awk unzip
|
sudo apt install -y original-awk unzip
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: https://gitea.com/actions/download-artifact@v5
|
uses: https://gitea.com/actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: release/
|
path: release/
|
||||||
|
|
||||||
|
- name: Extract downloaded artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p extracted
|
||||||
|
find release/ -name '*.zip' -exec unzip -o {} -d extracted/ \;
|
||||||
|
find extracted/ -type f -exec mv {} release/ \;
|
||||||
|
find release/ -name '*.zip' -delete
|
||||||
|
rm -rf extracted/
|
||||||
|
|
||||||
|
- name: Extract changelog for version
|
||||||
|
id: changelog
|
||||||
|
run: |
|
||||||
|
VERSION="${{ env.VERSION }}"
|
||||||
|
awk "/^## \\[$VERSION\\]/ {flag=1; next} /^## \\[/ || /^---/ {flag=0} flag" CHANGELOG.md > changelog.txt
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
body_path: changelog.txt
|
||||||
|
token: ${{ env.GITEA_TOKEN }}
|
||||||
|
tag_name: v${{ env.VERSION }}
|
||||||
|
prerelease: true
|
||||||
|
files: release/**/*
|
||||||
|
sha256sum: true
|
||||||
|
@@ -4,7 +4,7 @@ import re
|
|||||||
from typing import cast, TYPE_CHECKING
|
from typing import cast, TYPE_CHECKING
|
||||||
from PySide6.QtGui import QPixmap, QIcon
|
from PySide6.QtGui import QPixmap, QIcon
|
||||||
from PySide6.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog, QFormLayout, QHBoxLayout, QLabel, QVBoxLayout, QListWidget, QScrollArea, QWidget, QListWidgetItem, QSizePolicy, QApplication, QProgressBar
|
QDialog, QFormLayout, QHBoxLayout, QLabel, QVBoxLayout, QListWidget, QScrollArea, QWidget, QListWidgetItem, QSizePolicy, QApplication, QProgressBar, QScroller
|
||||||
)
|
)
|
||||||
from PySide6.QtCore import Qt, QObject, Signal, QMimeDatabase, QTimer, QThreadPool, QRunnable, Slot
|
from PySide6.QtCore import Qt, QObject, Signal, QMimeDatabase, QTimer, QThreadPool, QRunnable, Slot
|
||||||
from icoextract import IconExtractor, IconExtractorError
|
from icoextract import IconExtractor, IconExtractorError
|
||||||
@@ -374,6 +374,9 @@ class FileExplorer(QDialog):
|
|||||||
self.file_list.itemDoubleClicked.connect(self.handle_item_double_click)
|
self.file_list.itemDoubleClicked.connect(self.handle_item_double_click)
|
||||||
self.file_list.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
|
self.file_list.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
|
||||||
self.file_list.customContextMenuRequested.connect(self.show_folder_context_menu)
|
self.file_list.customContextMenuRequested.connect(self.show_folder_context_menu)
|
||||||
|
self.file_list.setHorizontalScrollMode(QListWidget.ScrollMode.ScrollPerPixel)
|
||||||
|
self.file_list.setVerticalScrollMode(QListWidget.ScrollMode.ScrollPerPixel)
|
||||||
|
QScroller.grabGesture(self.file_list.viewport(), QScroller.ScrollerGestureType.LeftMouseButtonGesture)
|
||||||
self.main_layout.addWidget(self.file_list)
|
self.main_layout.addWidget(self.file_list)
|
||||||
|
|
||||||
# Connect scroll signal for lazy loading
|
# Connect scroll signal for lazy loading
|
||||||
|
@@ -36,7 +36,7 @@ from portprotonqt.downloader import Downloader
|
|||||||
from portprotonqt.tray_manager import TrayManager
|
from portprotonqt.tray_manager import TrayManager
|
||||||
|
|
||||||
from PySide6.QtWidgets import (QLineEdit, QMainWindow, QStatusBar, QWidget, QVBoxLayout, QLabel, QHBoxLayout, QStackedWidget, QComboBox, QScrollArea, QSlider,
|
from PySide6.QtWidgets import (QLineEdit, QMainWindow, QStatusBar, QWidget, QVBoxLayout, QLabel, QHBoxLayout, QStackedWidget, QComboBox, QScrollArea, QSlider,
|
||||||
QDialog, QFormLayout, QFrame, QGraphicsDropShadowEffect, QMessageBox, QApplication, QPushButton, QProgressBar, QCheckBox, QSizePolicy)
|
QDialog, QFormLayout, QFrame, QGraphicsDropShadowEffect, QMessageBox, QApplication, QPushButton, QProgressBar, QCheckBox, QSizePolicy, QScroller)
|
||||||
from PySide6.QtCore import Qt, QAbstractAnimation, QUrl, Signal, QTimer, Slot
|
from PySide6.QtCore import Qt, QAbstractAnimation, QUrl, Signal, QTimer, Slot
|
||||||
from PySide6.QtGui import QIcon, QPixmap, QColor, QDesktopServices
|
from PySide6.QtGui import QIcon, QPixmap, QColor, QDesktopServices
|
||||||
from typing import cast
|
from typing import cast
|
||||||
@@ -865,6 +865,7 @@ class MainWindow(QMainWindow):
|
|||||||
scrollArea = QScrollArea()
|
scrollArea = QScrollArea()
|
||||||
scrollArea.setWidgetResizable(True)
|
scrollArea.setWidgetResizable(True)
|
||||||
scrollArea.setStyleSheet(self.theme.SCROLL_AREA_STYLE)
|
scrollArea.setStyleSheet(self.theme.SCROLL_AREA_STYLE)
|
||||||
|
QScroller.grabGesture(scrollArea.viewport(), QScroller.ScrollerGestureType.LeftMouseButtonGesture)
|
||||||
|
|
||||||
self.gamesListWidget = QWidget()
|
self.gamesListWidget = QWidget()
|
||||||
self.gamesListWidget.setStyleSheet(self.theme.LIST_WIDGET_STYLE)
|
self.gamesListWidget.setStyleSheet(self.theme.LIST_WIDGET_STYLE)
|
||||||
|
Reference in New Issue
Block a user