Compare commits

..
2 Commits
Author SHA1 Message Date
Boria138 c02366d76a bump to v1.3.2
Build AppImage, Arch, Fedora and Debian Packages / Build AppImage (push) Successful in 4m27s
Build AppImage, Arch, Fedora and Debian Packages / Build Arch Package (push) Successful in 1m39s
Build AppImage, Arch, Fedora and Debian Packages / Build Fedora RPM (42) (push) Successful in 4m32s
Build AppImage, Arch, Fedora and Debian Packages / Build Fedora RPM (43) (push) Successful in 1m2s
Build AppImage, Arch, Fedora and Debian Packages / Build Fedora RPM (44) (push) Successful in 1m23s
Build AppImage, Arch, Fedora and Debian Packages / Build Fedora RPM (rawhide) (push) Successful in 2m49s
Build AppImage, Arch, Fedora and Debian Packages / Build Debian Package (push) Successful in 2m26s
Build AppImage, Arch, Fedora and Debian Packages / Create and Publish Release (push) Successful in 30s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-08-10 22:03:44 +05:00
Boria138 742e4e646c fix: detect Steam user without MostRecent flag
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2026-08-10 22:01:55 +05:00
13 changed files with 116 additions and 19 deletions

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ on:
env:
# Common version, will be used for tagging the release
VERSION: 1.3.1
VERSION: 1.3.2
PKGDEST: "/tmp/portprotonqt"
PACKAGE: "portprotonqt"
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
+7
View File
@@ -3,6 +3,13 @@
Все заметные изменения в этом проекте фиксируются в этом файле.
Формат основан на [Keep a Changelog](https://keepachangelog.com/) и придерживается принципов [Semantic Versioning](https://semver.org/).
## [1.3.2] - 2026-08-10
### Fixed
- Исправлено определение SteamID по `AutoLogin` или единственному профилю `userdata`, если в `loginusers.vdf` отсутствует `MostRecent`
---
## [1.3.1] - 2026-07-18
### Fixed
+1 -1
View File
@@ -1,5 +1,5 @@
pkgname=('portprotonqt')
pkgver=1.3.1
pkgver=1.3.2
pkgrel=1
pkgdesc="Modern GUI for managing and launching games from PortProton and Steam"
arch=('any')
+1 -1
View File
@@ -1,5 +1,5 @@
%global pypi_name portprotonqt
%global pypi_version 1.3.1
%global pypi_version 1.3.2
%global oname PortProtonQt
%global build_timestamp %(date +"%Y%m%d")
%global _python_no_extras_requires 1
+1 -1
View File
@@ -1,5 +1,5 @@
%global pypi_name portprotonqt
%global pypi_version 1.3.1
%global pypi_version 1.3.2
%global oname PortProtonQt
%global _python_no_extras_requires 1
@@ -24,9 +24,12 @@
</developer>
<releases>
<release version="1.3.1" date="2026-07-17">
<release version="1.3.2" date="2026-08-10">
<description></description>
</release>
<release version="1.3.1" date="2026-07-17">
<description/>
</release>
<release version="1.3.0" date="2026-07-13">
<description/>
</release>
+6
View File
@@ -1,3 +1,9 @@
portprotonqt (1.3.2) unstable; urgency=medium
* New upstream release.
-- Ivan Mazhukin <vanyamajukin@outlook.com> Mon, 10 Aug 2026 22:02:11 +0500
portprotonqt (1.3.1) unstable; urgency=medium
* New upstream release.
+1 -1
View File
@@ -1,5 +1,5 @@
project('portprotonqt', 'c',
version: '1.3.1',
version: '1.3.2',
meson_version: '>= 0.61.2',
license: 'GPL-3.0',
)
+1 -1
View File
@@ -18,7 +18,7 @@ try:
APP_VERSION = version_module.APP_VERSION
except ImportError:
APP_COMMIT = ""
APP_VERSION = "1.3.1"
APP_VERSION = "1.3.2"
__app_version__ = os.environ.get("PORTPROTONQT_VERSION", APP_VERSION)
+32 -10
View File
@@ -23,6 +23,7 @@ STEAM_DATA_DIRS = (
APPINFO_MAGIC_V40 = 0x07564428
APPINFO_MAGIC_V41 = 0x07564429
APPINFO_ENTRY_METADATA_SIZE = 60
STEAM_ID64_INDIVIDUAL_BASE = 76561197960265728
def safe_vdf_load(path: str | Path) -> dict:
@@ -254,18 +255,39 @@ def get_last_steam_user(steam_home: Path) -> dict | None:
"""Return data for last Steam user from loginusers.vdf."""
loginusers_path = steam_home / "config/loginusers.vdf"
data = safe_vdf_load(loginusers_path)
if not data:
return None
users = data.get('users', {})
users = data.get('users', {}) if data else {}
selected_user_id = None
for user_id, user_info in users.items():
if user_info.get('MostRecent') == '1':
try:
return {'SteamID': int(user_id)}
except ValueError:
logger.error(f"Invalid SteamID format: {user_id}")
return None
logger.info("No user found with MostRecent=1")
return None
selected_user_id = user_id
break
if selected_user_id is None and user_info.get('AutoLogin') == '1':
selected_user_id = user_id
if selected_user_id is None:
userdata_dir = steam_home / "userdata"
try:
candidates = [
entry for entry in userdata_dir.iterdir()
if entry.name.isdigit()
and entry.name != '0'
and not entry.is_symlink()
and entry.is_dir()
and (entry / "config/localconfig.vdf").is_file()
]
except OSError as e:
logger.info("Could not inspect Steam userdata: %s", e)
return None
if len(candidates) != 1:
logger.info("No unambiguous Steam userdata profile found")
return None
selected_user_id = str(
STEAM_ID64_INDIVIDUAL_BASE + int(candidates[0].name)
)
try:
return {'SteamID': int(selected_user_id)}
except ValueError:
logger.error(f"Invalid SteamID format: {selected_user_id}")
return None
def convert_steam_id(steam_id: int) -> int:
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "portprotonqt"
version = "1.3.1"
version = "1.3.2"
description = "A project to rewrite PortProton (PortWINE) using PySide"
requires-python = ">=3.10"
readme = "README.md"
+59
View File
@@ -6,6 +6,7 @@ from unittest.mock import patch
from portprotonqt.steam_api.utils import (
APPINFO_ENTRY_METADATA_SIZE,
APPINFO_MAGIC_V41,
STEAM_ID64_INDIVIDUAL_BASE,
normalize_name,
is_valid_candidate,
filter_candidates,
@@ -16,6 +17,7 @@ from portprotonqt.steam_api.utils import (
get_steam_launch_commands,
get_steam_compatibilitytools_dir,
get_steam_compat_tool,
get_last_steam_user,
get_local_steam_cover,
get_steam_installed_games,
_iter_existing_steam_data_dirs,
@@ -305,6 +307,63 @@ class TestConvertSteamId:
assert convert_steam_id(0) == 0
def test_get_last_steam_user_falls_back_to_autologin(tmp_path: Path):
config_dir = tmp_path / "config"
config_dir.mkdir()
(config_dir / "loginusers.vdf").write_text(
'"users"\n{\n'
' "76561198012003723"\n'
' {\n'
' "AccountName" "x"\n'
' "AutoLogin" "1"\n'
' }\n'
'}\n',
encoding="utf-8",
)
assert get_last_steam_user(tmp_path) == {"SteamID": 76561198012003723}
def test_get_last_steam_user_ignores_allow_autologin(tmp_path: Path):
config_dir = tmp_path / "config"
config_dir.mkdir()
(config_dir / "loginusers.vdf").write_text(
'"users"\n{\n'
' "76561198012003723"\n'
' {\n'
' "AllowAutoLogin" "1"\n'
' }\n'
'}\n',
encoding="utf-8",
)
assert get_last_steam_user(tmp_path) is None
def test_get_last_steam_user_falls_back_to_only_userdata(tmp_path: Path):
account_id = 51737995
localconfig = (
tmp_path / "userdata" / str(account_id) / "config/localconfig.vdf"
)
localconfig.parent.mkdir(parents=True)
localconfig.write_text('"UserLocalConfigStore"\n{\n}\n', encoding="utf-8")
assert get_last_steam_user(tmp_path) == {
"SteamID": STEAM_ID64_INDIVIDUAL_BASE + account_id
}
def test_get_last_steam_user_rejects_multiple_userdata(tmp_path: Path):
for account_id in (51737995, 51737996):
localconfig = (
tmp_path / "userdata" / str(account_id) / "config/localconfig.vdf"
)
localconfig.parent.mkdir(parents=True)
localconfig.touch()
assert get_last_steam_user(tmp_path) is None
class TestDecodeText:
def test_html_entities(self):
assert decode_text("&amp;") == "&"
Generated
+1 -1
View File
@@ -492,7 +492,7 @@ wheels = [
[[package]]
name = "portprotonqt"
version = "1.3.1"
version = "1.3.2"
source = { editable = "." }
dependencies = [
{ name = "babel" },