Commit 8b442cf9 authored by fidel's avatar fidel

Scripts version 2122

parent 9e07d5bc
......@@ -2,6 +2,15 @@ You can help us in the development of the project on the website: boosty.to/port
-----------------------------------------
Changelog:
###Scripts version 2122###
* added the pp-games-lib plugin to the new PortProton/data/plugins/ details directory on github (plugin author: comrade zorn) https://github.com/zorn-v/PortProton-games-library
* updated scripts for installing and launching League of Legends (updated WINE_LOL_GE_7.0-4 - from now on there is no need to enter the root password to launch League of Legends)
* for GALLIUM_NINE to work, PROTON_GE is used by default
* in GALLIUM_NINE mode, the operation of launchers (such as Epic Games) has been fixed
* for Wargaming Game Center, the startup argument "--disable-gpu" is disabled automatically when using VULKAN mode.
* when using the DOTNET prefix, the black screen display in some applications has been fixed
* added a choice of downloading and automatic installation of WINE versions from Kron4ek
###Scripts version 2121###
* updated "PROTON_GE" to version 7-26
* fixed creation of shortcuts for WGC (to automatically fix existing shortcuts, just run the WGC installer from PortProton)
......
......@@ -2,6 +2,15 @@
-----------------------------------------
История изменений:
###Scripts version 2122###
* добавлен плагин pp-games-lib в новый каталог PortProton/data/plugins/ подробности на github (автор плагина: товарищ zorn) https://github.com/zorn-v/PortProton-games-library
* обновлены срипты установки и запуска League of Legends (обновлен WINE_LOL_GE_7.0-4 - отныне нет необходимости вводить пароль рут для запуска League of Legends)
* для работы GALLIUM_NINE по умолчанию используется PROTON_GE
* в режиме GALLIUM_NINE исправлена работа лаунчеров (таких как Epic Games)
* для Wargaming Game Center аргумент запуска "--disable-gpu" отключаестя автоматически при исползовании режима VULKAN.
* при использовании префикса DOTNET исправлено отображение черного экрана в некоторых приложениях
* добавлен выбор скачивания и автоматической установки версий WINE от Kron4ek
###Scripts version 2121###
* обновлен "PROTON_GE" до версии 7-26
* исправлено создание ярлыков для WGC (для атоматического исправления уже существующих ярлыков, просто запустите установщик WGC из PortProton)
......
#!/usr/bin/env python3
import os
import re
import shlex
import shutil
from configparser import ConfigParser
from pathlib import Path
from subprocess import run
from types import SimpleNamespace
try:
from PyQt6.QtCore import * # type: ignore
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 *
settings = QSettings('PPGL', 'PortProtonGamesLib')
g = SimpleNamespace()
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.resize(QSize(800, 600))
geometry = settings.value('geometry_main')
if geometry:
self.restoreGeometry(geometry)
shortcut = ConfigParser()
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():
QMessageBox.critical(self, 'Error', 'Can not find installed PortProton')
exit(1)
g.scripts_dir = scripts_dir.rstrip('/')
g.pp_icon = shortcut.get('Desktop Entry', 'Icon', fallback='/usr/share/pixmaps/portproton.png')
pp_icon = QIcon(g.pp_icon)
self.setWindowIcon(pp_icon)
self.setWindowTitle('PortProton games library')
g.base_dir = str(Path(scripts_dir + '/../..').resolve())
g.install_pfx = g.base_dir + '/data/prefixes/INSTALL'
g.shortcuts_dir = g.base_dir + '/shortcuts'
g.games_dir = g.base_dir + '/games'
Path(g.shortcuts_dir).mkdir(parents=True, exist_ok=True)
Path(g.games_dir).mkdir(parents=True, exist_ok=True)
sep = QFrame(self)
sep.setFrameShape(QFrame.Shape.VLine)
sep.setFrameShadow(QFrame.Shadow.Sunken)
self._status_size = QLabel(self)
self._status_dir = QLabel(self)
self.statusBar().setVisible(False)
self.statusBar().addWidget(self._status_dir, 1)
self.statusBar().addWidget(sep)
self.statusBar().addWidget(self._status_size)
self.game_list = GameList(self)
self.setCentralWidget(self.game_list)
self.toolbar = self.addToolBar('Main')
self.toolbar.setIconSize(QSize(32, 32))
self.toolbar.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
self.toolbar.setMovable(False)
action = QAction(self.style().standardIcon(QStyle.StandardPixmap.SP_FileDialogNewFolder), 'Install new game', self)
action.triggered.connect(self.install_game)
self.toolbar.addAction(action)
action = QAction(self.style().standardIcon(QStyle.StandardPixmap.SP_FileLinkIcon), 'Add game entry', self)
action.triggered.connect(self.add_game)
self.toolbar.addAction(action)
action = QAction(self.style().standardIcon(QStyle.StandardPixmap.SP_BrowserReload), 'Reload list', self)
action.triggered.connect(self.reload_list)
self.toolbar.addAction(action)
action = QAction(self.style().standardIcon(QStyle.StandardPixmap.SP_TrashIcon), 'Drop install prefix', self)
action.triggered.connect(self.drop_prefix)
self.toolbar.addAction(action)
spacer = QWidget(self)
spacer.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred)
self.toolbar.addWidget(spacer)
action = QAction(pp_icon, 'PortProton', self)
action.triggered.connect(self.run_pp)
self.toolbar.addAction(action)
def install_game(self):
InstallGame(self)
def add_game(self):
InstallGame(self, False)
def reload_list(self):
self.game_list.reload()
def drop_prefix(self):
res = QMessageBox.question(self, 'Are you shure ?', 'Do you really want to remove<br/><b>' + g.install_pfx + '</b> ?')
if res == QMessageBox.StandardButton.Yes:
shutil.rmtree(g.install_pfx, True)
def run_pp(self):
self.setDisabled(True)
app.processEvents()
run([g.scripts_dir + '/start.sh'])
self.setDisabled(False)
def set_status(self, item):
self.statusBar().setVisible(bool(item))
if item:
self._status_size.setText('Size: ' + item.dir_size_human)
self._status_dir.setText(' ' + item.game_dir)
def closeEvent(self, event):
geometry = self.saveGeometry()
settings.setValue('geometry_main', geometry)
super().closeEvent(event)
class LoadListThread(QThread):
completed = pyqtSignal(list)
def __init__(self, parent, install_dir):
super().__init__(parent)
self.install_dir = install_dir
def run(self):
exe_list = list(Path(self.install_dir).glob('**/*.exe'))
self.completed.emit(exe_list)
class InstallGame(QDialog):
def __init__(self, parent, installing=True):
super().__init__(parent)
self._installing = installing
self.install_dir = g.install_pfx + '/drive_c/Games' if installing else g.games_dir
self._exe_list_widget = QListWidget(self)
self._exe_list_widget.setIconSize(QSize(16, 16))
self._exe_list_widget.itemDoubleClicked.connect(self._handleDoubleClick)
layout = QVBoxLayout()
layout.addWidget(self._exe_list_widget)
self._pbar = QProgressBar(self)
self._pbar.setMaximum(0)
layout.addWidget(self._pbar)
thread = LoadListThread(self, self.install_dir)
thread.completed.connect(self.load)
thread.start()
if self._installing:
setup_btn = QPushButton(self)
setup_btn.setIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_FileDialogStart))
setup_btn.setText('Run another setup')
setup_btn.clicked.connect(self._runSetup)
layout.addWidget(setup_btn)
self.setLayout(layout)
self.resize(400, 300)
self.setModal(True)
self.setWindowTitle('Select game exe file')
geometry = settings.value('geometry_install')
if geometry:
self.restoreGeometry(geometry)
self.show()
def load(self, exe_list):
if self._installing and len(exe_list) == 0:
self._runSetup()
exe_list = list(Path(self.install_dir).glob('**/*.exe'))
if len(exe_list) == 0:
return self.close()
def render_list():
pixmap = QPixmap(16, 16)
pixmap.fill(Qt.GlobalColor.transparent)
empty_icon = QIcon(pixmap)
for exe in sorted(exe_list):
ico_file = str(exe) + '.ico'
item = QListWidgetItem(self._exe_list_widget)
item.setText(str(exe)[len(self.install_dir)+1:])
try:
if not Path(ico_file).exists():
run(['wrestool', '-x', '-t14', '-o', ico_file, exe], capture_output=True)
item.setIcon(QIcon(ico_file))
except Exception:
pass
if item.icon().pixmap(16, 16).isNull():
item.setIcon(empty_icon)
self._exe_list_widget.addItem(item)
self._pbar.setVisible(False)
thread = QThread(self)
thread.run = render_list
thread.start()
def _runSetup(self):
downloads_dir = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.DownloadLocation)
exe_file, _ = QFileDialog.getOpenFileName(self, caption='Choose setup file', filter='Exe files (*.exe)', directory=downloads_dir)
if not exe_file:
return
ppdb = shlex.quote(exe_file + '.ppdb')
script = f"""
mkdir -p {shlex.quote(g.install_pfx + '/drive_c/Games')}
echo '
export PW_VULKAN_USE=1
export PW_GUI_DISABLED_CS=1
export PW_PREFIX_NAME=INSTALL
export PW_DLL_INSTALL=mfc42
' > {ppdb}
{shlex.quote(g.scripts_dir + '/start.sh')} {shlex.quote(exe_file)}
rm -f {ppdb}
"""
self.setDisabled(True)
app.processEvents()
run(['bash', '-c', script])
self.setDisabled(False)
def _handleDoubleClick(self, item):
game_dir = item.text().split('/')[0]
dlg = QInputDialog(self)
dlg.setWindowTitle('Please enter game entry name')
dlg.setLabelText('New game entry')
dlg.setTextValue(game_dir)
dlg.resize(300, 0)
ok = dlg.exec()
shortcut_name = dlg.textValue()
if not ok or not shortcut_name:
return
file_name = re.sub(r'[<>:/\\|?*]', '_', shortcut_name)
shortcut = f"{g.shortcuts_dir}/{file_name}.desktop"
if Path(shortcut).exists():
res = QMessageBox.question(self, 'Shortcut already exuists', 'Shortcut <b>' + file_name + '</b> already exists. Overwrite ?')
if res != QMessageBox.StandardButton.Yes:
return
src_dir = self.install_dir + '/' + game_dir
dst_dir = g.games_dir + '/' + game_dir
exe_file = shlex.quote(g.games_dir + '/' + item.text())
ppdb = shlex.quote(g.games_dir + '/' + item.text()) + '.ppdb'
self.setDisabled(True)
if self._installing and Path(dst_dir).exists():
res = QMessageBox.question(self, 'Dir already exuists', 'Dir <b>' + game_dir + '</b> already exists. Overwrite ?')
if res != QMessageBox.StandardButton.Yes:
return
if self._installing:
os.rename(src_dir, dst_dir)
script = f"""
export INSTALLING_PORT=1
export portwine_exe={exe_file}
cd {shlex.quote(g.scripts_dir)}
. {shlex.quote(g.scripts_dir + '/runlib')}
pw_create_gui_png
pw_init_db
[ -f {ppdb} ] && . {ppdb}
echo -e "export PW_VULKAN_USE=${{PW_VULKAN_USE:-1}}\nexport PW_GUI_DISABLED_CS=1" >> {ppdb}
"""
run(['bash', '-c', script])
icon_path = g.base_dir + '/data/img/' + Path(item.text()).stem + '.png'
if not Path(icon_path).exists():
icon_path = g.pp_icon
Path(shortcut).write_text(f"""[Desktop Entry]
Name={shortcut_name}
Exec=env {shlex.quote(g.scripts_dir + '/start.sh')} {exe_file}
Type=Application
Categories=Game
StartupNotify=true
Path={shlex.quote(g.scripts_dir)}
Icon={icon_path}
""", encoding='utf-8')
os.chmod(shortcut, 0o755)
win.reload_list()
self.close()
def closeEvent(self, event):
geometry = self.saveGeometry()
settings.setValue('geometry_install', geometry)
super().closeEvent(event)
class GameList(QListWidget):
def __init__(self, parent):
super().__init__(parent)
self.itemActivated.connect(self.runGame)
self.currentItemChanged.connect(self.selectItem)
self.setViewMode(QListWidget.ViewMode.IconMode)
self.setResizeMode(QListWidget.ResizeMode.Adjust)
self.setIconSize(QSize(64, 64))
self.setWordWrap(True)
self.setSpacing(3)
self.reload()
def reload(self):
self.clear()
shortcuts = list(Path(g.shortcuts_dir).glob('*.desktop'))
for shortcut in shortcuts:
item = GameItem(self, shortcut)
self.addItem(item)
self.sortItems()
self.setCurrentIndex(QModelIndex())
def runGame(self, item):
win.setDisabled(True)
app.processEvents()
run(['bash', '-c', item.get('Exec')])
win.setDisabled(False)
def selectItem(self, item):
win.set_status(item)
def contextMenuEvent(self, event):
selected = self.selectedItems()
if len(selected) == 0:
return
selected = selected[0]
menu = QMenu(self)
desktop = menu.addAction(self.style().standardIcon(QStyle.StandardPixmap.SP_DesktopIcon), 'Add to desktop')
restore_gui = menu.addAction(self.style().standardIcon(QStyle.StandardPixmap.SP_DialogResetButton), 'Restore PP GUI')
remove = menu.addAction(self.style().standardIcon(QStyle.StandardPixmap.SP_TrashIcon), 'Remove game entry')
uninstall = menu.addAction(self.style().standardIcon(QStyle.StandardPixmap.SP_DialogCloseButton), 'Uninstall game')
if not selected.game_dir.startswith(g.games_dir):
uninstall.setVisible(False)
action = menu.exec(self.mapToGlobal(event.pos()))
desktop_shortcut = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.DesktopLocation) + '/' + Path(selected.desktop_file).name
if action == desktop:
if Path(desktop_shortcut).exists():
res = QMessageBox.question(self, 'Shortcut already exuists', 'Desktop shortcut <b>' + desktop_shortcut + '</b> already exists. Overwrite ?')
if res != QMessageBox.StandardButton.Yes:
return
shutil.copy(selected.desktop_file, desktop_shortcut)
if action == restore_gui:
ppdb = shlex.split(selected.get('Exec'))[-1] + '.ppdb'
if not Path(ppdb).exists():
return
with open(ppdb, 'r') as read:
with open(ppdb + '.new', 'w') as write:
while (line := read.readline()):
if 'PW_GUI_DISABLED_CS' not in line:
write.write(line)
os.rename(ppdb + '.new', ppdb)
if action == remove:
Path(desktop_shortcut).unlink(True)
Path(selected.desktop_file).unlink(True)
Path(selected.get('Icon')).unlink(True)
self.reload()
if action == uninstall:
res = QMessageBox.question(self,
'Are you shure ?',
'Do you really want to uninstall <b>' + selected.get('Name') + '</b><br/>located in "<b>'+selected.game_dir+'</b>" ?'
)
if res != QMessageBox.StandardButton.Yes:
return
Path(desktop_shortcut).unlink(True)
Path(selected.desktop_file).unlink(True)
Path(selected.get('Icon')).unlink(True)
if selected.game_dir.startswith(g.games_dir):
shutil.rmtree(selected.game_dir, True)
self.reload()
def human_size(num):
if not num:
return "-"
for unit in ["", "Ki", "Mi", "Gi", "Ti", "Pi", "Ei", "Zi"]:
if abs(num) < 1024.0:
return f"{num:.2f} {unit}B"
num /= 1024.0
return f"{num:.2f} YiB"
class GameItem(QListWidgetItem):
def __init__(self, parent, desktop_file):
super().__init__(parent)
self.desktop_file = desktop_file
self.config = ConfigParser()
self.config.read(desktop_file)
text = self.get('Name', Path(desktop_file).stem)
self.setToolTip(text)
self.setText(text)
icon_path = self.get('Icon') if Path(self.get('Icon')).exists() else g.pp_icon
qicon = QIcon(icon_path)
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():
self._set_dir_size(int(Path(dir_size_cache).read_text()))
else:
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('*'))
self._set_dir_size(dir_size)
Path(dir_size_cache).write_text(str(dir_size))
thread = QThread(parent)
thread.run = calc_dir_size
thread.start()
def get(self, name, fallback=None):
return self.config.get('Desktop Entry', name, fallback=fallback)
def _set_dir_size(self, size):
self.dir_size = size
self.dir_size_human = human_size(size)
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
app = QApplication([])
win = MainWindow()
win.show()
app.exec()
......@@ -31,6 +31,7 @@ RusNor
aldiserg
an9949an
andrey4korop
zorn
" &
"${pw_yad_new}" --plug="${KEY_CREDITS}" --tabnum=3 --text-info --scroll <<< "MIT License
......@@ -172,6 +173,7 @@ ua3dko
vlad petrov
wrager
xpamych
zorn
Александр
Александр Абдулов
Александр Кладов
......
......@@ -12,8 +12,8 @@ export TEXT_OPSSL=""
[[ -z `which openssl` ]] && export TEXT_OPSSL="Install openssl in your system!!!\n"
export PW_COMMENT_DB="${TEXT_OPSSL}Dwnload and start League of Legends can take a long time"
export WINEDLLOVERRIDES="mscoree,mshtml="
# export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live" # Additional launch options
export PW_WINE_USE=WINE_LOL_GE_7.0-2
export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live" # Additional launch options
export PW_WINE_USE=WINE_LOL_GE_7.0-4
export PW_VULKAN_USE=1
export PW_MUST_HAVE_DLL=""
export PW_PREFIX_NAME="LEAGUE_OF_LEGENDS"
......@@ -42,7 +42,7 @@ check_download_wine_ver_for_lol
# check_port_for_lol () {
# "${pw_yad}" --progress --progress-text="Loading and start League of Legends. Please wait. It can take a long time!" \
# --pulsate --no-buttons --undecorated --center --skip-taskbar --image="${PW_GUI_ICON_PATH}/covers/lol_cover.jpg" --image-on-top > /dev/null 2>&1 &
# --pulsate --no-buttons --undecorated --center --skip-taskbar --image="${PW_GUI_ICON_PATH}/covers/lol_cover.jpg" --image-on-top > /dev/null 4>&1 &
# PW_YAD_PID_LOL="$!"
# process=LeagueClientUx.exe
# while [[ -z `pidof ${process}` ]] ; do
......@@ -67,12 +67,13 @@ check_download_wine_ver_for_lol
# }
add_in_start_portwine () {
if [ "$(cat /proc/sys/abi/vsyscall32)" -ne 0 ] ; then
pw_stop_progress_bar
zenity --question --title="Fix for LoL anti-cheat" \
--text='Root rights are required to execute the command: \n"sysctl -w abi.vsyscall32=0"' --no-wrap
[ "$?" = 1 ] && exit 0
pkexec /usr/bin/env bash -c 'sysctl -w abi.vsyscall32=0'
fi
echo ""
# if [ "$(cat /proc/sys/abi/vsyscall32)" -ne 0 ] ; then
# pw_stop_progress_bar
# zenity --question --title="Fix for LoL anti-cheat" \
# --text='Root rights are required to execute the command: \n"sysctl -w abi.vsyscall32=0"' --no-wrap
# [ "$?" = 1 ] && exit 0
# pkexec /usr/bin/env bash -c 'sysctl -w abi.vsyscall32=0'
# fi
# check_port_for_lol &
}
......@@ -3,76 +3,24 @@
#Origin.exe
#Rating=?
#####################examples###########################
##export PW_COMMENT_DB="blablabla"
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
export PW_DLL_INSTALL="vcrun2012 vcrun2019 d3dcompiler_43 d3dcompiler_47 d3dx9" # Install DDL in port prefix (used winetricks)
##export WINEDLLOVERRIDES="blabla=n,b"
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
export PW_DLL_INSTALL="vcrun2012 vcrun2019" # Install DDL in port prefix (used winetricks)
export PW_VULKAN_USE=1 # dxvk, vkd3d or 0 for OpenGL
##export PW_DXVK_VER=1.8.1
##export PW_VKD3D_VER=2.2
##export PW_USE_DXR10=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
export PW_USE_NVAPI_AND_DLSS=0
##export PW_OLD_GL_STRING=0
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_DXGI_FROM_DXVK=0
##export PW_VIRTUAL_DESKTOP=1
##export VKD3D_CONFIG=force_bindless_texel_buffer,multi_queue
##export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
##export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export PW_USE_GAMEMODE=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HEAP_DELAY_FREE=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_LOG=0 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
export STAGING_SHARED_MEMORY=0
#add_in_start_portwine () {
# export PW_USER_TEMP="$WINEPREFIX/drive_c/users/${USER}/Temp"
# if try_download "download.dm.origin.com/origin/live/OriginSetup.exe" "${PW_USER_TEMP}/OriginSetup.exe" ; then
# pw_start_progress_bar_block "Extracting files for update the Origin..."
# unzip "${PW_USER_TEMP}/OriginSetup.exe" 'update/*.zip' -d "${PW_USER_TEMP}/"
# unzip -o "${PW_USER_TEMP}/update/"*.zip -d "$WINEPREFIX/drive_c/Program Files (x86)/Origin/"
# try_remove_dir "${PW_USER_TEMP}/update"
# try_remove_file "${PW_USER_TEMP}/OriginSetup.exe"
# pw_stop_progress_bar
# pw_start_progress_bar_cs "Starting the Origin..."
# check_origin_update () {
# while :
# do
# sleep 3
# if [ ! -z `pgrep Origin.exe | head -n 1` ] ; then
# sleep 1
# else
# if [ ! -z `pgrep OriginSetup* | head -n 1` ] ; then
# kill -n 9 `pgrep OriginSetup* | head -n 1`
# fi
# if [ ! -z `pgrep OriginThin* | head -n 1` ] ; then
# kill -n 9 `pgrep OriginThin* | head -n 1`
# fi
# break
# fi
# done
# }
# check_origin_update &
# fi
#}
###WINE_KRON4EK###
export PW_WINE_USE="WINE-7.13-STAGING-AMD64"
check_download_wine_ver_for_origin () {
if [ ! -d "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}" ] ; then
if try_download "https://github.com/Kron4ek/Wine-Builds/releases/download/7.13/wine-7.13-staging-amd64.tar.xz" \
"${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" ; then
if unpack_tar_xz "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz" "${PORT_WINE_PATH}/data/dist/" ; then
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
UNPACK_STATUS=0
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/${PW_WINE_USE}.tar.xz"
try_remove_dir "${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}"
fi
fi
[[ "${UNPACK_STATUS}" != 0 ]] && exit 1
fi
}
check_download_wine_ver_for_origin
......@@ -7,7 +7,7 @@ export PW_COMMENT_DB="Wargaming Game Center"
################################################
export PW_WINE_USE=PROTON_GE
export PW_VULKAN_USE=1 #dxvk, vkd3d or 0 for OpenGL
export LAUNCH_PARAMETERS="--disable-gpu" # Additional launch options
export LAUNCH_PARAMETERS="" # Additional launch options
#export PW_USE_TERMINAL=1
export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
#export PW_USE_NVAPI_AND_DLSS=0
......@@ -21,4 +21,7 @@ add_in_start_portwine () {
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml" ]] ; then
sed -i 's%<igbHardwareAccelerationEnabled> true </igbHardwareAccelerationEnabled>%<igbHardwareAccelerationEnabled> false </igbHardwareAccelerationEnabled>%' "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/users/${USER}/AppData/Roaming/Wargaming.net/WorldOfTanks/preferences.xml"
fi
if [[ "${PW_VULKAN_USE}" == "0" || "${PW_VULKAN_USE}" == "3" ]] ; then
export LAUNCH_PARAMETERS="--disable-gpu"
fi
}
......@@ -6,7 +6,7 @@ export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/live.na.exe"
export LAUNCH_PARAMETERS="--launch-product=league_of_legends --launch-patchline=live"
export PW_MUST_HAVE_DLL=""
export PW_VULKAN_USE=1
export PW_WINE_USE=WINE_LOL_GE_7.0-2
export PW_WINE_USE=WINE_LOL_GE_7.0-4
export WINEDLLOVERRIDES="mscoree,mshtml="
export PW_USE_D3D_EXTRAS=1
......
......@@ -66,14 +66,14 @@ start_portwine () {
xrdb -merge "${HOME}/.Xresources"
fi
export NOSTEAM=1
pw_init_runtime
if [[ ! -z "${PW_LOG}" && "${PW_LOG}" != 0 ]] ; then
export WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg"
export DXVK_LOG_LEVEL="info"
export DXVK_LOG_LEVEL="warn"
export VKD3D_DEBUG="warn"
export WINE_MONO_TRACE="E:System.NotImplementedException"
export VK_LOADER_DEBUG=all
else
export WINEDEBUG="-all"
export DXVK_LOG_LEVEL="none"
......@@ -351,7 +351,23 @@ start_portwine () {
export PW_GALLIUM_NINE_PATH="${PW_PLUGINS_PATH}/gallium_nine_v.${PW_GALLIUM_NINE_VER}"
try_force_link_file "${PW_GALLIUM_NINE_PATH}/lib32/d3d9-nine.dll.so" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/syswow64/d3d9.dll"
try_force_link_file "${PW_GALLIUM_NINE_PATH}/lib64/d3d9-nine.dll.so" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/system32/d3d9.dll"
var_winedlloverride_update "d3d9=n;wined3d=b;d3d10,d3d11,dxvk_config,vulkan-1,winevulkan="
var_winedlloverride_update "d3d9=n;wined3d=b;dxvk_config,vulkan-1,winevulkan="
echo "Try link wine DXGI..."
if ! try_force_link_file "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/syswow64/dxgi.dll"
then try_force_link_file "${WINEDIR}"/lib/wine/i386-windows/dxgi.dll "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/syswow64/dxgi.dll"
fi
if ! try_force_link_file "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/system32/dxgi.dll"
then try_force_link_file "${WINEDIR}"/lib64/wine/x86_64-windows/dxgi.dll "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/system32/dxgi.dll"
fi
echo "Try link wine d3d filese..."
for wine_build_dll in d3d11 d3d10 d3d10core d3d10_1 dxgi ; do
if ! try_force_link_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/syswow64/${wine_build_dll}.dll"
then try_force_link_file "${WINEDIR}/lib/wine/i386-windows/${wine_build_dll}.dll" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/syswow64/${wine_build_dll}.dll"
fi
if ! try_force_link_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/system32/${wine_build_dll}.dll"
then try_force_link_file "${WINEDIR}/lib64/wine/x86_64-windows/${wine_build_dll}.dll" "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/drive_c/windows/system32/${wine_build_dll}.dll"
fi
done
unset FIND_D3D_MODULE D3D_MODULE_PATH
FIND_D3D_MODULE=`dirname $(find /usr/ -maxdepth 4 -type f -name "d3dadapter9.so.*") 2>/dev/null`
if [[ ! -z "$FIND_D3D_MODULE" ]] ; then
......@@ -526,6 +542,9 @@ start_portwine () {
if [[ "${PW_CHECK_AUTOINSTAL}" != "1" ]] ; then
pw_start_progress_bar_cover "${PW_GUI_ICON_PATH}/covers/pw_loading_cover.gif"
fi
if [[ "${PW_PREFIX_NAME}" == "DOTNET" ]] && [[ "${PW_VULKAN_USE}" == "1" || "${PW_VULKAN_USE}" == "2" ]] ; then
var_winedlloverride_update "libglesv2=d"
fi
add_in_start_portwine
}
......
#!/usr/bin/env bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_NEXT_VERSION=2121
#SCRIPTS_NEXT_VERSION=2122
########################################################################
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
......@@ -42,8 +42,10 @@ export PW_GE_VER="7-26"
export PW_PROTON_GE_VER="PROTON_GE_${PW_GE_VER}"
export PW_WINE_FULLSCREEN_FSR="0"
###WINE_PROTON_PW_FOR_GALLIUM_NINE###
export PW_PW_VER="7.5"
export PW_PROTON_PW_VER="PROTON_PW_${PW_PW_VER}"
# export PW_PW_VER="7-26"
export PW_PROTON_PW_VER="${PW_GE_VER}"
###WINE_KRON4EK###
export PW_WINE_KRON4EK_VER="WINE-7.13-STAGING-TKG-AMD64"
#################################################################
pw_install_dll_in_prefix ()
{
......
......@@ -239,6 +239,17 @@ gui_proton_downloader () {
sed -i '/github-action/d' "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git"
fi
#WINE_KRON4EK
export WINE_KRON4EK=($(curl -s "https://api.github.com/repos/Kron4ek/Wine-Builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4))
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
if [[ ! -z "${WINE_KRON4EK}" ]] ; then
for PGEGIT in ${WINE_KRON4EK[@]} ; do
echo ${PGEGIT} | awk -F/ '{print $NF}' | sed 's/.tar.xz//' >> "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
done
sed -i '/6.3/,$d' "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
sed -i '/-x86/d' "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
fi
#PROTON_PW
export PROTON_PW_GIT=($(curl -s "https://api.github.com/repos/Castro-Fidel/wine_builds/releases" | grep "browser_download_url.*\.tar\.xz" | cut -d \" -f 4))
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git"
......@@ -258,6 +269,7 @@ gui_proton_downloader () {
for INSTALLING_VERSION_IN_DIST in `ls "${PORT_WINE_PATH}/data/dist/"` ; do
sed -i "/${INSTALLING_VERSION_IN_DIST}$/Id" "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git"
sed -i "/${INSTALLING_VERSION_IN_DIST}$/Id" "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git"
sed -i "/${INSTALLING_VERSION_IN_DIST}$/Id" "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
done
#Installed wine
ls -l ${PORT_WINE_PATH}/data/dist | awk '{print $9}' | sed '/^$/d' > ${PORT_WINE_TMP_PATH}/tmp_installed_wine
......@@ -266,36 +278,41 @@ gui_proton_downloader () {
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"
`"${pw_yad}" --plug=$KEY_WINE --tabnum=2 --list --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git" 1> "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=1 --list --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git" 1> "${PORT_WINE_TMP_PATH}/tmp_proton_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=3 --list --separator="" --listen \
`"${pw_yad}" --plug=$KEY_WINE --tabnum=2 --list --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git" 1> "${PORT_WINE_TMP_PATH}/tmp_kron4ek_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=3 --list --separator="" --listen \
--column "Select WINE for download:" < "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git" 1> "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"` &
`"${pw_yad}" --plug=$KEY_WINE --tabnum=4 --list --separator="" --listen \
--column "Select installed WINE for delete:" < "${PORT_WINE_TMP_PATH}/tmp_installed_wine" 1> "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"` &
`"${pw_yad}" --key=$KEY_WINE --notebook --width=500 --height=600 --text-align=center --center \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" --title "Download..." --separator="" \
--tab-pos=top --tab="PROTON-GE" --tab="PROTON-PW" --tab="INSTALLED"`
--tab-pos=top --tab="PROTON-GE" --tab="KRON4EK" --tab="PROTON-PW" --tab="INSTALLED"`
YAD_WINE_STATUS="$?"
if [[ "$YAD_WINE_STATUS" == "1" || "$YAD_WINE_STATUS" == "252" ]] ; then
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi
if [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_proton_set" | awk '{print $1}'` ] ; then
export VERSION_WINE_GIT="`cat "${PORT_WINE_TMP_PATH}/tmp_proton_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set" | awk '{print $1}'` ] ; then
export VERSION_WINE_GIT="`cat "${PORT_WINE_TMP_PATH}/tmp_proton_pw_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set" | awk '{print $1}'` ] ; then
export VERSION_INSTALLED_WINE="`cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_kron4ek_set" | awk '{print $1}'` ] ; then
export VERSION_WINE_GIT="`cat "${PORT_WINE_TMP_PATH}/tmp_kron4ek_set"`"
elif [ ! -z `cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set" | awk '{print $1}'` ] ; then
export VERSION_INSTALLED_WINE="`cat "${PORT_WINE_TMP_PATH}/tmp_installed_wine_set"`"
fi
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_ge_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_pw_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_wine_kron4ek_git"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_proton_set"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine"
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_installed_wine"
for GIVE_WINE_URL in ${PROTON_GE_GIT[@]} ${PROTON_PW_GIT[@]} ; do
if [ ! -z `echo ${GIVE_WINE_URL} | grep "$VERSION_WINE_GIT"` ] ; then
for GIVE_WINE_URL in ${PROTON_GE_GIT[@]} ${PROTON_PW_GIT[@]} ${WINE_KRON4EK[@]}; do
if [ ! -z `echo ${GIVE_WINE_URL} | grep -i "$VERSION_WINE_GIT"` ] ; then
export URL_VERSION_PROTON_GIT="${GIVE_WINE_URL}"
fi
done
......
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