Compare commits

..
21 Commits
Author SHA1 Message Date
Codeberg TranslateandBoria138 d1bfab6c7c Translated using Weblate (Russian)
Check Translations / check-translations (pull_request) Successful in 16s
Code check / Check code (pull_request) Successful in 54s
Check Translations / check-translations (push) Successful in 14s
Code check / Check code (push) Successful in 53s
Currently translated at 100.0% (667 of 667 strings)

Co-authored-by: Boria138 <boria138@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/portprotonqt/portprotonqt/ru/
Translation: PortProtonQt/PortProtonQt
2026-05-29 13:53:57 +00:00
Boria138 4f8929da40 fix: filter network shares from mounted drives
Code check / Check code (push) Successful in 55s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-29 09:37:36 +05:00
Boria138 4b0b613659 chore: fix autoFullscreenGamepad settings style
Code check / Check code (push) Successful in 57s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 13:08:49 +05:00
Boria138 0802e7852f chore(build): fix typo on arch
Code check / Check code (push) Successful in 1m31s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 10:17:30 +05:00
Boria138 4a03d803f4 chore(locale): added Belarusian po template
Code check / Check code (push) Successful in 55s
Check Translations / check-translations (push) Successful in 10s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 10:14:07 +05:00
Boria138 4271461282 chore(locale): update
Check Translations / check-translations (push) Successful in 11s
Code check / Check code (push) Successful in 55s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 10:08:45 +05:00
Boria138 f4477101cc chore(mangohud): fix typo
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 10:07:57 +05:00
Boria138 0dc11ecd3c feat(input): use SDL3 for gamepad type detection
Code check / Check code (push) Successful in 55s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-28 09:58:00 +05:00
Boria138 3248392e78 chore(locale): update
Check Translations / check-translations (push) Failing after 20s
Code check / Check code (push) Successful in 56s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 21:30:57 +05:00
Boria138 9468c3f286 feat(settings): return gamepad type setting
Code check / Check code (push) Successful in 54s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 21:27:22 +05:00
Boria138 f2b80604cb feat(mangohud): added display_server to PortProton preset
Code check / Check code (push) Successful in 54s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 20:35:32 +05:00
Boria138 36a36ad7d2 fix: load bundled terminal color schemes
Code check / Check code (push) Successful in 57s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 19:00:47 +05:00
Boria138 03ada79e88 fix: improve installed autoinstall handling
Code check / Check code (push) Successful in 56s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 15:30:07 +05:00
Boria138 20444bc3d1 feat: add drag and drop restore for ppack backups
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 15:02:34 +05:00
Boria138 ae89b5a0fb ci: merge package build workflows
Code check / Check code (push) Successful in 55s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 12:11:16 +05:00
Boria138 3372bb58ba fix: pass Steam launch options to games
Code check / Check code (push) Successful in 57s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 12:03:09 +05:00
Boria138 200b257622 fix: launch Steam games via detected client type
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-27 12:03:09 +05:00
VanoMJ 0b8ef53cdd ci: build Debian package
Build Check - AppImage, Arch, Fedora, Debian / changes (pull_request) Successful in 14s
Code check / Check code (pull_request) Successful in 54s
Build Check - AppImage, Arch, Fedora, Debian / Build AppImage (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Fedora RPM (42) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Fedora RPM (43) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Fedora RPM (44) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Fedora RPM (rawhide) (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Arch Package (pull_request) Has been skipped
Build Check - AppImage, Arch, Fedora, Debian / Build Debian Package (pull_request) Successful in 2m39s
Code check / Check code (push) Successful in 55s
2026-05-26 21:42:23 +03:00
Boria138 41aea94fff fix: detect Steam directory via .steam symlink
Code check / Check code (push) Successful in 54s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-26 21:48:35 +05:00
Boria138 0a4cb81906 fix: add missing .cmd launch support
Code check / Check code (push) Successful in 55s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-26 21:05:54 +05:00
Boria138 1743c69261 feat: add hidden time display mode
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-05-26 20:57:35 +05:00
43 changed files with 3161 additions and 323 deletions

No files matched your search

-142
View File
@@ -1,142 +0,0 @@
name: Nightly Build - AppImage, Arch, Fedora
on:
workflow_dispatch:
env:
BUILD_BRANCH: ${{ github.ref_name }}
PKGDEST: "/tmp/portprotonqt"
PACKAGE: "portprotonqt"
jobs:
build-appimage:
name: Build AppImage
runs-on: ubuntu-22.04
container:
image: archlinux:base-devel@sha256:6db772fd1dd128b9cf7b7231ca5284af70879596fe4ec754c911cfc4ac30d5eb
options: --privileged --device /dev/fuse
steps:
- name: Prepare container
run: |
pacman-key --init
pacman -Sy --noconfirm archlinux-keyring
pacman -Syu --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm xorg-server-xvfb zsync
- uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Install appimage dependencies
run: |
cd build-aux/AppImage
chmod +x get-dependencies.sh portprotonqt-appimage.sh
./get-dependencies.sh --local --branch "${{ env.BUILD_BRANCH }}"
- name: Build AppImage
run: |
cd build-aux/AppImage
./portprotonqt-appimage.sh
- name: Upload AppImage
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: PortProtonQt-AppImage
path: build-aux/AppImage/dist/*.AppImage
build-fedora:
name: Build Fedora RPM
runs-on: ubuntu-latest
strategy:
matrix:
fedora_version: [42, 43, 44, rawhide]
container:
image: fedora:${{ matrix.fedora_version }}
options: --privileged
steps:
- name: Install build dependencies
run: |
dnf install -y git rpmdevtools meson ninja-build python3-devel \
systemd-rpm-macros vulkan-loader-devel redhat-rpm-config nodejs npm \
gcc gettext
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Copy fedora.spec
run: |
sed "s|git clone https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|git clone -b ${{ env.BUILD_BRANCH }} https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|" \
build-aux/fedora-git.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
build-arch:
name: Build Arch Package
runs-on: ubuntu-22.04
container:
image: archlinux:base-devel@sha256:6db772fd1dd128b9cf7b7231ca5284af70879596fe4ec754c911cfc4ac30d5eb
steps:
- name: Prepare container
run: |
pacman -Syuu --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm
sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc) -l$(nproc)"/g' /etc/makepkg.conf
sed -i 's/OPTIONS=(.*)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge lto)/g' /etc/makepkg.conf
yes | pacman -Scc
pacman-key --init
pacman -S --noconfirm archlinux-keyring
mkdir -p /__w/portproton-repo
pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
pacman-key --lsign-key 3056513887B78AEB
pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst'
pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
cat << EOM >> /etc/pacman.conf
[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist
EOM
pacman -Syy
useradd -m user -G wheel && echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "PACKAGER=\"Boris Yumankulov <boria138@altlinux.org>\"" >> /etc/makepkg.conf
chown user -R /tmp
chown user -R ..
- name: Checkout
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Build
run: |
cd /__w/portproton-repo
cp -r "$GITHUB_WORKSPACE" PortProtonQt
cd /__w/portproton-repo/PortProtonQt/build-aux
sed -i "s|source=(\"git+https://git.linux-gaming.ru/Boria138/PortProtonQt.git\")|source=(\"git+https://git.linux-gaming.ru/Boria138/PortProtonQt.git#branch=${{ env.BUILD_BRANCH }}\")|" PKGBUILD-git
chown user -R ..
su user -c "yes '' | makepkg --noconfirm -s -p PKGBUILD-git"
- name: Upload Arch package
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: PortProtonQt-Arch
path: ${{ env.PKGDEST }}/*
+31 -1
View File
@@ -1,4 +1,4 @@
name: Build AppImage, Arch and Fedora Packages
name: Build AppImage, Arch, Fedora and Debian Packages
on:
workflow_dispatch:
@@ -138,6 +138,36 @@ jobs:
name: PortProtonQt-RPM-Fedora-${{ matrix.fedora_version }}
path: /home/rpmbuild/RPMS/**/*.rpm
build-debian:
name: Build Debian Package
runs-on: ubuntu-latest
container:
image: debian:13
options: --privileged
steps:
- name: Install build dependencies
run: |
apt-get update
apt-get install -y build-essential debhelper dpkg-dev gettext git \
libvulkan-dev meson ninja-build nodejs npm \
pkgconf python3
- name: Checkout
uses: https://gitea.com/actions/checkout@v4
- name: Build Debian package
run: |
dpkg-buildpackage -us -uc -b
mkdir -p dist/deb
mv ../*.deb ../*.buildinfo ../*.changes dist/deb/
- name: Upload Debian package
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: PortProtonQt-DEB-Debian-13
path: dist/deb/*
release:
name: Create and Publish Release
runs-on: ubuntu-latest
@@ -1,4 +1,4 @@
name: Build Check - AppImage, Arch, Fedora
name: Package Build - AppImage, Arch, Fedora, Debian
on:
workflow_dispatch:
@@ -7,9 +7,11 @@ on:
- 'build-aux/AppImage/**'
- 'build-aux/fedora-git.spec'
- 'build-aux/PKGBUILD-git'
- '.gitea/workflows/code-build.yml'
- 'debian/**'
- '.gitea/workflows/package-build.yml'
env:
BUILD_BRANCH: ${{ github.ref_name }}
PKGDEST: "/tmp/portprotonqt"
PACKAGE: "portprotonqt"
PR_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url }}
@@ -22,46 +24,56 @@ jobs:
appimage: ${{ steps.check.outputs.appimage }}
fedora: ${{ steps.check.outputs.fedora }}
arch: ${{ steps.check.outputs.arch }}
debian: ${{ steps.check.outputs.debian }}
steps:
- uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
- name: Ensure git is installed
if: github.event_name == 'pull_request'
run: |
sudo apt update
sudo apt install -y git
- name: Check changed files
if: github.event_name == 'pull_request'
id: check
run: |
# Get changed files
git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} > changed_files.txt
echo "Changed files:"
cat changed_files.txt
# Check AppImage files
if grep -q "build-aux/AppImage/" changed_files.txt; then
echo "appimage=true" >> $GITHUB_OUTPUT
else
echo "appimage=false" >> $GITHUB_OUTPUT
fi
# Check Fedora spec files (only fedora-git.spec)
if grep -q "build-aux/fedora-git.spec" changed_files.txt; then
echo "fedora=true" >> $GITHUB_OUTPUT
else
echo "fedora=false" >> $GITHUB_OUTPUT
fi
# Check Arch PKGBUILD-git
if grep -q "build-aux/PKGBUILD-git" changed_files.txt; then
echo "arch=true" >> $GITHUB_OUTPUT
else
echo "arch=false" >> $GITHUB_OUTPUT
fi
if grep -q "debian/" changed_files.txt; then
echo "debian=true" >> $GITHUB_OUTPUT
else
echo "debian=false" >> $GITHUB_OUTPUT
fi
- name: Skip change detection
if: github.event_name == 'workflow_dispatch'
run: true
build-appimage:
name: Build AppImage
runs-on: ubuntu-22.04
@@ -74,16 +86,26 @@ jobs:
- name: Prepare container
run: |
pacman-key --init
pacman -Sy --noconfirm --disable-download-timeout --needed archlinux-keyring
pacman -Sy --noconfirm archlinux-keyring
pacman -Syu --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm xorg-server-xvfb zsync
- uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'pull_request'
- uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Install appimage dependencies
run: |
cd build-aux/AppImage
chmod +x get-dependencies.sh portprotonqt-appimage.sh
./get-dependencies.sh --local --branch "${{ env.PR_BRANCH }}" --repo "${{ env.PR_REPO_URL }}"
if [ "${{ github.event_name }}" = "pull_request" ]; then
./get-dependencies.sh --local --branch "${{ env.PR_BRANCH }}" --repo "${{ env.PR_REPO_URL }}"
else
./get-dependencies.sh --local --branch "${{ env.BUILD_BRANCH }}"
fi
- name: Build AppImage
run: |
@@ -114,8 +136,8 @@ jobs:
- name: Install build dependencies
run: |
dnf install -y git rpmdevtools meson ninja-build python3-devel \
systemd-rpm-macros redhat-rpm-config nodejs npm \
gcc vulkan-loader-devel gettext
systemd-rpm-macros vulkan-loader-devel redhat-rpm-config nodejs npm \
gcc gettext
- name: Setup rpmbuild environment
run: |
@@ -124,13 +146,25 @@ jobs:
chown -R rpmbuild:users /home/rpmbuild
echo '%_topdir /home/rpmbuild' > /home/rpmbuild/.rpmmacros
- name: Checkout repo
- name: Checkout PR
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'pull_request'
- name: Copy fedora-git.spec
- name: Checkout branch
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Copy fedora.spec
run: |
sed "s|git clone https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|git clone -b ${{ env.PR_BRANCH }} ${{ env.PR_REPO_URL }}|" \
build-aux/fedora-git.spec > /home/rpmbuild/SPECS/${{ env.PACKAGE }}.spec
if [ "${{ github.event_name }}" = "pull_request" ]; then
sed "s|git clone https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|git clone -b ${{ env.PR_BRANCH }} ${{ env.PR_REPO_URL }}|" \
build-aux/fedora-git.spec > /home/rpmbuild/SPECS/${{ env.PACKAGE }}.spec
else
sed "s|git clone https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|git clone -b ${{ env.BUILD_BRANCH }} https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git|" \
build-aux/fedora-git.spec > /home/rpmbuild/SPECS/${{ env.PACKAGE }}.spec
fi
chown -R rpmbuild:users /home/rpmbuild
- name: Build RPM
@@ -154,7 +188,7 @@ jobs:
steps:
- name: Prepare container
run: |
pacman -Sy --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm
pacman -Syuu --noconfirm --disable-download-timeout --needed git wget gnupg nodejs npm
sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc) -l$(nproc)"/g' /etc/makepkg.conf
sed -i 's/OPTIONS=(.*)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge lto)/g' /etc/makepkg.conf
yes | pacman -Scc
@@ -176,15 +210,30 @@ jobs:
chown user -R /tmp
chown user -R ..
- name: Checkout
- name: Checkout PR
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'pull_request'
- name: Checkout branch
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Build
run: |
cd /__w/portproton-repo
git clone -b ${{ env.PR_BRANCH }} ${{ env.PR_REPO_URL }} PortProtonQt
if [ "${{ github.event_name }}" = "pull_request" ]; then
git clone -b ${{ env.PR_BRANCH }} ${{ env.PR_REPO_URL }} PortProtonQt
else
cp -r "$GITHUB_WORKSPACE" PortProtonQt
fi
cd /__w/portproton-repo/PortProtonQt/build-aux
sed -i "s|source=(\"git+https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git\")|source=(\"git+${{ env.PR_REPO_URL }}#branch=${{ env.PR_BRANCH }}\")|" PKGBUILD-git
if [ "${{ github.event_name }}" = "pull_request" ]; then
sed -i "s|source=(\"git+https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt.git\")|source=(\"git+${{ env.PR_REPO_URL }}#branch=${{ env.PR_BRANCH }}\")|" PKGBUILD-git
else
sed -i "s|source=(\"git+https://git.linux-gaming.ru/Boria138/PortProtonQt.git\")|source=(\"git+https://git.linux-gaming.ru/Boria138/PortProtonQt.git#branch=${{ env.BUILD_BRANCH }}\")|" PKGBUILD-git
fi
chown user -R ..
su user -c "yes '' | makepkg --noconfirm -s -p PKGBUILD-git"
@@ -193,3 +242,42 @@ jobs:
with:
name: PortProtonQt-Arch
path: ${{ env.PKGDEST }}/*
build-debian:
name: Build Debian Package
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.debian == 'true' || github.event_name == 'workflow_dispatch'
container:
image: debian:13
options: --privileged
steps:
- name: Install build dependencies
run: |
apt-get update
apt-get install -y build-essential debhelper dpkg-dev gettext git \
libvulkan-dev meson ninja-build nodejs npm \
pkgconf python3
- name: Checkout PR
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'pull_request'
- name: Checkout branch
uses: https://gitea.com/actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ env.BUILD_BRANCH }}
- name: Build Debian package
run: |
dpkg-buildpackage -us -uc -b
mkdir -p dist/deb
mv ../*.deb ../*.buildinfo ../*.changes dist/deb/
- name: Upload Debian package
uses: https://gitea.com/actions/gitea-upload-artifact@v4
with:
name: PortProtonQt-DEB-Debian-13
path: dist/deb/*
+1
View File
@@ -8,6 +8,7 @@ wheels/
# Meson
builddir/
build-deb/
# Virtual environments
.venv
+26
View File
@@ -3,6 +3,32 @@
Все заметные изменения в этом проекте фиксируются в этом файле.
Формат основан на [Keep a Changelog](https://keepachangelog.com/) и придерживается принципов [Semantic Versioning](https://semver.org/).
## [Unreleased]
### Added
- Добавлена поддержка перетаскивания `.ppack` для восстановления префиксов
- Добавлен скрытый тип отображения времени, скрывающий последний запуск и проведённое время
- Добавлена сборка Deb-пакета (Debian 13+ и Ubuntu 25.04+)
- Добавлена кнопка открытия установленного приложения из карточки автоустановки
- Возвращена настройка типа геймпада для подсказок: Авто, Xbox или PlayStation
### Changed
- В пресет MangoHud `PortProton` добавлен параметр `display_server`
### Fixed
- Добавлена пропущенная поддержка `.cmd` рядом с `.bat`
- Исправлено определение каталога Steam на OpenSUSE и Deb-based системах
- Исправлен запуск игр Steam с учётом native, Snap и Flatpak установок
- Исправлена передача параметров запуска игр в Steam compatibility mode
- Исправлено определение установленных автоустановок по `.desktop` и возврат к исходной карточке
- Исправлена загрузка встроенных цветовых схем терминала
- Исправлено попадание NFS и SMB шар в список смонтированных дисков
### Contributors
- Ivan Mazhukin
---
## [1.1.0] - 2026-05-26
### Added
+1 -1
View File
@@ -6,7 +6,7 @@ arch=('any')
url="https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt"
license=('GPL-3.0')
depends=('python-requests' 'python-babel' 'python-evdev' 'python-pygame' 'python-orjson'
'python-psutil' 'python-tqdm' 'python-vdf' 'python-libarchive-c' 'pyside6' 'python-rapidfuzz' 'python-pefile' 'python-pillow' 'perl-image-exiftool' 'python-websocket-client' 'cabextract' 'unzip' 'curl' 'jq' 'file' 'findutils' 'gawk' 'grep' 'tar' 'xz' 'zstd' 'gzip' 'unrar' 'qt6-svg' 'qt6-imageformats' 'pciutils' 'mesa-utils' 'vulkan-icd-loader' 'procps-ng' 'psmisc' '7zip' 'python-dbus-fast')
'python-psutil' 'python-tqdm' 'python-vdf' 'python-libarchive-c' 'pyside6' 'python-rapidfuzz' 'python-pefile' 'python-pillow' 'perl-image-exiftool' 'python-websocket-client' 'cabextract' 'unzip' 'curl' 'jq' 'file' 'findutils' 'gawk' 'grep' 'tar' 'xz' 'zstd' 'gzip' 'unrar' 'qt6-svg' 'qt6-imageformats' 'pciutils' 'mesa-utils' 'vulkan-icd-loader' 'procps-ng' 'psmisc' '7zip' 'python-dbus-fast' 'sdl3')
makedepends=('meson' 'ninja' 'vulkan-headers' 'gettext')
conflicts=("portprotonqt-steam-compat")
provides=('portprotonqt-steam-compat')
+1 -1
View File
@@ -6,7 +6,7 @@ arch=('any')
url="https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt"
license=('GPL-3.0')
depends=('python-requests' 'python-babel' 'python-evdev' 'python-pygame' 'python-orjson'
'python-psutil' 'python-tqdm' 'python-vdf' 'python-libarchive-c' 'pyside6' 'python-rapidfuzz' 'python-pefile' 'python-pillow' 'perl-image-exiftool' 'python-websocket-client' 'cabextract' 'unzip' 'curl' 'jq' 'file' 'findutils' 'gawk' 'grep' 'tar' 'xz' 'zstd' 'gzip' 'unrar' 'qt6-svg' 'qt6-imageformats' 'pciutils' 'mesa-utils' 'vulkan-icd-loader' 'procps-ng' 'psmisc' '7zip' 'python-dbus-fast')
'python-psutil' 'python-tqdm' 'python-vdf' 'python-libarchive-c' 'pyside6' 'python-rapidfuzz' 'python-pefile' 'python-pillow' 'perl-image-exiftool' 'python-websocket-client' 'cabextract' 'unzip' 'curl' 'jq' 'file' 'findutils' 'gawk' 'grep' 'tar' 'xz' 'zstd' 'gzip' 'unrar' 'qt6-svg' 'qt6-imageformats' 'pciutils' 'mesa-utils' 'vulkan-icd-loader' 'procps-ng' 'psmisc' '7zip' 'python-dbus-fast' 'sdl3')
makedepends=('meson' 'ninja' 'vulkan-headers' 'gettext')
conflicts=("portprotonqt-steam-compat")
provides=('portprotonqt-steam-compat')
+1
View File
@@ -43,6 +43,7 @@ Requires: python3-pillow-qt
Requires: python3-rapidfuzz
Requires: python3-libarchive-c
Requires: perl-Image-ExifTool
Requires: SDL3
Requires: qt6-qtsvg
Requires: qt6-qtimageformats
Requires: cabextract
+1
View File
@@ -40,6 +40,7 @@ Requires: python3-pillow-qt
Requires: python3-rapidfuzz
Requires: python3-libarchive-c
Requires: perl-Image-ExifTool
Requires: SDL3
Requires: qt6-qtsvg
Requires: qt6-qtimageformats
Requires: cabextract
@@ -11,4 +11,4 @@ Terminal=false
Icon=ru.linux_gaming.PortProtonQt
StartupWMClass=ru.linux_gaming.PortProtonQt
Categories=Game;Utility;
MimeType=x-scheme-handler/portproton;application/x-portproton-prefix-backup;application/x-ms-dos-exec;application/x-ms-dos-batch;application/x-msi;text/x-ms-regedit;application/x-executable;application/x-dosexec;application/x-iso9660-image;application/x-cd-image;application/x-raw-disk-image;application/x-mdf;application/x-mds-disk;
MimeType=x-scheme-handler/portproton;application/x-portproton-prefix-backup;application/x-ms-dos-exec;application/x-ms-dos-batch;application/x-bat;application/x-msi;text/x-ms-regedit;application/x-executable;application/x-dosexec;application/x-iso9660-image;application/x-cd-image;application/x-raw-disk-image;application/x-mdf;application/x-mds-disk;
@@ -800,7 +800,7 @@ search_desktop_file () {
while read -r -a line2 ; do
if [[ -z ${line2[0]} ]] \
|| [[ ! ${line2[0],,} =~ .(bat|exe|msi|reg)$ ]] ; then
|| [[ ! ${line2[0],,} =~ .(bat|cmd|exe|msi|reg)$ ]] ; then
BROKEN_LINE=1
break
fi
@@ -829,10 +829,10 @@ search_desktop_file () {
return 1
fi
# Ремонт, если есть пустые строки и непонятные строки без .exe, .bat, .msi, .reg
# Ремонт, если есть пустые строки и непонятные строки без .exe, .bat, .cmd, .msi, .reg
if [[ $BROKEN_LINE == 1 ]] ; then
while read -r -a line4 ; do
if [[ -n ${line4[0]} ]] && [[ ${line4[0],,} =~ .(bat|exe|msi|reg)$ ]]
if [[ -n ${line4[0]} ]] && [[ ${line4[0],,} =~ .(bat|cmd|exe|msi|reg)$ ]]
then echo "${line4[*]}"
fi
done < "$PORT_WINE_TMP_PATH/statistics" > "$PORT_WINE_TMP_PATH/statistics_repair"
@@ -1848,8 +1848,7 @@ check_dirs_and_files_in_pfx () {
fi
DRIVES=(d e f g i j k l m n o p q r t u v w x y)
DEF_MOUNT_DIRS=('/media' '/mnt' '/run/media')
MOUNT_DIRS=($(find "${DEF_MOUNT_DIRS[@]}" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | sort -u))
mapfile -t MOUNT_DIRS < <(python_module mount_points)
find -L "$WINEPREFIX/dosdevices" -maxdepth 1 -type l -exec rm -rf {} \; 2>/dev/null ;
for drive_dir in "${MOUNT_DIRS[@]}" ; do
@@ -2291,20 +2290,6 @@ use_exiftool () {
}
pw_create_gui_png () {
if [[ -z $name_desktop_png ]] ; then
basename_PW_EXE_FILE="$(basename "${PW_EXE_FILE}")"
if echo "$basename_PW_EXE_FILE" | grep -ie 'setup\|install\|\.msi$' &>/dev/null ; then
export name_desktop_png="setup"
return 0
elif echo "$basename_PW_EXE_FILE" | grep -ie '\.reg$' &>/dev/null ; then
export name_desktop_png="reg"
return 0
elif echo "$basename_PW_EXE_FILE"| grep -ie '\.bat$' &>/dev/null ; then
export name_desktop_png="bat"
return 0
fi
fi
if [[ -z "$PORTPROTON_NAME" ]] \
|| [[ "$PW_NO_RESTART_PPDB" == "1" ]]
then
@@ -4030,7 +4015,7 @@ EOF
*.exe)
pw_run "${PW_VD_TMP[@]}" ${WINE_WIN_START} "${PW_EXE_FILE}"
;;
*.bat)
*.bat|*.cmd)
PW_USE_TERMINAL=1
pw_run "${PW_VD_TMP[@]}" "${PW_EXE_FILE}"
;;
+2 -2
View File
@@ -92,7 +92,7 @@ if [[ "${1,,}" =~ \.ppack$ ]] ; then
export PW_NO_RESTART_PPDB="1"
export PW_DISABLED_CREATE_DB="1"
PW_EXE_FILE="$1"
elif [[ "${1,,}" =~ \.(exe|bat|msi|reg|lnk)$ ]] ; then
elif [[ "${1,,}" =~ \.(exe|bat|cmd|msi|reg|lnk)$ ]] ; then
if [[ -f "$1" ]] ; then
PW_EXE_FILE="$(realpath -s "$1")"
elif [[ -f "$OLDPWD/$1" ]] ; then
@@ -105,7 +105,7 @@ elif [[ "${1,,}" =~ \.(exe|bat|msi|reg|lnk)$ ]] ; then
get_lnk "${PW_EXE_FILE}"
PW_EXE_FILE="$(realpath "${link_path}" 2>/dev/null)"
fi
elif [[ "$1" =~ ^--(debug|launch|edit-db)$ && "${2,,}" =~ \.(exe|bat|msi|reg)$ ]] ; then
elif [[ "$1" =~ ^--(debug|launch|edit-db)$ && "${2,,}" =~ \.(exe|bat|cmd|msi|reg)$ ]] ; then
if [[ -f "$2" ]] ; then
PW_EXE_FILE="$(realpath -s "$2")"
elif [[ -f "$OLDPWD/$2" ]] ; then
+1 -1
View File
@@ -80,7 +80,7 @@ export PW_GAMESCOPE_ARGS_NEW=" -f --sharpness 10 --hdr-sdr-content-nits 0"
###MANGOHUD###
check_variables PW_MANGOHUD "0"
export DEFAULT_MANGOHUD_CONFIG="arch,cpu_mhz,cpu_temp,engine_version,gamemode,gpu_core_clock,gpu_mem_clock,gpu_name,gpu_temp,ram,resolution,vkbasalt,vram,vulkan_driver,wine,winesync"
export DEFAULT_MANGOHUD_CONFIG="arch,cpu_mhz,cpu_temp,engine_version,gamemode,gpu_core_clock,gpu_mem_clock,gpu_name,gpu_temp,ram,resolution,vkbasalt,vram,vulkan_driver,wine,winesync,display_server"
###DGVOODOO2###
check_variables PW_DGVOODOO2 "0"
+5
View File
@@ -0,0 +1,5 @@
portprotonqt (1.0) unstable; urgency=medium
* Add Debian packaging.
-- Ivan Mazhukin <vanyamajukin@outlook.com> Sat, 23 May 2026 13:32:57 +0300
+1
View File
@@ -0,0 +1 @@
completions/
+70
View File
@@ -0,0 +1,70 @@
Source: portprotonqt
Section: utils
Priority: optional
Maintainer: Ivan Mazhukin <vanyamajukin@outlook.com>
Build-Depends:
debhelper-compat (= 13),
gettext,
libvulkan-dev,
meson,
ninja-build,
pkgconf,
python3,
Standards-Version: 4.7.0
Homepage: https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt
Rules-Requires-Root: no
Package: portprotonqt
Architecture: linux-any
Depends:
7zip,
cabextract,
curl,
file,
gawk,
jq,
libimage-exiftool-perl,
libsdl3-0,
mesa-utils,
pciutils,
procps,
psmisc,
python3,
python3-babel,
python3-dbus-fast,
python3-evdev,
python3-libarchive-c,
python3-orjson,
python3-pefile,
python3-pil,
python3-psutil,
python3-pygame,
python3-pyside6.qtcore,
python3-pyside6.qtgui,
python3-pyside6.qtnetwork,
python3-pyside6.qtsvg,
python3-pyside6.qtwidgets,
python3-qrcode,
python3-rapidfuzz,
python3-requests,
python3-tqdm,
python3-vdf,
python3-websocket,
qt6-image-formats-plugins,
qt6-svg-plugins,
unrar-free,
unzip,
xz-utils,
zstd,
${misc:Depends},
${shlibs:Depends},
Recommends:
bluez,
network-manager,
pulseaudio-utils,
squashfs-tools,
udisks2,
upower,
Description: GUI for managing PortProton and Steam games
PortProtonQt provides a graphical interface for managing and launching
games from PortProton and Steam.
+20
View File
@@ -0,0 +1,20 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: PortProtonQt
Source: https://git.linux-gaming.ru/Linux-Gaming/PortProtonQt
Files: *
Copyright:
2026 PortProtonQt contributors
License: GPL-3.0
Files: debian/*
Copyright:
2026 PortProtonQt contributors
License: GPL-3.0
License: GPL-3.0
This package is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3.
.
On Debian systems, the complete text of the GNU General Public License
version 3 can be found in /usr/share/common-licenses/GPL-3.
+14
View File
@@ -0,0 +1,14 @@
usr/bin/portprotonqt
usr/bin/vk_gpu_info
usr/lib/python3/dist-packages/portprotonqt/
usr/lib/udev/rules.d/60-portprotonqt.rules
usr/share/applications/ru.linux_gaming.PortProtonQt.desktop
usr/share/bash-completion/completions/portprotonqt
usr/share/fish/vendor_completions.d/portprotonqt.fish
usr/share/icons/hicolor/scalable/apps/ru.linux_gaming.PortProtonQt.svg
usr/share/locale/
usr/share/metainfo/ru.linux_gaming.PortProtonQt.metainfo.xml
usr/share/mime/packages/ru.linux_gaming.PortProtonQt.xml
usr/share/polkit-1/rules.d/ru.linux_gaming.PortProtonQt.rules
usr/share/portproton/
usr/share/zsh/site-functions/_portprotonqt
Vendored Executable
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/make -f
%:
dh $@ --buildsystem=meson
override_dh_auto_configure:
dh_auto_configure -- \
-Dpython_purelibdir=/usr/lib/python3/dist-packages \
-Dudev_rulesdir=/usr/lib/udev/rules.d
override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
execute_after_dh_auto_install:
bash ./dev-scripts/generate-completions.sh
install -Dpm 0644 completions/portprotonqt \
debian/tmp/usr/share/bash-completion/completions/portprotonqt
install -Dpm 0644 completions/_portprotonqt \
debian/tmp/usr/share/zsh/site-functions/_portprotonqt
install -Dpm 0644 completions/portprotonqt.fish \
debian/tmp/usr/share/fish/vendor_completions.d/portprotonqt.fish
+1
View File
@@ -0,0 +1 @@
3.0 (native)
+2 -1
View File
@@ -240,10 +240,11 @@ def main():
logger = get_logger(__name__)
setup_logger(parsed_args.debug_level)
logger.info("Running in Steam compatibility mode, launching: %s", exe_path)
logger.info("Steam compatibility launch arguments: %s", parsed_args.launch_args)
# Launch game via PortProton without GUI
env_vars = os.environ.copy()
cmd = start_sh + [exe_path]
cmd = start_sh + [exe_path] + parsed_args.launch_args
try:
subprocess.run(cmd, env=env_vars)
except Exception as e:
+33 -8
View File
@@ -2,11 +2,12 @@ import argparse
import os
import re
import shutil
import sys
from pathlib import Path
from portprotonqt.steam_api import get_steam_home
LAUNCH_FILE_EXTENSIONS = ('.exe', '.bat', '.msi', '.reg', '.iso', '.mdf')
LAUNCH_FILE_EXTENSIONS = ('.exe', '.bat', '.cmd', '.msi', '.reg', '.iso', '.mdf')
PREFIX_BACKUP_EXTENSION = '.ppack'
@@ -82,9 +83,25 @@ def parse_args():
parser.add_argument(
'file_or_url',
nargs='?',
help="Launch file path (.exe/.bat/.msi/.reg/.iso/.mdf) or portproton:// URL"
help="Launch file path (.exe/.bat/.cmd/.msi/.reg/.iso/.mdf) or portproton:// URL"
)
return parser.parse_args()
if os.environ.get("STEAM_COMPAT") == "1" and "--" in sys.argv[1:]:
separator_index = sys.argv.index("--")
args = parser.parse_args(sys.argv[1:separator_index])
steam_args = sys.argv[separator_index + 1:]
if steam_args:
args.file_or_url = steam_args[0]
launch_args = steam_args[1:]
else:
launch_args = []
elif os.environ.get("STEAM_COMPAT") == "1":
args, launch_args = parser.parse_known_args()
else:
args = parser.parse_args()
launch_args = []
args.launch_args = launch_args
return args
def add_steam_compat_tool(force_install: bool = False) -> bool:
@@ -156,8 +173,16 @@ unset LD_LIBRARY_PATH
export STEAM_COMPAT=1
exe_name="$(basename "$1")"
exe_dir="$(dirname "$1")"
launch_args=("$@")
case "${1:-}" in
run|waitforexitandrun)
launch_args=("${@:2}")
;;
esac
launch_target="${launch_args[0]:-}"
exe_name="$(basename "$launch_target")"
exe_dir="$(dirname "$launch_target")"
# Ignore specific executables
if [[ "$exe_name" == "iscriptevaluator.exe" ]] \\
@@ -234,11 +259,11 @@ fi
# Use AppImage if specified, then Flatpak if installed, otherwise use portprotonqt from PATH
if [[ -n "$PPQT_BIN_PATH" ]]; then
"$PPQT_BIN_PATH" --debug-level INFO "$@"
"$PPQT_BIN_PATH" --debug-level INFO -- "${launch_args[@]}"
elif command -v flatpak >/dev/null 2>&1 && flatpak info ru.linux_gaming.PortProtonQt >/dev/null 2>&1; then
flatpak run ru.linux_gaming.PortProtonQt --debug-level INFO "$@"
flatpak run ru.linux_gaming.PortProtonQt --debug-level INFO -- "${launch_args[@]}"
else
portprotonqt --debug-level INFO "$@"
portprotonqt --debug-level INFO -- "${launch_args[@]}"
fi
''')
+17
View File
@@ -1,7 +1,24 @@
"""Gamepad configuration settings."""
from portprotonqt.config.base import BaseConfig
class GamepadConfig(BaseConfig):
"""Gamepad configuration settings."""
_section = "Gamepad"
def get_gamepad_type(self) -> str:
"""Get configured gamepad type."""
value = self._get_str("type", "auto").lower()
if value in ("auto", "xbox", "playstation"):
return value
if value in ("ps", "sony"):
return "playstation"
return "auto"
def set_gamepad_type(self, gamepad_type: str) -> None:
"""Set configured gamepad type."""
value = gamepad_type.lower()
if value not in ("auto", "xbox", "playstation"):
value = "auto"
self._save_value("type", value, "str")
+2 -1
View File
@@ -307,11 +307,12 @@ def parse_desktop_entry(file_path: str) -> configparser.SectionProxy | None:
return cp["Desktop Entry"]
WINDOWS_LAUNCH_EXTENSIONS = (".exe", ".bat", ".msi", ".reg")
WINDOWS_LAUNCH_EXTENSIONS = (".exe", ".bat", ".cmd", ".msi", ".reg")
DISC_IMAGE_EXTENSIONS = (".iso", ".mdf")
LAUNCH_FILE_EXTENSIONS = WINDOWS_LAUNCH_EXTENSIONS + DISC_IMAGE_EXTENSIONS
THEMED_LAUNCH_ICON_NAMES = {
".bat": "bat",
".cmd": "bat",
".msi": "msi",
".reg": "reg",
}
+103 -7
View File
@@ -43,6 +43,7 @@ from portprotonqt.detail_pages.utils import (
create_focus_helper,
toggle_favorite,
check_autoinstall_installed,
find_autoinstall_entry_path,
)
from portprotonqt.howlongtobeat_api import HowLongToBeat, GameEntry
from portprotonqt.config import (
@@ -250,10 +251,11 @@ class DetailPageManager:
game_info_layout = QVBoxLayout()
game_info_layout.setSpacing(10)
first_row = self._create_playtime_row(
game_data.get("last_launch", ""), game_data.get("formatted_playtime", "")
)
game_info_layout.addLayout(first_row)
if ui_config.get_time_detail_level() != "hidden":
first_row = self._create_playtime_row(
game_data.get("last_launch", ""), game_data.get("formatted_playtime", "")
)
game_info_layout.addLayout(first_row)
hltb_layout = QHBoxLayout()
hltb_layout.setSpacing(10)
@@ -718,6 +720,7 @@ class DetailPageManager:
exec_line = game_data.get("exec_line", "")
script_name = self._extract_script_name(exec_line)
self._return_to_autoinstall_card = game_data.get("autoinstall_exe_name", "")
description = self._get_enhanced_description(script_name, game_data.get("description", ""))
cover_frame = create_cover_frame(
@@ -837,18 +840,35 @@ class DetailPageManager:
self, script_name: str, name: str, buttons_layout: FlowLayout
) -> AutoSizeButton:
"""Create install button for auto-install page."""
install_button = self._make_action_button(_("Install"), self.main_window.theme_manager.get_icon("save", as_path=True))
install_button = self._make_action_button(
_("Install"),
self.main_window.theme_manager.get_icon("save", as_path=True),
)
install_button.clicked.connect(
lambda: self.main_window.launch_autoinstall(script_name, install_button)
)
buttons_layout.addWidget(install_button)
self._check_install_status(script_name, name, install_button)
open_button = self._make_action_button(
_("Open Game"),
self.main_window.theme_manager.get_icon("play", as_path=True),
)
open_button.clicked.connect(
lambda: self._open_installed_autoinstall_card(script_name, name)
)
open_button.setVisible(False)
buttons_layout.addWidget(open_button)
self._check_install_status(script_name, name, install_button, open_button)
return install_button
def _check_install_status(
self, script_name: str, name: str, install_button: AutoSizeButton
self,
script_name: str,
name: str,
install_button: AutoSizeButton,
open_button: AutoSizeButton,
) -> None:
"""Check install status asynchronously and update button."""
def on_result(is_installed: bool) -> None:
@@ -869,11 +889,63 @@ class DetailPageManager:
install_button.setIcon(icon)
# Update text without changing button size drastically
install_button.setText(text)
open_button.setVisible(is_installed)
check_autoinstall_installed(
script_name, name, self.main_window.portproton_location, callback=on_result
)
def _open_installed_autoinstall_card(self, script_name: str, name: str) -> None:
"""Open detail page for installed autoinstall game."""
desktop_path = find_autoinstall_entry_path(
script_name, self.main_window.portproton_location
)
if not desktop_path:
QMessageBox.warning(self.main_window, _("Error"), _("Game not found."))
return
def on_game_data(game_tuple: tuple | None) -> None:
if not game_tuple:
QMessageBox.warning(self.main_window, _("Error"), _("Game not found."))
return
game_data = self._game_tuple_to_data(game_tuple)
self._return_to_autoinstall_card = self._get_exec_name(game_data["exec_line"])
self._remove_current_detail_page()
self.openGameDetailPage(game_data)
self._return_to_tab_index = self.main_window.auto_install_tab_index
self.main_window._process_desktop_file_async(desktop_path, on_game_data)
def _get_exec_name(self, exec_line: str) -> str:
exec_path = extract_exec_target_path(exec_line)
if not exec_path:
return ""
return os.path.splitext(os.path.basename(exec_path))[0]
def _remove_current_detail_page(self) -> None:
page = self.main_window.currentDetailPage
if page and self._page_in_stacked(page):
self.main_window.stackedWidget.removeWidget(page)
page.deleteLater()
self.main_window.currentDetailPage = None
self._current_detail_page = None
def _game_tuple_to_data(self, game_tuple: tuple) -> dict:
return {
"name": game_tuple[0],
"description": game_tuple[1],
"cover_path": game_tuple[2],
"appid": game_tuple[3],
"controller_support": game_tuple[4],
"exec_line": game_tuple[5],
"last_launch": game_tuple[6],
"formatted_playtime": game_tuple[7],
"protondb_tier": game_tuple[8],
"anticheat_status": game_tuple[9],
"game_source": game_tuple[12],
"anticheat_slug": game_tuple[13] if len(game_tuple) > 13 else "",
}
def _finalize_autoinstall_page(
self,
detail_page: QWidget,
@@ -1128,6 +1200,30 @@ class DetailPageManager:
QTimer.singleShot(10, lambda: self.main_window.autoInstallContainer.updateGeometry())
if hasattr(self.main_window, "autoInstallContainerLayout"):
QTimer.singleShot(15, lambda: self.main_window.autoInstallContainerLayout.update())
QTimer.singleShot(50, self._focus_return_autoinstall_card)
def _focus_return_autoinstall_card(self) -> None:
exe_name = getattr(self, "_return_to_autoinstall_card", "")
if not exe_name:
return
cards = getattr(self.main_window, "autoInstallGameCards", {})
card = cards.get(exe_name)
if card is None or not card.isVisible():
return
self._clear_current_card_state(card)
card.setFocus(Qt.FocusReason.OtherFocusReason)
self.main_window.current_focused_card = card
card.update()
def _clear_current_card_state(self, target_card: QWidget) -> None:
current_card = getattr(self.main_window, "current_focused_card", None)
if current_card and current_card != target_card:
try:
current_card._focused = False
current_card.clearFocus()
current_card.update()
except RuntimeError:
pass
def _focus_first_library_card(self) -> None:
container = getattr(self.main_window, "gamesListWidget", None)
+94 -15
View File
@@ -9,7 +9,12 @@ from PySide6.QtGui import QPixmap
from portprotonqt.image_utils import get_animated_cover_pixmap
from portprotonqt.image_utils import load_pixmap_async, round_corners, set_animated_cover
from portprotonqt.config import favorites_config
from portprotonqt.config import (
extract_exec_target_path,
favorites_config,
get_portproton_scripts_path,
parse_desktop_entry,
)
from portprotonqt.logger import get_logger
logger = get_logger(__name__)
@@ -23,6 +28,12 @@ class _PixmapReadyRelay(QObject):
pixmap_ready = Signal(object)
class _AutoinstallCheckRelay(QObject):
"""Relay autoinstall check results to GUI thread safely."""
result_ready = Signal(bool)
def setup_image_loading(
detail_page: QWidget,
image_label: QLabel,
@@ -287,13 +298,42 @@ def _check_autoinstall_installed_sync(
except (OSError, AttributeError):
return False
autoinstall_exe = _get_autoinstall_exe_name(script_name)
if not autoinstall_exe:
return False
for file in desktop_files:
if _check_desktop_file(file, portproton_location, script_name, game_name):
if _check_desktop_file(file, portproton_location, autoinstall_exe):
return True
return False
def find_autoinstall_entry_path(
script_name: str,
portproton_location: str | None,
) -> str | None:
"""Find installed autoinstall desktop entry path."""
if not portproton_location:
return None
try:
desktop_files = os.listdir(portproton_location)
except (OSError, AttributeError):
return None
autoinstall_exe = _get_autoinstall_exe_name(script_name)
if not autoinstall_exe:
return None
for filename in desktop_files:
if not _check_desktop_file(filename, portproton_location, autoinstall_exe):
continue
return os.path.join(portproton_location, filename)
return None
def _check_autoinstall_installed_async(
script_name: str,
game_name: str,
@@ -302,13 +342,20 @@ def _check_autoinstall_installed_async(
) -> None:
"""Asynchronous check for installed autoinstall game."""
from threading import Thread
from PySide6.QtCore import QTimer
relay = _AutoinstallCheckRelay(QApplication.instance())
def on_result(result: bool) -> None:
callback(result)
relay.deleteLater()
relay.result_ready.connect(on_result, Qt.ConnectionType.QueuedConnection)
def worker() -> None:
result = _check_autoinstall_installed_sync(
script_name, game_name, portproton_location
)
QTimer.singleShot(0, lambda: callback(result))
relay.result_ready.emit(result)
thread = Thread(target=worker, daemon=True)
thread.start()
@@ -317,19 +364,51 @@ def _check_autoinstall_installed_async(
def _check_desktop_file(
filename: str,
location: str,
script_name: str,
game_name: str,
autoinstall_exe: str,
) -> bool:
"""Check if desktop file contains script or game name."""
"""Check if desktop file targets autoinstall exe."""
if not filename.endswith(".desktop"):
return False
try:
with open(os.path.join(location, filename), encoding="utf-8") as f:
content = f.read()
return (
script_name.lower() in content.lower()
or game_name.lower() in content.lower()
)
except (OSError, UnicodeDecodeError):
desktop_entry = parse_desktop_entry(os.path.join(location, filename))
if not desktop_entry:
return False
exec_path = extract_exec_target_path(desktop_entry.get("Exec", ""))
if not exec_path:
return False
return os.path.basename(exec_path).lower() == autoinstall_exe.lower()
def _get_autoinstall_exe_name(script_name: str) -> str:
scripts_path = get_portproton_scripts_path()
if not scripts_path:
return ""
script_path = os.path.join(scripts_path, "pw_autoinstall", script_name)
install_exe = ""
try:
with open(script_path, encoding="utf-8") as script_file:
for line in script_file:
if "PW_EXE_FILE" in line:
exe_name = _extract_exe_name(line)
if exe_name:
return exe_name
if "PW_AUTOINSTALL_EXE" not in line:
continue
exe_name = _extract_exe_name(line)
if exe_name:
install_exe = exe_name
except OSError:
return ""
return install_exe
def _extract_exe_name(line: str) -> str:
for part in line.replace("\\", "/").split("/"):
clean_part = part.strip().strip('"\' }')
if clean_part.lower().endswith(".exe"):
return clean_part
return ""
+2 -24
View File
@@ -24,6 +24,7 @@ from portprotonqt.dialogs.dialog_utils import create_dialog_hints_widget, update
from portprotonqt.icon_extractor import generate_thumbnail
from portprotonqt.dialogs.base import DraggableDialog, FileSelectedSignal
from portprotonqt.image_utils import COVER_IMAGE_EXTENSIONS
from portprotonqt.scripts_utils.mount_points import list_mounted_drive_paths
logger = get_logger(__name__)
theme_manager = ThemeManager()
@@ -279,30 +280,7 @@ class FileExplorer(DraggableDialog):
def get_mounted_drives(self):
"""Retrieve a list of mounted drives from /proc/mounts, excluding system paths."""
mounted_drives = []
try:
mounts = []
with open('/proc/mounts') as f:
for line in f:
parts = line.strip().split()
if len(parts) < 2:
continue
mount_point = parts[1]
mounts.append(mount_point)
for mount_point in mounts:
if mount_point == "/":
continue
if mount_point in ("/media", "/mnt", "/run/media"):
continue
if mount_point != "/" and not mount_point.startswith(("/run/media/", "/media/", "/mnt/")):
continue
if os.path.isdir(mount_point) and os.access(mount_point, os.R_OK):
mounted_drives.append(mount_point)
return sorted(mounted_drives)
except Exception as e:
logger.error(f"Error retrieving mounted drives: {e}")
return []
return list_mounted_drive_paths()
def setup_ui(self):
"""Set up the user interface."""
+2
View File
@@ -67,6 +67,7 @@ class GameCard(QFrame):
self.anticheat_status = anticheat_status
self.anticheat_slug = anticheat_slug or ""
self.game_source = game_source
self.autoinstall_exe_name = ""
self.last_launch_ts = last_launch_ts
self.playtime_seconds = playtime_seconds
self.base_card_width = card_width
@@ -779,6 +780,7 @@ class GameCard(QFrame):
"game_source": self.game_source,
"anticheat_status": self.anticheat_status,
"anticheat_slug": self.anticheat_slug,
"autoinstall_exe_name": getattr(self, "autoinstall_exe_name", ""),
}
self.select_callback(game_data)
super().mousePressEvent(event)
+155 -17
View File
@@ -2,6 +2,9 @@ import time
import threading
import os
import math
import ctypes
import ctypes.util
from functools import lru_cache
from dataclasses import dataclass
from typing import Protocol, cast, Any
os.environ.setdefault("PYGAME_HIDE_SUPPORT_PROMPT", "1")
@@ -18,7 +21,7 @@ from portprotonqt.logger import get_logger
from portprotonqt.image_utils import FullscreenDialog
from portprotonqt.custom_widgets import NavLabel, AutoSizeButton
from portprotonqt.game_card import GameCard
from portprotonqt.config import display_config, window_config
from portprotonqt.config import display_config, gamepad_config, window_config
from portprotonqt.dialogs import AddGameDialog
from portprotonqt.virtual_keyboard import VirtualKeyboard
@@ -94,6 +97,125 @@ class GamepadType(Enum):
PLAYSTATION = "PlayStation"
UNKNOWN = "Unknown"
SDL_INIT_GAMEPAD = 0x00002000
SDL_GAMEPAD_TYPE_STANDARD = 1
SDL_GAMEPAD_TYPE_XBOX360 = 2
SDL_GAMEPAD_TYPE_XBOXONE = 3
SDL_GAMEPAD_TYPE_PS3 = 4
SDL_GAMEPAD_TYPE_PS4 = 5
SDL_GAMEPAD_TYPE_PS5 = 6
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO = 7
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 8
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 9
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 10
SDL_GAMEPAD_TYPE_GAMECUBE = 11
SDL_GAMEPAD_TYPE_STEAM = 12
SDL3_XBOX_LIKE_TYPES = {
SDL_GAMEPAD_TYPE_STANDARD,
SDL_GAMEPAD_TYPE_XBOX360,
SDL_GAMEPAD_TYPE_XBOXONE,
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO,
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT,
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT,
SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR,
SDL_GAMEPAD_TYPE_GAMECUBE,
SDL_GAMEPAD_TYPE_STEAM,
}
SDL3_PLAYSTATION_TYPES = {
SDL_GAMEPAD_TYPE_PS3,
SDL_GAMEPAD_TYPE_PS4,
SDL_GAMEPAD_TYPE_PS5,
}
def _get_sdl3_error(sdl: ctypes.CDLL) -> str:
"""Return the current SDL3 error message."""
error = sdl.SDL_GetError()
if not error:
return ""
return error.decode(errors="replace")
def _configure_sdl3_gamepad_api(sdl: ctypes.CDLL) -> None:
"""Configure ctypes signatures for the SDL3 gamepad calls used here."""
sdl.SDL_InitSubSystem.argtypes = [ctypes.c_uint32]
sdl.SDL_InitSubSystem.restype = ctypes.c_bool
sdl.SDL_GetGamepads.argtypes = [ctypes.POINTER(ctypes.c_int)]
sdl.SDL_GetGamepads.restype = ctypes.POINTER(ctypes.c_uint32)
sdl.SDL_GetGamepadTypeForID.argtypes = [ctypes.c_uint32]
sdl.SDL_GetGamepadTypeForID.restype = ctypes.c_int
sdl.SDL_GetGamepadNameForID.argtypes = [ctypes.c_uint32]
sdl.SDL_GetGamepadNameForID.restype = ctypes.c_char_p
sdl.SDL_GetError.argtypes = []
sdl.SDL_GetError.restype = ctypes.c_char_p
sdl.SDL_free.argtypes = [ctypes.c_void_p]
sdl.SDL_free.restype = None
@lru_cache(maxsize=1)
def _load_sdl3() -> ctypes.CDLL | None:
"""Load SDL3 and initialize its gamepad subsystem when available."""
library_names = (
ctypes.util.find_library("SDL3"),
"libSDL3.so.0",
"libSDL3.so",
)
for library_name in library_names:
if not library_name:
continue
try:
sdl = ctypes.CDLL(library_name)
_configure_sdl3_gamepad_api(sdl)
except (AttributeError, OSError) as e:
logger.debug("Failed to load SDL3 from %s: %s", library_name, e)
continue
if sdl.SDL_InitSubSystem(SDL_INIT_GAMEPAD):
return sdl
logger.debug("Failed to initialize SDL3 gamepad subsystem: %s", _get_sdl3_error(sdl))
return None
def _decode_sdl3_name(name: bytes | None) -> str:
"""Decode a SDL3 device name."""
if not name:
return ""
return name.decode(errors="replace")
def _gamepad_type_from_sdl3_value(sdl_type: int) -> GamepadType | None:
"""Map SDL_GamepadType to the existing UI icon families."""
if sdl_type in SDL3_PLAYSTATION_TYPES:
return GamepadType.PLAYSTATION
if sdl_type in SDL3_XBOX_LIKE_TYPES:
return GamepadType.XBOX
return None
def _get_sdl3_gamepad_type(gamepad: "PygameGamepad") -> GamepadType | None:
"""Read SDL_GamepadType from SDL3 for the current pygame controller."""
sdl = _load_sdl3()
if sdl is None:
return None
count = ctypes.c_int()
gamepads = sdl.SDL_GetGamepads(ctypes.byref(count))
if not gamepads:
return None
try:
target_name = gamepad.name.casefold()
for index in range(count.value):
gamepad_id = gamepads[index]
sdl_name = _decode_sdl3_name(sdl.SDL_GetGamepadNameForID(gamepad_id))
if count.value > 1 and sdl_name.casefold() != target_name:
continue
gamepad_type = _gamepad_type_from_sdl3_value(sdl.SDL_GetGamepadTypeForID(gamepad_id))
if gamepad_type is not None:
return gamepad_type
finally:
sdl.SDL_free(gamepads)
return None
@dataclass
class PygameGamepad:
@@ -196,7 +318,7 @@ class InputManager(QObject):
super().__init__(cast(QObject, main_window))
self._parent = main_window
self._gamepad_handling_enabled = True
self.gamepad_type = GamepadType.UNKNOWN
self.gamepad_type = self._get_configured_gamepad_type()
self._parent.currentDetailPage = getattr(self._parent, 'currentDetailPage', None)
self._parent.current_exec_line = getattr(self._parent, 'current_exec_line', None)
self._parent.current_add_game_dialog = getattr(self._parent, 'current_add_game_dialog', None)
@@ -3616,7 +3738,7 @@ class InputManager(QObject):
logger.info(f"Gamepad connected: {new_gamepad.name} at {new_gamepad.path}")
self.gamepad = new_gamepad
self._reset_pygame_state()
self.gamepad_type = self._detect_gamepad_type(new_gamepad)
self.gamepad_type = self._get_effective_gamepad_type(new_gamepad)
self._refresh_gamepad_ui()
if display_config.get_auto_fullscreen_gamepad() and not display_config.get_fullscreen():
@@ -3650,21 +3772,37 @@ class InputManager(QObject):
self.pending_menu_fullscreen_time = 0.0
self.guide_held = False
self.emulation_triggered = False
self.gamepad_type = GamepadType.UNKNOWN
self.gamepad_type = self._get_configured_gamepad_type()
def _get_configured_gamepad_type(self) -> GamepadType:
"""Return manual gamepad type from config or Unknown for auto mode."""
value = gamepad_config.get_gamepad_type()
if value == "playstation":
return GamepadType.PLAYSTATION
if value == "xbox":
return GamepadType.XBOX
return GamepadType.UNKNOWN
def _get_effective_gamepad_type(self, gamepad: PygameGamepad) -> GamepadType:
"""Use manual gamepad type when configured, otherwise auto-detect."""
configured_type = self._get_configured_gamepad_type()
if configured_type != GamepadType.UNKNOWN:
return configured_type
return self._detect_gamepad_type(gamepad)
def apply_gamepad_type_setting(self) -> None:
"""Apply configured gamepad type to the current device."""
if self.gamepad is None:
self.gamepad_type = self._get_configured_gamepad_type()
return
self.gamepad_type = self._get_effective_gamepad_type(self.gamepad)
def _detect_gamepad_type(self, gamepad: PygameGamepad) -> GamepadType:
"""Infer gamepad type from pygame device metadata."""
name = gamepad.name.lower()
guid = gamepad.controller.as_joystick().get_guid().lower()
if any(keyword in name for keyword in ("playstation", "dualshock", "dualsense", "sony")):
return GamepadType.PLAYSTATION
if any(keyword in name for keyword in ("xbox", "x-input", "xinput", "microsoft")):
return GamepadType.XBOX
if guid.startswith(("030000004c05", "030000004c050000")):
return GamepadType.PLAYSTATION
if guid.startswith(("030000005e04", "030000005e040000")):
return GamepadType.XBOX
return GamepadType.XBOX
"""Read gamepad type from SDL."""
sdl3_type = _get_sdl3_gamepad_type(gamepad)
if sdl3_type is not None:
return sdl3_type
return GamepadType.UNKNOWN
def _refresh_gamepad_ui(self) -> None:
"""Refresh control hints and virtual keyboard after gamepad changes."""
@@ -3944,7 +4082,7 @@ class InputManager(QObject):
self.gamepad = None
self._reset_pygame_state()
self.gamepad_type = GamepadType.UNKNOWN
self.gamepad_type = self._get_configured_gamepad_type()
if self._pygame_ready:
controller.quit()
pygame.quit()
File diff suppressed because it is too large. Load diff
@@ -479,6 +479,9 @@ msgstr ""
msgid "Brief"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Time Detail Level:"
msgstr ""
@@ -506,9 +509,6 @@ msgstr ""
msgid "Compact"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Badge View Type:"
msgstr ""
@@ -518,6 +518,12 @@ msgstr ""
msgid "Tray Menu Type:"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Gamepad Type:"
msgstr ""
msgid "Launch Application in Fullscreen"
msgstr ""
@@ -623,9 +629,6 @@ msgstr ""
msgid "Light"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Apply Theme"
msgstr ""
@@ -1003,9 +1006,15 @@ msgstr ""
msgid "Install"
msgstr ""
msgid "Open Game"
msgstr ""
msgid "Reinstall"
msgstr ""
msgid "Game not found."
msgstr ""
msgid "Stop Log"
msgstr ""
@@ -483,6 +483,9 @@ msgstr ""
msgid "Brief"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Time Detail Level:"
msgstr ""
@@ -510,9 +513,6 @@ msgstr ""
msgid "Compact"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Badge View Type:"
msgstr ""
@@ -522,6 +522,12 @@ msgstr ""
msgid "Tray Menu Type:"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Gamepad Type:"
msgstr ""
msgid "Launch Application in Fullscreen"
msgstr ""
@@ -627,9 +633,6 @@ msgstr ""
msgid "Light"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Apply Theme"
msgstr ""
@@ -1005,9 +1008,16 @@ msgstr ""
msgid "Install"
msgstr ""
#, fuzzy
msgid "Open Game"
msgstr "Detener partida"
msgid "Reinstall"
msgstr ""
msgid "Game not found."
msgstr ""
msgid "Stop Log"
msgstr ""
+16 -7
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PortProtonQt 0.1.1\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-05-26 11:44+0500\n"
"POT-Creation-Date: 2026-05-28 10:08+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -477,6 +477,9 @@ msgstr ""
msgid "Brief"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Time Detail Level:"
msgstr ""
@@ -504,9 +507,6 @@ msgstr ""
msgid "Compact"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Badge View Type:"
msgstr ""
@@ -516,6 +516,12 @@ msgstr ""
msgid "Tray Menu Type:"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Gamepad Type:"
msgstr ""
msgid "Launch Application in Fullscreen"
msgstr ""
@@ -621,9 +627,6 @@ msgstr ""
msgid "Light"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Apply Theme"
msgstr ""
@@ -1001,9 +1004,15 @@ msgstr ""
msgid "Install"
msgstr ""
msgid "Open Game"
msgstr ""
msgid "Reinstall"
msgstr ""
msgid "Game not found."
msgstr ""
msgid "Stop Log"
msgstr ""
@@ -478,6 +478,9 @@ msgstr ""
msgid "Brief"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Time Detail Level:"
msgstr ""
@@ -505,9 +508,6 @@ msgstr ""
msgid "Compact"
msgstr ""
msgid "Hidden"
msgstr ""
msgid "Badge View Type:"
msgstr ""
@@ -517,6 +517,12 @@ msgstr ""
msgid "Tray Menu Type:"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Gamepad Type:"
msgstr ""
msgid "Launch Application in Fullscreen"
msgstr ""
@@ -622,9 +628,6 @@ msgstr ""
msgid "Light"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Apply Theme"
msgstr ""
@@ -1002,9 +1005,15 @@ msgstr ""
msgid "Install"
msgstr ""
msgid "Open Game"
msgstr ""
msgid "Reinstall"
msgstr ""
msgid "Game not found."
msgstr ""
msgid "Stop Log"
msgstr ""
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2026-03-22 13:50+0500\n"
"PO-Revision-Date: 2026-05-26 06:33+0000\n"
"PO-Revision-Date: 2026-05-29 13:53+0000\n"
"Last-Translator: Boria138 <boria138@noreply.codeberg.org>\n"
"Language-Team: Russian <https://translate.codeberg.org/projects/portprotonqt/"
"portprotonqt/ru/>\n"
@@ -491,6 +491,9 @@ msgstr "Детальный"
msgid "Brief"
msgstr "Упрощённый"
msgid "Hidden"
msgstr "Скрытый"
msgid "Time Detail Level:"
msgstr "Уровень детализации вывода времени:"
@@ -518,9 +521,6 @@ msgstr "Фильтр:"
msgid "Compact"
msgstr "Компактный"
msgid "Hidden"
msgstr "Скрытый"
msgid "Badge View Type:"
msgstr "Тип отображения бейджей:"
@@ -530,6 +530,12 @@ msgstr "Настройки интерфейса"
msgid "Tray Menu Type:"
msgstr "Тип области уведомления:"
msgid "Auto"
msgstr "Авто"
msgid "Gamepad Type:"
msgstr "Тип геймпада:"
msgid "Launch Application in Fullscreen"
msgstr "Запуск приложения в полноэкранном режиме"
@@ -636,9 +642,6 @@ msgstr "Тёмная"
msgid "Light"
msgstr "Светлая"
msgid "Auto"
msgstr "Авто"
msgid "Apply Theme"
msgstr "Применить тему"
@@ -1071,9 +1074,15 @@ msgstr "Создать лог"
msgid "Install"
msgstr "Установить"
msgid "Open Game"
msgstr "Открыть игру"
msgid "Reinstall"
msgstr "Переустановить"
msgid "Game not found."
msgstr "Игра не найдена"
msgid "Stop Log"
msgstr "Остановить лог"
@@ -484,6 +484,9 @@ msgstr "详细"
msgid "Brief"
msgstr "简要"
msgid "Hidden"
msgstr "隐藏"
msgid "Time Detail Level:"
msgstr "时间详细程度:"
@@ -513,9 +516,6 @@ msgstr "游戏显示筛选:"
msgid "Compact"
msgstr "紧凑"
msgid "Hidden"
msgstr "隐藏"
msgid "Badge View Type:"
msgstr "徽章视图类型:"
@@ -525,6 +525,13 @@ msgstr "界面设置"
msgid "Tray Menu Type:"
msgstr "托盘菜单类型:"
msgid "Auto"
msgstr "自动"
#, fuzzy
msgid "Gamepad Type:"
msgstr "游戏手柄"
msgid "Launch Application in Fullscreen"
msgstr "全屏启动应用程序"
@@ -630,9 +637,6 @@ msgstr "深色"
msgid "Light"
msgstr "浅色"
msgid "Auto"
msgstr "自动"
msgid "Apply Theme"
msgstr "应用主题"
@@ -1051,9 +1055,17 @@ msgstr "创建日志"
msgid "Install"
msgstr "安装"
#, fuzzy
msgid "Open Game"
msgstr "停止游戏"
msgid "Reinstall"
msgstr "重新安装"
#, fuzzy
msgid "Game not found."
msgstr "未找到前缀"
msgid "Stop Log"
msgstr "停止日志"
+70 -9
View File
@@ -26,7 +26,7 @@ from portprotonqt.image_utils import (
load_pixmap_async,
set_all_animated_covers_suspended,
)
from portprotonqt.steam_api import get_steam_game_info_async, get_full_steam_game_info_async, get_cached_steam_game_info, get_steam_installed_games, is_game_in_steam, fetch_sgdb_cover_async, get_steam_compatibilitytools_dir
from portprotonqt.steam_api import get_steam_game_info_async, get_full_steam_game_info_async, get_cached_steam_game_info, get_steam_installed_games, is_game_in_steam, fetch_sgdb_cover_async, get_steam_compatibilitytools_dir, get_steam_launch_commands
from portprotonqt.theme_manager import ThemeManager, load_theme_screenshots
from portprotonqt.time_utils import save_last_launch, get_last_launch, get_playtime_for_exe, format_playtime, get_last_launch_timestamp, format_last_launch
from portprotonqt.config import (
@@ -35,6 +35,7 @@ from portprotonqt.config import (
parse_desktop_entry,
load_theme_metainfo,
game_config,
gamepad_config,
favorites_config,
proxy_config,
display_config,
@@ -67,7 +68,7 @@ from portprotonqt.virtual_keyboard import VirtualKeyboard
from portprotonqt.disc_image_utils import DiscImageManager
from portprotonqt.dialogs.proton_manager import show_proton_manager
from portprotonqt.dialogs.prefix_backup import PrefixBackupDialog, PrefixBackupJob, PrefixBackupThread
from portprotonqt.scripts_utils.prefix_backup import is_legacy_squashfs_backup
from portprotonqt.scripts_utils.prefix_backup import BACKUP_EXTENSION, is_legacy_squashfs_backup
from portprotonqt.tabs.control_hints import MainWindowControlHintsMixin
from portprotonqt.tabs.system_tab import MainWindowSystemTabMixin
from portprotonqt.tabs.workers import MainWindowWorkersMixin
@@ -1339,7 +1340,8 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
def dragEnterEvent(self, event):
if event.mimeData().hasUrls():
for url in event.mimeData().urls():
if url.toLocalFile().lower().endswith(LAUNCH_FILE_EXTENSIONS):
path = url.toLocalFile().lower()
if path.endswith(LAUNCH_FILE_EXTENSIONS) or path.endswith(BACKUP_EXTENSION):
event.acceptProposedAction()
return
event.ignore()
@@ -1347,8 +1349,14 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
def dropEvent(self, event):
for url in event.mimeData().urls():
path = url.toLocalFile()
if path.lower().endswith(LAUNCH_FILE_EXTENSIONS):
path_lower = path.lower()
if path_lower.endswith(BACKUP_EXTENSION):
self._perform_restore(path)
event.acceptProposedAction()
break
if path_lower.endswith(LAUNCH_FILE_EXTENSIONS):
self.openAddGameDialog(path)
event.acceptProposedAction()
break
def openAddGameDialog(self, exe_path=None):
@@ -1663,6 +1671,7 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
card_width=self.auto_card_width,
parent=self.autoInstallContainer,
)
card.autoinstall_exe_name = exe_name
# Hide badges and favorite button
if hasattr(card, 'steamLabel'):
@@ -2297,8 +2306,8 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
Qt.WidgetAttribute.WA_TranslucentBackground
)
self.timeDetailCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.time_keys = ["detailed", "brief"]
self.time_labels = [_("Detailed"), _("Brief")]
self.time_keys = ["detailed", "brief", "hidden"]
self.time_labels = [_("Detailed"), _("Brief"), _("Hidden")]
self.timeDetailCombo.addItems(self.time_labels)
self.timeDetailCombo.setStyleSheet(self.theme.COMBOBOX_STYLE + self.theme.SCROLL_STYLE)
self.timeDetailCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
@@ -2422,6 +2431,31 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
self.trayMenuModeCombo.setCurrentIndex(idx)
uiForm.addRow(self.trayMenuModeTitle, self.trayMenuModeCombo)
self.gamepad_type_keys = ["auto", "xbox", "playstation"]
self.gamepad_type_labels = [_("Auto"), "Xbox", "PlayStation"]
self.gamepadTypeCombo = QComboBox()
self.gamepadTypeCombo.view().window().setWindowFlags(
Qt.WindowType.Popup | Qt.WindowType.FramelessWindowHint
)
self.gamepadTypeCombo.view().window().setAttribute(
Qt.WidgetAttribute.WA_TranslucentBackground
)
self.gamepadTypeCombo.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.gamepadTypeCombo.addItems(self.gamepad_type_labels)
self.gamepadTypeCombo.setStyleSheet(self.theme.COMBOBOX_STYLE + self.theme.SCROLL_STYLE)
self.gamepadTypeCombo.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
self.gamepadTypeTitle = QLabel(_("Gamepad Type:"))
self.gamepadTypeTitle.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
self.gamepadTypeTitle.setStyleSheet(self.theme.SETTINGS_TITLE_STYLE)
self.gamepadTypeTitle.setFocusPolicy(Qt.FocusPolicy.NoFocus)
current_gamepad_type = gamepad_config.get_gamepad_type()
try:
idx = self.gamepad_type_keys.index(current_gamepad_type)
except ValueError:
idx = 0
self.gamepadTypeCombo.setCurrentIndex(idx)
uiForm.addRow(self.gamepadTypeTitle, self.gamepadTypeCombo)
self.fullscreenCheckBox = QCheckBox()
self.fullscreenCheckBox.setStyleSheet(self.theme.CHECKBOX_STYLE)
self.fullscreenCheckBox.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
@@ -2448,7 +2482,7 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
current_auto_fullscreen = display_config.get_auto_fullscreen_gamepad()
self.autoFullscreenGamepadCheckBox.setChecked(current_auto_fullscreen)
auto_fullscreen_layout = QHBoxLayout()
auto_fullscreen_layout.setContentsMargins(self.theme.portProtonPageHorizontalSpacing, 0, 0, 0)
auto_fullscreen_layout.setContentsMargins(0, 0, 0, 0)
auto_fullscreen_layout.addWidget(self.autoFullscreenGamepadCheckBox)
auto_fullscreen_layout.addWidget(self.autoFullscreenGamepadTitle)
auto_fullscreen_layout.addStretch()
@@ -2843,6 +2877,10 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
auto_fullscreen_gamepad = self.autoFullscreenGamepadCheckBox.isChecked()
display_config.set_auto_fullscreen_gamepad(auto_fullscreen_gamepad)
gamepad_type_idx = self.gamepadTypeCombo.currentIndex()
gamepad_type = self.gamepad_type_keys[gamepad_type_idx]
gamepad_config.set_gamepad_type(gamepad_type)
autostart_enabled = self.autostartCheckBox.isChecked()
display_config.set_autostart_enabled(autostart_enabled)
if not apply_xdg_autostart(autostart_enabled):
@@ -2888,6 +2926,7 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
hide_autoinstall = self.hideAutoInstallTabCheckBox.isChecked()
if hasattr(self, 'input_manager'):
self._apply_gamepad_type_setting()
self.updateControlHints()
if hasattr(self, 'keyboard'):
self.keyboard.update_keyboard()
@@ -2969,6 +3008,13 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
# Save the hide auto-install tab setting to config
ui_config.set_hide_autoinstall_tab(hide_autoinstall)
def _apply_gamepad_type_setting(self) -> None:
"""Apply configured gamepad type to current input manager."""
input_manager = getattr(self, "input_manager", None)
if input_manager is None:
return
input_manager.apply_gamepad_type_setting()
def createThemeTab(self):
"""Themes tab"""
self.themeTabWidget = QWidget()
@@ -3744,11 +3790,26 @@ class MainWindow(MainWindowControlHintsMixin, MainWindowSystemTabMixin, MainWind
return str(game[0])
return ""
def _launch_steam_game(self, exec_line: str) -> None:
appid = exec_line.rsplit("/", 1)[-1]
if not appid.isdigit():
logger.warning("Invalid Steam URI: %s", exec_line)
return
for command in get_steam_launch_commands(appid):
try:
subprocess.Popen(command)
return
except OSError as e:
logger.warning("Failed to launch Steam app %s with %s: %s", appid, command[0], e)
if not QDesktopServices.openUrl(QUrl(exec_line)):
logger.warning("Failed to open Steam URI: %s", exec_line)
def toggleGame(self, exec_line, button=None, game_name=None):
# Handle Steam games
if exec_line.startswith("steam://"):
url = QUrl(exec_line)
QDesktopServices.openUrl(url)
self._launch_steam_game(exec_line)
return
# Handle PortProton games
+2 -1
View File
@@ -124,6 +124,7 @@ install_data(
'scripts_utils/dbus_tools.py',
'scripts_utils/easyterm.py',
'scripts_utils/idle_inhibit.py',
'scripts_utils/mount_points.py',
'scripts_utils/prefix_backup.py',
'scripts_utils/power_profiles.py',
'scripts_utils/shortcut_tools.py',
@@ -165,7 +166,7 @@ install_subdir(
# Compile and install locales from .po files
msgfmt = find_program('msgfmt', required: true)
foreach lang : ['de', 'es', 'pt', 'ru', 'zh_CN']
foreach lang : ['be', 'de', 'es', 'pt', 'ru', 'zh_CN']
mo_target = configure_file(
input: 'locales' / lang / 'LC_MESSAGES' / 'portprotonqt.po',
output: lang + '_portprotonqt.mo',
+3 -1
View File
@@ -43,9 +43,11 @@ CONF_RENDER_INTERVAL_MS = 16
XDG_DATA_HOME = os.getenv(
"XDG_DATA_HOME", os.path.join(os.path.expanduser("~"), ".local", "share")
)
PACKAGE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SCHEME_DIRS = [
os.path.join(XDG_DATA_HOME, "PortProtonQt", "terminal_schemes"),
os.path.join(os.path.dirname(os.path.abspath(__file__)), "terminal_schemes"),
os.path.join(PACKAGE_DIR, "terminal_schemes"),
]
@@ -0,0 +1,89 @@
"""Print mounted drive paths for PortProton scripts."""
import os
import re
import sys
from portprotonqt.logger import get_logger
logger = get_logger(__name__)
MOUNT_PARENT_PATHS = ("/run/media/", "/media/", "/mnt/")
MOUNT_ROOT_PATHS = {"/media", "/mnt", "/run/media"}
NETWORK_MOUNT_TYPES = {"cifs", "nfs", "nfs4", "smb3", "smbfs"}
VIRTUAL_MOUNT_TYPES = {"autofs"}
MOUNT_ESCAPE_PATTERN = re.compile(r"\\([0-7]{3})")
def list_mounted_drive_paths(mounts_path: str = "/proc/mounts") -> list[str]:
"""Return local mounted drive paths available to the user."""
try:
mounts = _read_mounts(mounts_path)
mounted_drives = set()
for source, mount_point, fs_type in mounts:
if fs_type in VIRTUAL_MOUNT_TYPES:
continue
if _is_network_mount(source, fs_type):
continue
if not _is_block_device_source(source):
continue
if not _is_local_drive_mount(mount_point):
continue
if os.path.isdir(mount_point) and os.access(mount_point, os.R_OK):
mounted_drives.add(mount_point)
except OSError as error:
logger.error("Error retrieving mounted drives: %s", error)
return []
return sorted(mounted_drives)
def _read_mounts(mounts_path: str) -> list[tuple[str, str, str]]:
mounts = []
with open(mounts_path) as mounts_file:
for line in mounts_file:
parts = line.strip().split()
if len(parts) < 3:
continue
mounts.append((
_decode_mount_field(parts[0]),
_decode_mount_field(parts[1]),
parts[2],
))
return mounts
def _decode_mount_field(value: str) -> str:
return MOUNT_ESCAPE_PATTERN.sub(
lambda match: chr(int(match.group(1), 8)),
value,
)
def _is_network_mount(source: str, fs_type: str) -> bool:
return (
fs_type in NETWORK_MOUNT_TYPES
or source.startswith(("//", "\\\\"))
or (":/" in source and not source.startswith("/"))
)
def _is_block_device_source(source: str) -> bool:
return source.startswith("/dev/")
def _is_local_drive_mount(mount_point: str) -> bool:
if mount_point == "/" or mount_point in MOUNT_ROOT_PATHS:
return False
return mount_point.startswith(MOUNT_PARENT_PATHS)
def main() -> int:
paths = list_mounted_drive_paths()
if paths:
sys.stdout.write("\n".join(paths) + "\n")
return 0
if __name__ == "__main__":
sys.exit(main())
+2
View File
@@ -4,6 +4,7 @@ from portprotonqt.steam_api.utils import (
safe_vdf_load,
decode_text,
get_steam_home,
get_steam_launch_commands,
get_steam_compatibilitytools_dir,
get_steam_compat_tool,
get_steam_libs,
@@ -55,6 +56,7 @@ __all__ = [
"safe_vdf_load",
"decode_text",
"get_steam_home",
"get_steam_launch_commands",
"get_steam_compatibilitytools_dir",
"get_steam_compat_tool",
"get_steam_libs",
+5 -5
View File
@@ -530,12 +530,12 @@ def get_steam_game_info_async(
is_autoinstall = exec_line.startswith("autoinstall:")
if game_exe.lower().endswith('.bat'):
if game_exe.lower().endswith(('.bat', '.cmd')):
if os.path.exists(game_exe):
try:
with open(game_exe, encoding='utf-8') as f:
bat_lines = f.readlines()
for line in bat_lines:
cmd_lines = f.readlines()
for line in cmd_lines:
line = line.strip()
if '.exe' in line.lower():
tokens = shlex.split(line)
@@ -546,9 +546,9 @@ def get_steam_game_info_async(
if game_exe.lower().endswith('.exe'):
break
except Exception as e:
logger.error("Failed to process bat file %s: %s", game_exe, e)
logger.error("Failed to process command file %s: %s", game_exe, e)
else:
logger.error("Bat file not found: %s", game_exe)
logger.error("Command file not found: %s", game_exe)
if not game_exe.lower().endswith('.exe'):
logger.error("Invalid executable path: %s. Expected .exe", game_exe)
+53 -9
View File
@@ -1,6 +1,7 @@
"""Utility functions for Steam API module."""
import os
import shutil
from pathlib import Path
from PIL import Image, UnidentifiedImageError
@@ -12,7 +13,7 @@ from portprotonqt.image_utils import COVER_IMAGE_EXTENSIONS
logger = get_logger(__name__)
STEAM_DATA_DIRS = (
"~/.local/share/Steam",
"~/.steam/steam",
"~/snap/steam/common/.local/share/Steam",
"~/.var/app/com.valvesoftware.Steam/data/Steam",
"/usr/share/steam",
@@ -54,15 +55,61 @@ def decode_text(text: str) -> str:
return html.unescape(text)
def get_steam_home() -> Path | None:
"""Return path to Steam directory."""
def _iter_existing_steam_data_dirs() -> list[Path]:
"""Return existing Steam data dirs with symlinks resolved."""
steam_dirs = []
seen_dirs = set()
for dir_path in STEAM_DATA_DIRS:
expanded_path = Path(os.path.expanduser(dir_path))
if expanded_path.exists():
return expanded_path
if not expanded_path.exists():
continue
try:
steam_path = expanded_path.resolve()
except (OSError, RuntimeError) as e:
logger.debug("Failed to resolve Steam directory %s: %s", expanded_path, e)
steam_path = expanded_path
if steam_path in seen_dirs:
continue
seen_dirs.add(steam_path)
steam_dirs.append(steam_path)
return steam_dirs
def get_steam_home() -> Path | None:
"""Return path to Steam directory."""
for steam_path in _iter_existing_steam_data_dirs():
return steam_path
return None
def get_steam_launch_commands(appid: str) -> list[list[str]]:
"""Return Steam launch commands based on detected Steam data dir."""
steam_home = get_steam_home()
if steam_home is None:
return []
steam_home_str = str(steam_home)
if "/.var/app/com.valvesoftware.Steam/" in steam_home_str:
flatpak_cmd = shutil.which("flatpak")
if flatpak_cmd:
return [[flatpak_cmd, "run", "com.valvesoftware.Steam", "-applaunch", appid]]
return []
if "/snap/steam/" in steam_home_str:
steam_cmd = shutil.which("steam")
if steam_cmd:
return [[steam_cmd, "-applaunch", appid]]
snap_cmd = shutil.which("snap")
if snap_cmd:
return [[snap_cmd, "run", "steam", "-applaunch", appid]]
return []
steam_cmd = shutil.which("steam")
if steam_cmd:
return [[steam_cmd, "-applaunch", appid]]
return []
def get_steam_compatibilitytools_dir() -> Path | None:
"""Return writable Steam compatibility tools directory."""
steam_home = get_steam_home()
@@ -249,10 +296,7 @@ def _is_steam_proton_dir(path: Path) -> bool:
def get_steam_proton_versions() -> list[str]:
"""Return Steam Proton install directories usable by PortProton."""
roots = set()
steam_homes = [Path(os.path.expanduser(path)) for path in STEAM_DATA_DIRS]
for steam_home in steam_homes:
if not steam_home.exists():
continue
for steam_home in _iter_existing_steam_data_dirs():
roots.add(steam_home / "compatibilitytools.d")
for steam_lib in get_steam_libs(steam_home):
roots.add(steam_lib / "steamapps" / "common")