Commit cc7f5c32 authored by fidel's avatar fidel

Scripts version 2124

parent a2b53850
......@@ -2,6 +2,11 @@ You can help us in the development of the project on the website: boosty.to/port
-----------------------------------------
Changelog:
###Scripts version 2124###
* updated "PROTON_GE" to version 7-29
* updated "PROTON_STEAM" to version 7.0-4
* updated pp-games-lib plugin
###Scripts version 2123###
* HOTFIX - GALLIUM NINE mode
......
......@@ -2,6 +2,11 @@
-----------------------------------------
История изменений:
###Scripts version 2124###
* обновлен "PROTON_GE" до версии 7-29
* обновлен "PROTON_STEAM" до версии 7.0-4
* обновлен плагин pp-games-lib
###Scripts version 2123###
* HOTFIX - скачивание PROTON GE при использовании режжима GALLIUM NINE
* добавлена русификация CREDITS (Авторы и спасибы) - спасибо chal55rus
......
......@@ -4,7 +4,7 @@ import os
import re
import shlex
import shutil
from configparser import ConfigParser
from configparser import RawConfigParser
from pathlib import Path
from subprocess import run
from types import SimpleNamespace
......@@ -13,9 +13,9 @@ try:
from PyQt6.QtGui import * # type: ignore
from PyQt6.QtWidgets import * # type: ignore
except ModuleNotFoundError:
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import * # type: ignore
from PyQt5.QtGui import * # type: ignore
from PyQt5.QtWidgets import * # type: ignore
settings = QSettings('PPGL', 'PortProtonGamesLib')
g = SimpleNamespace(locale = '')
......@@ -29,7 +29,7 @@ class MainWindow(QMainWindow):
if geometry:
self.restoreGeometry(geometry)
shortcut = ConfigParser()
shortcut = RawConfigParser()
shortcut.read(os.getenv('HOME') + '/.local/share/applications/PortProton.desktop')
scripts_dir = shortcut.get('Desktop Entry', 'Path', fallback=os.getenv('HOME') + '/.local/share/PortWINE/PortProton/data/scripts')
if not scripts_dir or not Path(scripts_dir).is_dir():
......@@ -288,20 +288,14 @@ class GameList(QListWidget):
def reload(self):
self.clear()
def validate(shortcut):
config = ConfigParser()
config.read(shortcut)
try:
if config.get('Desktop Entry', 'Exec'):
return True
except Exception:
return False
shortcuts = list(Path(g.shortcuts_dir).glob('*.desktop'))
shortcuts += list(Path(g.base_dir).glob('*.desktop'))
for shortcut in shortcuts:
if validate(shortcut):
try:
item = GameItem(self, shortcut)
self.addItem(item)
except Exception:
pass
self.sortItems()
self.setCurrentIndex(QModelIndex())
......@@ -375,11 +369,21 @@ def human_size(num):
class GameItem(QListWidgetItem):
def __init__(self, parent, desktop_file):
super().__init__(parent)
self.desktop_file = desktop_file
self.config = ConfigParser()
self.config = RawConfigParser()
self.config.read(desktop_file)
text = self.get('Name', Path(desktop_file).stem)
if not self.get('Exec') or text == 'PortProton':
raise Exception('Validation fail')
self.game_dir = shlex.split(self.get('Exec'))[-1]
if self.game_dir.startswith(g.games_dir):
self.game_dir = g.games_dir + '/' + self.game_dir[len(g.games_dir)+1:].split('/')[0]
else:
self.game_dir = str(Path(self.game_dir).parent)
if self.game_dir == '.':
raise Exception('Can not determine game dir')
super().__init__(parent)
self.setToolTip(text)
self.setText(text)
icon_path = self.get('Icon') if Path(self.get('Icon')).exists() else g.pp_icon
......@@ -387,11 +391,7 @@ class GameItem(QListWidgetItem):
self.setIcon(qicon)
self.setTextAlignment(Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignTop)
self.setSizeHint(QSize(100, 105))
self.game_dir = shlex.split(self.get('Exec'))[-1]
if self.game_dir.startswith(g.games_dir):
self.game_dir = g.games_dir + '/' + self.game_dir[len(g.games_dir)+1:].split('/')[0]
else:
self.game_dir = str(Path(self.game_dir).parent)
self._set_dir_size(None)
dir_size_cache = self.game_dir + '/.size'
if Path(dir_size_cache).exists():
......@@ -400,7 +400,7 @@ class GameItem(QListWidgetItem):
def calc_dir_size():
if not Path(self.game_dir).exists():
return
dir_size = sum(p.stat().st_size for p in Path(self.game_dir).rglob('*'))
dir_size = sum(p.stat(follow_symlinks=False).st_size for p in Path(self.game_dir).rglob('*'))
self._set_dir_size(dir_size)
Path(dir_size_cache).write_text(str(dir_size))
thread = QThread(parent)
......
......@@ -28,6 +28,6 @@ export PW_WINEDBG_DISABLE=1
export PW_USE_GAMEMODE=0 # Force disabele gamemod
#export PW_FORCE_LARGE_ADDRESS_AWARE=0 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
#export PULSE_LATENCY_MSEC=60
export PW_DLL_INSTALL="mfc42 vcrun2012 mfc120 vcrun2013"
export PW_DLL_INSTALL="mfc42 vcrun6sp6 vcrun2012 mfc120 mfc140 vcrun2013"
#export LAUNCH_PARAMETERS="-d3d9"
#export PW_WINDOWS_VER=XP # Set windows version 10, 7 or XP
......@@ -469,7 +469,6 @@ start_portwine () {
export WINE_FULLSCREEN_FSR=1
export WINE_FULLSCREEN_FSR_STRENGTH=0
export WINE_FULLSCREEN_INTEGER_SCALING=0
# export WINE_FULLSCREEN_FAKE_CURRENT_RES=1920x1080
else
export WINE_FULLSCREEN_FSR=0
unset WINE_FULLSCREEN_FAKE_CURRENT_RES WINE_FULLSCREEN_FSR_STRENGTH WINE_FULLSCREEN_INTEGER_SCALING
......
#!/usr/bin/env bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2123
#SCRIPTS_NEXT_VERSION=2124
########################################################################
export PW_MANGOHUD=0
export MANGOHUD_CONFIG=cpu_stats,cpu_temp,cpu_mhz,cpu_color=2e97cb,cpu_text=CPU,gpu_stats,gpu_temp,gpu_core_clock,gpu_mem_clock,vulkan_driver,gpu_name,gpu_color=2e9762,gpu_text=GPU,vram,vram_color=ad64c1,ram,ram_color=c26693,io_color=a491d3,frame_timing=1,frametime_color=00ff00,time,arch,wine,wine_color=eb5b5b,engine_color=eb5b5b,background_alpha=0.2,font_size=24,background_color=020202,text_color=ffffff,toggle_hud=Shift_R+F12,resolution,vkbasalt
......@@ -35,10 +35,10 @@ export PW_FORCE_LARGE_ADDRESS_AWARE="1"
export PW_WINE_USE="PROTON_GE"
export PW_PLUGINS_VER="_v5"
###WINE_PROTON_STEAM###
export PW_STEAM_VER="7.0-3"
export PW_STEAM_VER="7.0-4"
export PW_PROTON_STEAM_VER="PROTON_STEAM_${PW_STEAM_VER}"
###WINE_PROTON_GE###
export PW_GE_VER="7-26"
export PW_GE_VER="7-29"
export PW_PROTON_GE_VER="PROTON_GE_${PW_GE_VER}"
export PW_WINE_FULLSCREEN_FSR="0"
###WINE_PROTON_PW_FOR_GALLIUM_NINE###
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment