Commit 00c9d5d9 authored by Mikhail Tergoev's avatar Mikhail Tergoev

###Scripts version 2000###

parent 4e59d4b2
История изменений и дальнейшие планы:
-----------------------------------------
В планах:
* исправить MANGOHUD в контейнере (убрать слеша в путях и добавить условия для LD_LIBRARY_PATH и LD_PRELOAD)
* создать ветку beta на github и сделать выбор версии внутри порта
* добавить проверку количества db файлов на один exe
* перенести скрипты установки порта на github
* добавить авто-обновление версии WINE
* добавить фикс установки dotnet
* добавить контроль за окнами для правильного отключения прогресс бара
* добавить контроль запуска *exe для правильного отключения прогресс бара
* добавить комментарии описывающие функционал скриптов
* заниматься только развитием проекта за счет вашей подписки на https://boosty.to/portwine-linux.ru
-----------------------------------------
###PortProton-94### 25.08.2021 ###Scripts version 2000###
* добавлено автоматическое скачивание и обновление Proton GE
* db файлы создаются автоматически при запуске любого *.exe
* последние выбранные режимы запуска сохраняются автоматически в db файлы
* добавлены переменные для более точной настройки vkBasalt под каждую игру с помощью db файлов:
export PW_VKBASALT_EFFECTS="FakeHDR:cas" - можно изменять на любые эффекты из путь_до_порта/data/vkBasalt.conf
export PW_VKBASALT_FFX_CAS="0.7" - изменение резкости в играх (от 0 до 1 с шагом 0.01)
так же можно настроить эти пар-ры глобально и для всех игр с помощью: путь_до_порта/data/user.conf
PS: не забывает для активации добавить переменную: export ENABLE_VKBASALT=1 в db файл, или для глобального включения в user.conf
* добавлены условия для правильного определения переменных LD_LIBRARY_PATH и LD_PRELOAD при автоматическом перезапуске скриптов
* запуск нескольких приложений можно запустить только через один и тот же протон
* добавлена автоматическая очиста каталога Temp в преыиксе порта
* создан новый скрипт functions_helper, в который перенесены все вспомогательные функции из runlib
* создана новая ветка обновлений скриптов v.2XXX
* упрощена структура скрипта runlib
###Scripts version 1125###
* PROTON_STEAM обновлен до v6.3-6b
* FIX winetricks и cabextract
* множество маленьких изменений и исправлений
###Scripts version 1124###
* выбор версии WINE (PROTON_STEAM v6.3-6rc4; PROTON_GE v6.15.2)
* добавлено отображение версии WINE в MANGOHUD
* переработан скрипт start.sh (уменьшен код при увеличении удобства использования)
###Scripts version 1123###
* в MANGOHUD по умолчанию добавлен вывод разрешения экрана
* добавлен db файл для игры DaysGone (значительно увеличивает FPS)
......@@ -21,7 +49,7 @@
###Scripts version 1120###
* перенос unset переменных в разделе main скрипта runlib
* после автоустановки windows steam, не перезаписывается ярлык нативного steam в меню.
* перед автоустановкой игр добавлена функция KILL_PORTWINE
* перед автоустановкой игр добавлена функция kill_portwine
###Scripts version 1119###
* ESYNC отключен по умолчанию из за частой ошибки CXX на некоторых системах.
......@@ -65,7 +93,7 @@
* обновлены библиотеки kerberos и wldap32 (исправляет ошибки подключения к интернету в некоторых играх, например World of Tanks)
###Scripts version 1110###
* mangohud влючаеться по клавише F12 при условии, что он установлен в системе
* mangohud включаеться по клавише F12 при условии, что он установлен в системе
* добавлена кнопка очистки префикса в раздел GUI -> SETTINGS
* добавлена кнопка удаления порта в раздел GUI -> SETTINGS
* добавлена кнопка удаления программ (WINE UNINSTALLER) в раздел GUI -> SETTINGS
......@@ -149,15 +177,13 @@
* частичный откат кода со скриптов от PortProton-78
* контейнерный режим включен по умолчанию и отключается в скрипте "каталог_порта/data/scripts/var" переменной PW_USE_RUNTIME=(1 - включен; 0 - выключен)
###PortProton-85### 27.05.2021 ###Scripts version 1090###
* для подготовки к релизу используется стабилная версия wine: Proton 6.3-4
* до 4-x прибавка в ФПС в играх DX12 (на моем железе: HZD - x4; Graven - x2; Cyberpunk2077 - x1,25)
* глобальное изменение использование переменных (системных, wine и vulkan)
* в лог файл добавлена информация о текущей версии скриптов и используется ли RUNTIME
* возврат оригинальных значений системных переменных: PATH, LD_LIBRARY_PATH после окончания использования порта
* HOTFIX - убрано повторное исполнение функции START_PORTWINE во время запуска debug
* HOTFIX - убрано повторное исполнение функции start_portwine во время запуска debug
* HOTFIX - исправлены возможные проблемы старых игр использующие WMF
* HOTFIX - ошибки скачивания vcrun2019 на чистом префиксе
......@@ -179,7 +205,7 @@
* HOTFIX - изменена переменная export WINE_WIN_START="start.exe /b"
###Scripts version 1085###
* в скрипт var добавлена и временно включена переменная export PW_USE_RUNTIME=1 (требуется рашение проблемы с загрузкой faudio)
* в скрипт var добавлена и временно включена переменная export PW_USE_RUNTIME=0 (требуется рашение проблемы с загрузкой faudio)
* добавлено автоматическое создание каталога "${WINEPREFIX}/drive_c/users/Public/Documents/Steam"
* HOTFIX - обновление скриптов после установки происходило только при повторном запуске порта
......@@ -248,7 +274,7 @@
###Scripts version 1067###
* HOTFIX - удален аргумент /b при запуске приложений (fix для WGC)
* фикс запуска функции PW_OTHER_FIXES
* фикс запуска функции pw_other_fixes
* добавлена проверка повторной установки EVE Online из AUTOINSTALL
###Scripts version 1066###
......@@ -294,7 +320,7 @@
###Scripts version 1053###
* HOTFIX - перенос всех функций в скрипте runlib (наверх)
* добавлена переменная в default ##export PW_WINE_ALLOW_XIM=1, которая отключает XIM (X input manager)
* в функции PW_INIT_PFX добавлено копирование всех dll из библиотек wine/lib(64) в префикс (если префикса не существует)
* в функции pw_init_pfx добавлено копирование всех dll из библиотек wine/lib(64) в префикс (если префикса не существует)
###Scripts version 1052###
* отключена автоотчистка ~/.PortWINE
......@@ -368,7 +394,7 @@
* добавлена проверка связи с серверами для автономной работы порта
* ускорена работа reset скрипта останавливающая все процессы порта
* исправлены ошибки связанные с остановкой отсутствующих pid-оф yad и процессов wine.
* удалено использование wineserver -k в функции KILL_PORTWINE (влияло на инициализацию префикса)
* удалено использование wineserver -k в функции kill_portwine (влияло на инициализацию префикса)
* добавлена отчистка ~/.PortWINE, при условии установки новой версии порта
* добавлена вся информация из db файла и winetricks.log в debug
* удален каталог vars (из за db файлоа больше в нем нет необходимости)
......@@ -379,7 +405,7 @@
###PortProton-74### 20.04.2021 ###Scripts version 1037###
* обновлен wine до версии Proton 6.3-2 next
* в setup db изменен список библиотек (фикс для "xatab") "vcrun6 mfc42 vcrun6sp6 mfc120 vcrun2013"
* в setup db изменен список библиотек (фикс для "xatab") " mfc42 mfc120 vcrun2013"
* добавить выбор версий dxvk и vkd3d в db файле, с последующей закачкой с github при отсутствии в ~/.PortWINE/vulkan
* обновлены libs до v9 (добавлен пакет zstd для реализация функции смены vkd3d)
* произведена частичная чистка и оптимизация кода
......@@ -389,9 +415,9 @@
* фикс для StarCraft (db)
* фикс работы порта в solus (отключение xterm)
* фикс создания циклической ссылки drive_c внутри drive_c
* удален &>>/dev/null из PW_RUN (ломает запуск неторорых игр и приложений)
* очистищен код функции PW_RUN (убрано условие optirun_on за ненадобностью)
* исправлен минимальный набор библиотек в default db (vcrun6 vcrun6sp6 mfc42 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9)
* удален &>>/dev/null из pw_run (ломает запуск неторорых игр и приложений)
* очистищен код функции pw_run (убрано условие optirun_on за ненадобностью)
* исправлен минимальный набор библиотек в default db ( mfc42 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9)
###PortProton-72### 17.04.2021 ###Scripts version 1035###
......@@ -406,7 +432,7 @@
* добавлена кнопка редактирования найденного db файла
* ТЕСТ: автоудаление PINNED_LIBS и отключение setup.sh --force
* изменение сравнения версий скриптов и портов "$(curl -s --list-only "https://portwine-linux.ru/ftp/current_version/blabla_ver")"
* автоматическая установка в префикс порта PW_DLL_INSTALL="vcrun2017 vcrun6 vcrun6sp6 mfc42"
* автоматическая установка в префикс порта PW_DLL_INSTALL="vcrun2017 mfc42"
* исправлено создание db файла при создании ярлыков, в именах которых присутствует одниковвые названия запускаемого файла
* исправили создания префикса на некоторых системах при использования встроенного xterm из ~/PortWINE/libs
......
#!/bin/bash
# Author: Castro-Fidel (PortWINE-Linux.ru)
########################################################################
KILL_PORTWINE
kill_portwine
sleep 3
export PW_USER_TEMP="$WINEPREFIX/drive_c/users/${USER}/Temp"
export PW_FORCE_LARGE_ADDRESS_AWARE=0
export PW_USE_GAMEMODE=0
export PW_CHECK_AUTOINSTAL=1
export PW_GUI_DISABLED_CS=1
export PW_WINEDBG_DISABLE=1
export PW_NO_WRITE_WATCH=0
export PW_VULKAN_USE=0
unset PW_WINE_VER
export PW_WINE_USE=proton_steam
export PW_NO_FSYNC=1
export PW_NO_ESYNC=1
unset PORTWINE_CREATE_SHORTCUT_NAME
pw_kill_autostart () {
if [ "$PW_USE_RUNTIME" != 1 ]
then echo "PW_USE_RUNTIME: `echo $PW_USE_RUNTIME`"
else
sleep 10
while true ; do
if [ -z `pgrep "$1" | head -n 1` ] && [ ! -z `pgrep wrap | head -n 1` ]; then
echo -e "PID "$1" not found"
sleep 1
else
KILL_PORTWINE
break
fi
done
fi
}
export PW_DISABLED_CREAT_DB=1
PW_WGC () {
export LAUNCH_PARAMETERS=("/VERYSILENT")
[ "${update_loc}" = "RUS" ] && export WGC_LOC=RU || export WGC_LOC=EU
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe"
START_PORTWINE
start_portwine
if try_download "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_${WGC_LOC}.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Starting WGC installation..."
pw_start_progress_bar_block "Starting WGC installation..."
pw_kill_autostart wgc.exe &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/ProgramData/Wargaming.net/GameCenter/wgc_api/wgc_api.exe"
export PORTWINE_CREATE_SHORTCUT_NAME="Wargaming Game Center"
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PORTWINE_CREATE_SHORTCUT
kill_portwine
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_ORIGIN () {
export LAUNCH_PARAMETERS=("/silent" )
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/OriginSetup.exe"
START_PORTWINE
start_portwine
if try_download "https://download.dm.origin.com/origin/live/OriginSetup.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Installing the Origin. Please wait..."
pw_start_progress_bar_block "Installing the Origin. Please wait..."
pw_kill_autostart Origin.exe &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Origin/Origin.exe"
PW_STOP_PROGRESS_BAR
pw_stop_progress_bar
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PORTWINE_CREATE_SHORTCUT
kill_portwine
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_BATTLE_NET () {
[ "${update_loc}" = "RUS" ] && export BN_LOC=ruRU || export BN_LOC=enUS
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/Battle.net-Setup-${BN_LOC}.exe"
START_PORTWINE
start_portwine
if try_download "http://dist.blizzard.com/downloads/bna-installers/322d5bb9ae0318de3d4cde7641c96425/retail.1/Battle.net-Setup-${BN_LOC}.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR "Installing the Battle Net. Please wait..."
pw_kill_autostart Battle.net.exe &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe=`find "$WINEPREFIX/drive_c/" -type f -name "Battle.net.exe"`
PW_STOP_PROGRESS
PORTWINE_CREATE_SHORTCUT
portwine_create_shortcut
try_remove_file "${PW_AUTOINSTALL_EXE}"
fi
STOP_PORTWINE
stop_portwine
}
PW_EPIC () {
export LAUNCH_PARAMETERS=("/q" )
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/EpicGamesLauncherInstaller.msi"
START_PORTWINE
start_portwine
if try_download "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/installer/download/EpicGamesLauncherInstaller.msi" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Installing Epic Games Launcher. Please wait..."
pw_start_progress_bar_block "Installing Epic Games Launcher. Please wait..."
pw_kill_autostart EpicGamesLauncher.exe &
PW_RUN msiexec /i "${PW_AUTOINSTALL_EXE}" &
pw_run msiexec /i "${PW_AUTOINSTALL_EXE}" &
sleep 10
if [ ! -z `pgrep msiexec* | head -n 1` ] ; then
while [ ! -z `pgrep msiexec* | head -n 1` ] || [ ! -z `pgrep rundll32* | head -n 1` ] || [ ! -z `pgrep -a wrap | grep ${portname} | head -n 1` ]
......@@ -104,39 +91,39 @@ PW_EPIC () {
fi
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PW_STOP_PROGRESS_BAR
PORTWINE_CREATE_SHORTCUT
kill_portwine
pw_stop_progress_bar
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_GOG () {
export LAUNCH_PARAMETERS=("/VERYSILENT")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/setup_galaxy_2.0.37.384.exe"
START_PORTWINE
start_portwine
if try_download "https://content-system.gog.com/open_link/download?path=/open/galaxy/client/2.0.37.384/setup_galaxy_2.0.37.384.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Installing the GOG Galaxy. Please wait..."
pw_start_progress_bar_block "Installing the GOG Galaxy. Please wait..."
pw_kill_autostart GalaxyClient.* &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/GOG Galaxy/GalaxyClient.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PW_STOP_PROGRESS_BAR
PORTWINE_CREATE_SHORTCUT
kill_portwine
pw_stop_progress_bar
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_EVE () {
export PW_WINDOWS_VER=10
export PW_DLL_INSTALL="vcrun2017"
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/EveLauncher-1892908.exe"
START_PORTWINE
start_portwine
if try_download "https://binaries.eveonline.com/EveLauncher-1892908.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Installing the EVE Launcher. Please wait..."
pw_start_progress_bar_block "Installing the EVE Launcher. Please wait..."
if [ ! -f "$WINEPREFIX/drive_c/Games/EVE Online/Launcher/evelauncher.exe" ] ; then
try_remove_dir "$WINEPREFIX/drive_c/Games/EVE Online"
dd if="${PW_AUTOINSTALL_EXE}" of="${PW_AUTOINSTALL_EXE}".7z bs=1M skip=31646603 count=196171208 iflag=skip_bytes,count_bytes
......@@ -145,50 +132,50 @@ PW_EVE () {
try_remove_file "${PW_AUTOINSTALL_EXE}".7z
fi
portwine_exe="$WINEPREFIX/drive_c/Games/EVE Online/Launcher/evelauncher.exe"
PW_STOP_PROGRESS_BAR
PORTWINE_CREATE_SHORTCUT
pw_stop_progress_bar
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_UBC () {
export LAUNCH_PARAMETERS=("/S" "/D=c:\Program Files (x86)\Ubisoft Game Launcher")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/UbisoftConnectInstaller.exe"
START_PORTWINE
start_portwine
if try_download "https://ubistatic3-a.akamaihd.net/orbit/launcher_installer/UbisoftConnectInstaller.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_CS "Installing the Ubisoft Connect. Please wait..."
pw_start_progress_bar_cs "Installing the Ubisoft Connect. Please wait..."
pw_kill_autostart UbisoftConnect.exe &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Ubisoft Game Launcher/UbisoftConnect.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PW_STOP_PROGRESS_BAR
PORTWINE_CREATE_SHORTCUT
kill_portwine
pw_stop_progress_bar
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_STEAM () {
export LAUNCH_PARAMETERS=("/S" "/D=c:\Program Files (x86)\Steam")
export PW_AUTOINSTALL_EXE="${PW_USER_TEMP}/SteamSetup.exe"
START_PORTWINE
start_portwine
if try_download "https://cdn.cloudflare.steamstatic.com/client/installer/SteamSetup.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_CS "Installing the Steam. Please wait..."
pw_start_progress_bar_cs "Installing the Steam. Please wait..."
pw_kill_autostart steam.exe &
PW_RUN "${PW_AUTOINSTALL_EXE}"
pw_run "${PW_AUTOINSTALL_EXE}"
if [ -f "$WINEPREFIX/drive_c/Program Files (x86)/Steam/Steam.exe" ]
then mv -f "$WINEPREFIX/drive_c/Program Files (x86)/Steam/Steam.exe" "$WINEPREFIX/drive_c/Program Files (x86)/Steam/steam.exe"
fi
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/Steam/steam.exe"
try_remove_file "${PW_AUTOINSTALL_EXE}"
KILL_PORTWINE
PW_STOP_PROGRESS_BAR
kill_portwine
pw_stop_progress_bar
export PORTWINE_CREATE_SHORTCUT_NAME="STEAM_PP"
PORTWINE_CREATE_SHORTCUT
portwine_create_shortcut
fi
STOP_PORTWINE
stop_portwine
}
PW_OSU () {
......@@ -196,18 +183,18 @@ PW_OSU () {
export PW_DLL_INSTALL="dotnet40"
mkdir -p "${WINEPREFIX}/drive_c/Program Files (x86)/OSU/"
export PW_AUTOINSTALL_EXE="${WINEPREFIX}/drive_c/Program Files (x86)/OSU/osu!.exe"
START_PORTWINE
start_portwine
if try_download "https://m1.ppy.sh/r/osu!install.exe" "${PW_AUTOINSTALL_EXE}"
then
PW_START_PROGRESS_BAR_BLOCK "Installing the OSU!. Please wait..."
pw_start_progress_bar_block "Installing the OSU!. Please wait..."
if [ -f "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!install.exe" ]; then
mv -f "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!install.exe" "${PORT_WINE_PATH}/data/pfx_dotnet/drive_c/Program Files (x86)/OSU/osu!.exe"
fi
portwine_exe="$WINEPREFIX/drive_c/Program Files (x86)/OSU/osu!.exe"
PORTWINE_CREATE_SHORTCUT
PW_RUN "${PW_AUTOINSTALL_EXE}"
PW_STOP_PROGRESS_BAR
KILL_PORTWINE
portwine_create_shortcut
pw_run "${PW_AUTOINSTALL_EXE}"
pw_stop_progress_bar
kill_portwine
fi
STOP_PORTWINE
stop_portwine
}
\ No newline at end of file
#!/bin/bash
# Author: Castro-Fidel (PortWINE-Linux.ru)
########################################################################
pw_ping_test () {
ping -w3 -c1 github.com &> /dev/null
[ "$?" == "0" ] && return 0 || return 1
}
print_error () {
echo "ERROR: $@"
}
print_info () {
echo "INFO: $@"
}
print_var () {
for vp in $@ ; do echo "${vp}=${!vp}" ; done
}
try_copy_file () {
if [ ! -f "$1" ] ; then print_info "file $1 not found for copy" && return 1
elif [ -z "$2" ] ; then print_error "no way to copy file $1" && return 1
else
cp -f "$1" "$2"
if [ "$?" != 0 ]
then print_error "failed to copy file $1 to $2" || return 1
else print_info "copy file $1 to $2 was successful" || return 0
fi
fi
}
try_copy_dir () {
if [ ! -d "$1" ] ; then print_info "directory $1 not found for copy"
elif [ -z "$2" ] ; then print_error "no way to copy directory $1"
else
cp -fr "$1" "$2"
[ "$?" != 0 ] && print_error "failed to copy directory $1 to $2" || return 0
fi
return 1
}
try_remove_file () {
if [ -f "$1" ] ; then
rm -f "$1"
[ "$?" != 0 ] && print_error "failed to remove file $1" || return 0
fi
return 1
}
try_remove_dir () {
if [ -d "$1" ] ; then
rm -fr "$1"
[ "$?" != 0 ] && print_error "failed to remove directory $1" || return 0
fi
return 1
}
try_force_link_file () {
if [ ! -f "$1" ] ; then print_info "file $1 not found for link"
elif [ -z "$2" ] ; then print_error "no way to link file $1"
else
ln -sf "$1" "$2"
[ "$?" != 0 ] && print_error "failed to link file $1 to $2" || return 0
fi
return 1
}
try_force_link_dir () {
if [ ! -d "$1" ] ; then print_info "directory $1 not found for link"
elif [ -z "$2" ] ; then print_error "no way to link directory $1"
else
ln -sf "$1" "$2"
[ "$?" != 0 ] && print_error "failed to link directory $1 to $2" || return 0
fi
return 1
}
try_download () {
set -o pipefail
wget -c -t 5 -T 2 "$1" --output-document="$2" 2>&1 | \
sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\/, \2\/s, ETA \3/; s/^20[0-9][0-9].*/#Done./' | \
zenity --progress --percentage=0 --title="Download $(basename $1)" --text=Starting... --auto-close --auto-kill --width=500 --height=90
[ "${PIPESTATUS[0]}" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
try_download_silent () {
wget -c -t 5 -T 2 "$1" --output-document="$2"
[ "$?" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
zenity_error_download () {
`zenity --error --title "Error..." --text "You will need to check internet connettion,\nand press OK for repeet download" --no-wrap ` > /dev/null 2>&1
}
create_new_dir () {
if [ ! -d "$1" ] ; then
mkdir -p "$1"
fi
}
var_winedlloverride_update () {
if [ ! -z "${WINEDLLOVERRIDES}" ]
then export WINEDLLOVERRIDES="${1};${WINEDLLOVERRIDES}"
else export WINEDLLOVERRIDES="${1}"
fi
}
var_vkd3d_config_update () {
if [ ! -z "${VKD3D_CONFIG}" ]
then export VKD3D_CONFIG="${1};${VKD3D_CONFIG}"
else export VKD3D_CONFIG="${1}"
fi
}
unpack_tar_xz () {
set -o pipefail
tar -Jxvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
}
unpack_tar_gz () {
set -o pipefail
tar -xzvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
}
pw_mangohud_check () {
export RUN_MANGOHUD=""
if [ "${PW_MANGOHUD}" == "1" ] ; then
if [ "${PW_VULKAN_USE}" = "0" ]
then export RUN_MANGOHUD="mangohud --dlsym"
else export RUN_MANGOHUD="mangohud"
fi
else
export DISABLE_MANGOHUD=1
fi
}
pw_vkbasalt_check () {
if [ ! -z "${ENABLE_VKBASALT}" ] && [ "${ENABLE_VKBASALT}" == 1 ] ; then
if [ -z "${PW_VKBASALT_EFFECTS}" ] ; then
export PW_VKBASALT_EFFECTS="FakeHDR:cas"
fi
sed -ri "s/effects = .*/effects = ${PW_VKBASALT_EFFECTS}/g" "${PORT_WINE_PATH}/data/vkBasalt.conf"
if [ -z "${PW_VKBASALT_FFX_CAS}" ] ; then
export PW_VKBASALT_FFX_CAS="0.7"
fi
sed -ri "s/casSharpness = .*/casSharpness = ${PW_VKBASALT_FFX_CAS}/g" "${PORT_WINE_PATH}/data/vkBasalt.conf"
export VKBASALT_CONFIG_FILE="${PORT_WINE_PATH}/data/vkBasalt.conf"
else
export DISABLE_VKBASALT=1
fi
}
gui_question () {
`zenity --question --title "${inst_set}." --text "$1" --no-wrap ` &> /dev/null
[ $? -eq "0" ] && return 0 || return 1
}
pw_clear_pfx () {
try_remove_file "${WINEPREFIX}/system.reg"
try_remove_file "${WINEPREFIX}/user.reg"
try_remove_file "${WINEPREFIX}/userdef.reg"
try_remove_file "${WINEPREFIX}/winetricks.log"
try_remove_file "${WINEPREFIX}/.update-timestamp"
try_remove_file "${WINEPREFIX}/drive_c/.windows-serial"
try_remove_dir "${WINEPREFIX}/drive_c/windows/"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Setup"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Windows"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/WindowsTask"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Package Cache"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Application Data/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Temporary Internet Files"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Application Data/wine_gecko"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Temporary Internet Files"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Application Data/wine_gecko"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Internet Explorer"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Windows Media Player"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Windows NT"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Common Files"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Internet Explorer"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Common Files"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Windows Media Player"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Windows NT"
try_remove_dir "${PORT_WINE_TMP_PATH}/mesa_shader_cache"
rm -f "${PORT_WINE_TMP_PATH}"/*.bin
rm -f "${PORT_WINE_TMP_PATH}"/*.foz
}
check_user_conf () {
if [ ! -f "${USER_CONF}" ]; then
echo "#!/bin/bash" > "${USER_CONF}"
echo "# User overides db and var settings..." >> "${USER_CONF}"
chmod u+x "${USER_CONF}"
fi
}
init_wine_ver () {
if [ ! -z "${PW_WINE_VER}" ] && [ `echo "${PW_WINE_VER}" | grep "PROTON_GE"` ]
then export PW_WINE_USE=proton_ge
elif [ ! -z "${PW_WINE_VER}" ] && [ `echo "${PW_WINE_VER}" | grep "PROTON_STEAM"` ]
then export PW_WINE_USE=proton_steam
fi
unset PW_WINE_VER
export WINEDIR="${PORT_WINE_PATH}/data/dist/${PW_WINE_USE}"
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/lib/gstreamer-1.0"
export WINE="${WINEDIR}/bin/wine"
export WINELOADER="${WINEDIR}/bin/wine"
export WINESERVER="${WINEDIR}/bin/wineserver"
export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine"
if [ ! -z ${LD_LIBRARY_PATH_TMP} ]
then export LD_LIBRARY_PATH="${LD_LIBRARY_PATH_TMP}"
else export LD_LIBRARY_PATH_TMP=${LD_LIBRARY_PATH}
fi
if [ ! -z "${LD_LIBRARY_PATH}" ]
then export LD_LIBRARY_PATH="${WINEDIR}/lib64/:${WINEDIR}/lib/:${LD_LIBRARY_PATH}"
else export LD_LIBRARY_PATH="${WINEDIR}/lib64/:${WINEDIR}/lib/"
fi
if [ ! -z ${PATH_TMP} ]
then export PATH="${PATH_TMP}"
else export PATH_TMP="${PATH}"
fi
if [ ! -z "${PATH}" ]
then export PATH="${WINEDIR}/bin:${PATH}"
else export PATH="${WINEDIR}/bin"
fi
}
cabextract_fix () {
[ ! -f "${WINEDIR}/bin/cabextract" ] && try_copy_file "${PW_WINELIB}/runtime/bin/cabextract" "${WINEDIR}/bin/cabextract"
[ ! -f "${WINEDIR}/lib64/libmspack.so.0" ] && try_copy_file "${PW_WINELIB}/runtime/lib/x86_64-linux-gnu/libmspack.so.0" "${WINEDIR}/lib64/libmspack.so.0"
[ ! -f "${WINEDIR}/lib64/libmspack.so.0.1.0" ] && try_copy_file "${WINEDIR}/lib64/libmspack.so.0" "${WINEDIR}/lib64/libmspack.so.0.1.0"
}
sszen() {
zenity --progress --title="Settings..." --text="Updating parameters" --pulsate --auto-close --width=500 --height=90 --no-cancel
}
pw_start_progress_bar_cs () {
"${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &
echo ""
}
pw_start_progress_bar_block () {
"${pw_yad}" --progress --progress-text="$@" --pulsate \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &
echo ""
}
pw_stop_progress_bar () {
while [ ! -z "`pgrep -a yad | grep "\-\-progress" | awk '{print $1}'`" ]
do kill -n 9 `pgrep -a yad | grep "\-\-progress" | awk '{print $1}' | head -n 1` &> /dev/null
done
}
pw_download_libs () {
if [ ! -e "${PW_WINELIB}/runtime/bin/yad" ] || [ ! -e "${PW_WINELIB}/runtime/lib/p7zip/7z" ] \
|| [ ! -e "${PW_WINELIB}/runtime/bin/vkcube" ] || [ ! -e "${PW_WINELIB}/runtime/bin/xterm" ] || \
[ -e "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" ] ; then
print_info "Download and install libraries..."
if try_download "https://github.com/Castro-Fidel/PortWINE/releases/download/libs${PW_LIBS_VER}/libs${PW_LIBS_VER}.tar.xz" "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" ; then
if unpack_tar_xz "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz" "${HOME}/.PortWINE/" ; then
try_remove_file "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz"
else
try_remove_dir "${HOME}/.PortWINE/libs${PW_LIBS_VER}"
try_remove_file "${HOME}/.PortWINE/tmp/libs${PW_LIBS_VER}.tar.xz"
`zenity --error --title "Error..." \
--text "Failed to install runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_download_libs
fi
else
`zenity --error --title "Error..." \
--text "Failed to download runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_download_libs
fi
fi
export pw_yad="${PW_WINELIB}/runtime/bin/yad"
export pw_yad_new="${PW_WINELIB}/runtime/bin/yad_new"
export pw_zstd="${PW_WINELIB}/runtime/bin/zstd"
export pw_7z="${PW_WINELIB}/runtime/lib/p7zip/7z"
if [ -x "`which xterm 2>/dev/null`" ]; then
export SYS_XTERM=`which xterm`
export PW_XTERM="${SYS_XTERM} -geometry 159x37 -e"
else
export PW_XTERM="${PW_WINELIB}/runtime/bin/xterm -geometry 159x37 -e"
fi
}
pw_download_mono () {
if [ ! -d "${HOME}/.PortWINE/mono/wine-mono-${PW_MONO_VER}" ] ; then
export url_mono="https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${PW_MONO_VER}/wine-mono-${PW_MONO_VER}-x86.tar.xz"
echo "######################################################"
print_info "Download and install wine mono..."
if try_download "${url_mono}" "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/mono"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz" "${HOME}/.PortWINE/mono/"
then
try_remove_dir "${HOME}/.PortWINE/mono/wine-mono-${PW_MONO_VER}-x86"
zenity_error_download && pw_download_mono
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-mono-${PW_MONO_VER}-x86.tar.xz"
else
zenity_error_download && pw_download_mono
fi
fi
}
pw_download_gecko () {
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86" ] ; then
export url_gecko_x86="https://dl.winehq.org/wine/wine-gecko/${PW_GECKO_VER}/wine-gecko-${PW_GECKO_VER}-x86.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86..."
if try_download "${url_gecko_x86}" "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz" "${HOME}/.PortWINE/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86"
zenity_error_download && pw_download_gecko
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86.tar.xz"
else
zenity_error_download && pw_download_gecko
fi
fi
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86_64" ] ; then
export url_gecko_x86_64="https://dl.winehq.org/wine/wine-gecko/${PW_GECKO_VER}/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86_64..."
if try_download "${url_gecko_x86_64}" "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz" "${HOME}/.PortWINE/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${PW_GECKO_VER}-x86_64"
zenity_error_download && pw_download_gecko
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${PW_GECKO_VER}-x86_64.tar.xz"
else
zenity_error_download && pw_download_gecko
fi
fi
}
update_winetricks () {
W_TRX_URL="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
W_TRX_EXT_VER="$(curl -s --list-only ${W_TRX_URL} | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
print_info "Version winetricks on server: ${W_TRX_EXT_VER}"
W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
print_info "Version winetricks in port: ${W_TRX_INT_VER}"
if [ ! -f "${PORT_WINE_TMP_PATH}/winetricks" ] && [ ! -z "$W_TRX_EXT_VER" ] || [ "$W_TRX_INT_VER" != "$W_TRX_EXT_VER" ] && [ ! -z "$W_TRX_EXT_VER" ]; then
if try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks_new" ; then
mv -f "${PORT_WINE_TMP_PATH}/winetricks_new" "${PORT_WINE_TMP_PATH}/winetricks"
W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')" && print_info "Winetricks version in port has been updated (${W_TRX_INT_VER})"
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
fi
fi
if [ -f "${PORT_WINE_TMP_PATH}/winetricks" ] ; then
sed -i 's/w_metadata vcrun2015 dlls \\/w_metadata !dont_use_2015! dlls \\/' "${PORT_WINE_TMP_PATH}/winetricks"
sed -i 's/w_metadata vcrun2017 dlls \\/w_metadata !dont_use_2017! dlls \\/' "${PORT_WINE_TMP_PATH}/winetricks"
fi
}
wait_wineserver () {
sleep 3
while [ ! -z "$(ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}')" ] ; do
sleep 1
done
}
kill_portwine () {
wine_pids=`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader| ' | awk -F/ '{print $3}'`
if [ ! -z "${wine_pids}" ] ; then
for pw_kill_pids in ${wine_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids}
fi
done
fi
if [ ! -z `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'` ] ; then
kill -n 9 `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'`
fi
}
export -f kill_portwine
stop_portwine () {
wait_wineserver
add_in_stop_portwine
if [ "$int_xneur" = "1" ]; then
xneur &
fi
if [ ! -z ${PW_XKBD} ]; then
setxkbmap ${PW_XKBD}
fi
pw_stop_progress_bar
try_remove_file "${PORT_SCRIPTS_PATH}/0"
try_remove_file "${PORT_SCRIPTS_PATH}/1"
kill_portwine
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`"
fi
if [ ! -z "`ls "${WINEPREFIX}"/drive_c/users/steamuser/Temp/ | head -n 1`" ]
then
chmod -R 755 "${WINEPREFIX}"/drive_c/users/steamuser/Temp/
rm -fr "${WINEPREFIX}"/drive_c/users/steamuser/Temp/*
fi
}
pw_tray_icon () {
if [ -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ] ; then
tray_icon_click() {
echo ""
}
export -f tray_icon_click
tray_icon_click_exit() {
kill_portwine
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`"
fi
killall start.sh
}
export -f tray_icon_click_exit
"${pw_yad_new}" --notification --no-middle --text="PortProton" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--image="$PW_GUI_ICON_PATH/port_proton.png" \
--command="bash -c tray_icon_click" \
--tooltip="PortProton" \
--menu="| \
<<< CHANGE LOG >>>!bash -c open_changelog!"$PW_GUI_ICON_PATH/port_changelog.png"| \
<<< FORCE EXIT >>>!bash -c tray_icon_click_exit!"$PW_GUI_ICON_PATH/port_exit.png"|"
fi
}
pw_init_db () {
if [ ! -z "${portwine_exe}" ]; then
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
# export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
# export WIN_PATH_TO_GAME=`echo "C:${PATH_TO_GAME}" | sed "s%$WINEPREFIX%%g" | sed "s/drive_c//g" | sed 's#/#\\\#g'`
fi
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -ilw "#${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ]; then
. "${PORTWINE_DB_FILE}"
echo "Use ${PORTWINE_DB_FILE} db file."
else
. "${PORT_SCRIPTS_PATH}/portwine_db/default"
echo "Use default db file."
fi
fi
init_wine_ver
}
pw_update_notifier () {
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ] ; then
if try_download_silent "${PW_FTP_URL}/current_version/${portname}_ver" "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" ; then
read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
if [ ! -z "${current_ver}" ] && [ "${current_ver}" -gt "${install_ver}" ] ; then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=230 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \
FALSE "${port_upd5}" \
FALSE "${port_upd6}" `
case $xsd in
"${port_upd4}")
kill_portwine
xdg-open $PORTWINE_URL
exit 0 ;;
"${port_upd5}")
echo " " ;;
"${port_upd6}")
echo "0" > "${PORT_WINE_TMP_PATH}/update_notifier" ;;
esac
fi
fi
fi
if [ ! -f "${HOME}/.config/.PortTime" ] ; then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ] ; then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=230 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
xdg-open "$urlg" &
echo "300" > "${HOME}/.config/.PortTime"
exit 0 ;;
"${port_time5}")
echo "75" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "150" > "${HOME}/.config/.PortTime" ;;
esac
fi
fi
}
pw_scripts_update () {
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "2000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
export scripts_install_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_ver" | head -n 1`
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
fi
read "scripts_update_not" < "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
if [ "${scripts_update_not}" = "1" ] ; then
if try_download_silent "https://github.com/Castro-Fidel/PortWINE/raw/master/data_from_portwine/scripts/var" "${PORT_WINE_TMP_PATH}/scripts_cur_ver" ; then
export scripts_current_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_cur_ver" | grep SCRIPTS_NEXT_VERSION | awk -F "=" '{print $2}'`
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
echo "Scripts version in github = ${scripts_current_ver}"
echo "Scripts version local = ${scripts_install_ver}"
if [ ! -z "${scripts_current_ver}" ] && [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
xcsd=`zenity --title "${scripts_upd1}" --text "${scripts_upd2}" --list --radiolist --height=230 --column="${inst_set}" --column "${scripts_upd3}" \
TRUE "${scripts_upd4}" \
FALSE "${scripts_upd5}" \
FALSE "${scripts_upd6}"`
case $xcsd in
"${scripts_upd4}")
echo "######################################################"
echo "Update scripts..."
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
if try_download "https://github.com/Castro-Fidel/PortWINE/archive/refs/heads/master.tar.gz" "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" ; then
tar -xvzf "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" -C "${PORT_WINE_TMP_PATH}"
if [ "$?" == "0" ] ; then
cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/"
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
"${pw_yad}" --title="Changelog" --borders=10 \
--text="Скрипты были успешно обновлены.\nДля продолжения запуска порта нажмите ОК." \
--text-align=center --text-info --show-uri --wrap --center --width=1200 --height=550 \
--filename="${PORT_WINE_PATH}/data/changelog" --uri-color=red
[ "$?" == 0 ] && /bin/bash -c ${pw_full_command_line[*]} &
exit 0
fi
else
zenity_error_download && pw_scripts_update
fi ;;
"${scripts_upd5}")
echo " " ;;
"${scripts_upd6}")
echo "0" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ;;
esac
fi
fi
fi
}
pw_kill_autostart () {
if [ "$PW_USE_RUNTIME" != 1 ]
then echo "PW_USE_RUNTIME: `echo $PW_USE_RUNTIME`"
else
sleep 10
while true ; do
if [ -z `pgrep "$1" | head -n 1` ] && [ ! -z `pgrep wrap | head -n 1` ]; then
echo -e "PID "$1" not found"
sleep 1
else
kill_portwine
break
fi
done
fi
}
edit_db_from_gui () {
if [ -z "`cat "${PORTWINE_DB_FILE}" | grep "export ${1}="`" ] ; then
echo "export ${1}=${!1}" >> "${PORTWINE_DB_FILE}"
elif [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${1}=" | grep -v "#"`" ] ; then
if [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${1}=" | grep -v "#"`" != "export ${1}=${!1}" ] ; then
sed -ri "s/^export ${1}=.*/export ${1}=${!1}/" "${PORTWINE_DB_FILE}"
fi
elif [ "`cat "${PORTWINE_DB_FILE}" | grep "export ${1}="`" != "export ${1}=${!1}" ] ; then
sed -ri "s/.*export ${1}=.*/export ${1}=${!1}/g" "${PORTWINE_DB_FILE}"
fi
}
pw_check_and_download_wine () {
if [ "${1}" == "proton_ge" ] ; then
if [ "`cat "${PORT_WINE_PATH}"/data/dist/proton_ge/version | head -n 1`" != "${PW_PROTON_GE_VER}" ]
then try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge/"
fi
if [ ! -d "${PORT_WINE_PATH}/data/dist/proton_ge" ] ; then
print_info "Download and install proton_ge..."
if try_download "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${PW_PROTON_GE_VER}/Proton-${PW_PROTON_GE_VER}.tar.gz" "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz" ; then
if unpack_tar_gz "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz" "${PORT_WINE_PATH}/data/tmp/" ; then
mv -f "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}/files" "${PORT_WINE_PATH}/data/dist/proton_ge"
echo "${PW_PROTON_GE_VER}" > "${PORT_WINE_PATH}/data/dist/proton_ge/version"
try_remove_file "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge/share/default_pfx/"
else
try_remove_file "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}.tar.gz"
try_remove_dir "${PORT_WINE_PATH}/data/tmp/Proton-${PW_PROTON_GE_VER}"
try_remove_dir "${PORT_WINE_PATH}/data/dist/proton_ge"
`zenity --error --title "Error..." \
--text "Failed to download WINE: proton_ge.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
fi
else
`zenity --error --title "Error..." \
--text "Failed to download WINE: proton_ge.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && pw_check_and_download_wine
fi
fi
fi
}
......@@ -36,4 +36,4 @@ export WINEDLLOVERRIDES="xinput1_3,d3dcompiler_43=n,b"
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -38,4 +38,4 @@ export PULSE_LATENCY_MSEC=90 # Fix crackling audio in games
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_LOG=1 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -12,7 +12,7 @@ export PW_DLL_INSTALL="vcrun2019 d3dx11_42 d3dx11_43"
export PW_WINDOWS_VER=10
export PW_USE_NVAPI=0
ADD_IN_START_PORTWINE () {
add_in_start_portwine () {
rm -fr "${PORT_WINE_PATH}/data/pfx/drive_c/ProgramData/Agent/data"
rm -fr "${PORT_WINE_PATH}/data/pfx/drive_c/users/${USER}/Blizzard Entertainment/Battle.net/Cache"
rm -fr "${PORT_WINE_PATH}/data/pfx/drive_c/users/Public/Blizzard Entertainment/Battle.net/Cache"
......
......@@ -30,4 +30,4 @@ export PW_DLL_INSTALL="vcrun2019" # Install DDL in port prefix (us
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -35,4 +35,4 @@ export PW_DLL_INSTALL="physx"
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -35,4 +35,4 @@ export WINEDLLOVERRIDES="d3d12,d3d_rmdwin10_f,renderer_rmdwin10_f,app_rmdwin10_f
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -32,4 +32,4 @@ export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
#ADD_IN_START_PORTWINE () { "${PW_RUNTIME}" "$WINESERVER" -w }
#add_in_start_portwine () { "${pw_runtime}" "$WINESERVER" -w }
......@@ -30,4 +30,4 @@ export PW_NO_ESYNC=0 # Do not use eventfd-based in-pr
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -7,7 +7,7 @@ export PW_VULKAN_USE=0
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -28,4 +28,4 @@ export PW_VULKAN_USE=0
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -6,9 +6,3 @@
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL=""
ADD_IN_START_PORTWINE ()
{
${PW_XTERM} wget -c -T 3 --output-document="${PORT_WINE_TMP_PATH}/wine-mono-5.1.1.2_ED-x86.msi" "https://github.com/redmcg/wine-mono/releases/download/wine-mono-5.1.1.2_ED/wine-mono-5.1.1.2_ED-x86.msi"
${PW_XTERM} "${WINELOADER}" msiexec /i "${PORT_WINE_TMP_PATH}/wine-mono-5.1.1.2_ED-x86.msi"
}
\ No newline at end of file
......@@ -29,4 +29,4 @@ export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -36,4 +36,4 @@ export PW_FORCE_DISABLED_GAMEMOD=1 # Force disabele gamemod
##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
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -7,7 +7,7 @@
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -31,4 +31,4 @@
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -33,4 +33,4 @@ export PW_DLL_INSTALL="d3dx11_42 d3dx11_43"
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -33,4 +33,4 @@ export PW_VULKAN_USE=0
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -31,4 +31,4 @@ export PW_DLL_INSTALL="d3dcompiler_43 d3dcompiler_47" # Install DD
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -3,6 +3,5 @@
#ForzaHorizon4.exe
#Rating=5
################################################
export PW_DLL_INSTALL="dotnet472 vcrun2019"
export PW_VULKAN_USE=vkd3d
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_dotnet"
export PW_DLL_INSTALL="vcrun2019"
export PW_VULKAN_USE=vkd3d
\ No newline at end of file
......@@ -6,8 +6,8 @@
################################################
export WINEDLLOVERRIDES="galaxycommunication.exe=n;libglesv2="
export LAUNCH_PARAMETERS="/runWithoutUpdating /deelevated"
export PW_DLL_INSTALL="vcrun2017 vcrun6 mfc140"
ADD_IN_START_PORTWINE ()
export PW_DLL_INSTALL="vcrun2017 mfc140"
add_in_start_portwine ()
{
if [ -e "${WINEPREFIX}/drive_c/users/${USER}/Local Settings/Application Data/GOG.com/Galaxy/Configuration/config.json" ] ; then
sed -i 's/"featureOverlay" : true,/"featureOverlay" : false,/' "${WINEPREFIX}/drive_c/${USER}/steamuser/Local Settings/Application Data/GOG.com/Galaxy/Configuration/config.json"
......
......@@ -7,7 +7,7 @@ export PW_VULKAN_USE=dxvk
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -28,4 +28,4 @@ export PULSE_LATENCY_MSEC=120 # Fix crackling audio in games
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -8,7 +8,7 @@
##export PW_COMMENT_DB="blablabla"
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -34,4 +34,4 @@ export PW_HEAP_DELAY_FREE=1
##export PW_DXGI_FROM_DXVK=1
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -29,4 +29,4 @@ export PW_DLL_INSTALL="physx d3dx9" # Install DDL in port prefi
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -29,4 +29,4 @@ export PW_DLL_INSTALL="physx d3dx9" # Install DDL in port prefi
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -29,4 +29,4 @@
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -8,7 +8,7 @@
##export PW_COMMENT_DB="blablabla"
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -34,4 +34,4 @@
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -40,4 +40,4 @@ export PW_DLL_INSTALL="d3dcompiler_42 d3dcompiler_43 d3dx9"
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_LOG=1 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -44,16 +44,16 @@ export PW_USE_NVAPI=0
export STAGING_SHARED_MEMORY=0
#ADD_IN_START_PORTWINE () {
#add_in_start_portwine () {
# export PW_USER_TEMP="$WINEPREFIX/drive_c/users/${USER}/Temp"
# if try_download "https://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..."
# 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..."
# pw_stop_progress_bar
# pw_start_progress_bar_cs "Starting the Origin..."
# check_origin_update () {
# while :
......
......@@ -6,5 +6,5 @@
#Rating=?
################################################
export PW_VULKAN_USE=dxvk
export PW_DLL_INSTALL="vcrun2017"
export PW_DLL_INSTALL="vcrun2019"
export PW_WINDOWS_VER=10
\ No newline at end of file
......@@ -32,4 +32,4 @@
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_LOG=1 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -39,4 +39,4 @@ export PULSE_LATENCY_MSEC=150
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_LOG=1 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -8,7 +8,7 @@ export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -29,4 +29,4 @@ export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -8,7 +8,7 @@
##export PW_COMMENT_DB="blablabla"
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -34,4 +34,4 @@
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -29,5 +29,5 @@ export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
export PW_VULKAN_USE=0
#!/bin/bash
#Author: xuser
#Torchlight.exe
#Rating=1-5
########################################################
export PW_WINE_USE=proton_ge
export PW_VULKAN_USE=dxvk
export ENABLE_VKBASALT=1
export PW_VKBASALT_EFFECTS="FakeHDR:cas:FilmGrain2"
export PW_VKBASALT_FFX_CAS="1"
#####################examples###########################
##export PW_COMMENT_DB="blablabla"
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_DLL_INSTALL="" # 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_WINE_USE=proton_ge # proton_steam or proton_ge
##export PW_VULKAN_USE=vkd3d # dxvk, vkd3d or 0 for OpenGL
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_NVAPI=0
##export PW_OLD_GL_STRING=1
##export PW_HIDE_NVIDIA_GPU=1
##export PW_FORCE_USE_VSYNC=0 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_VIRTUAL_DESKTOP=1
##export VKD3D_CONFIG=force_bindless_texel_buffer,multi_queue
##export ENABLE_VKBASALT=1
##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=0 # Do not use eventfd-based in-process synchronization primitives
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export PW_NO_WRITE_WATCH=1 # 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=1
##export PW_WINE_ALLOW_XIM=1 # Disable XIM support until libx11 >= 1.7 is widespread
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##add_in_start_portwine () { commands ; }
......@@ -9,7 +9,7 @@
##export PW_COMMENT_DB="blablabla"
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -33,4 +33,4 @@
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##export PW_DXGI_FROM_DXVK=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -8,7 +8,7 @@
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -31,4 +31,4 @@
##export PW_VIRTUAL_DESKTOP=1
##export DXVK_HUD=fps,devinfo
##export PW_HEAP_DELAY_FREE=0
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -6,7 +6,7 @@
export PW_VULKAN_USE=dxvk
export PW_USE_TERMINAL=0
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_dotnet/"
export PW_DLL_INSTALL="vcrun2017 vcrun6 mfc42 vb6run physx dotnet40 " # Install DDL in port prefix (used winetricks)
export PW_DLL_INSTALL="vcrun2017 mfc42 vb6run physx dotnet40 " # Install DDL in port prefix (used winetricks)
export PW_COMMENT_DB="World Of Tanks EnCore"
## export DXVK_HUD=fps,devinfo
## export PW_MANGOHUD=1
......
......@@ -6,4 +6,4 @@
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS="-nointro -noprefetch" # -nointro command line option to skip intro movies
# -noprefetch command line option to shorten load times
#export PW_DLL_INSTALL="vcrun2019 vcrun6 vcrun6sp6 mfc42 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9
\ No newline at end of file
#export PW_DLL_INSTALL="vcrun2019 mfc42 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9
\ No newline at end of file
......@@ -32,4 +32,4 @@ export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -7,7 +7,7 @@
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -28,5 +28,5 @@
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
##export DXVK_HUD=fps,devinfo
......@@ -10,7 +10,8 @@
##export WINEDLLOVERRIDES="blabla=n,b"
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export PW_WINE_USE=proton_ge # proton_steam or proton_ge
##export PW_VULKAN_USE=vkd3d # dxvk, vkd3d or 0 for OpenGL
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_NVAPI=0
......@@ -19,7 +20,10 @@
##export PW_FORCE_USE_VSYNC=0 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_VIRTUAL_DESKTOP=1
##export VKD3D_CONFIG=force_bindless_texel_buffer,multi_queue
##export ENABLE_VKBASALT=1
##export PW_VKBASALT_EFFECTS="FakeHDR:cas" # Use Reshade in others games (dx9-12 to vulkan only)
##export PW_VKBASALT_FFX_CAS="0.75" # FidelityFX Contrast Adaptive Sharpening (min 0 - max 1)
##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=0 # Do not use eventfd-based in-process synchronization primitives
......@@ -37,6 +41,4 @@
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
export PW_DLL_INSTALL="vcrun6sp6 vcrun6 mfc42 vcrun2019 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9"
##add_in_start_portwine () { commands ; }
\ No newline at end of file
......@@ -34,4 +34,4 @@ export PW_DLL_INSTALL="d3dx9 d3dcompiler_43" # Install DDL in port prefix
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -5,23 +5,13 @@
#Rating=5
#####################examples###########################
##export PW_COMMENT_DB="blablabla"
export PW_WINE_USE=proton_ge
export PW_VULKAN_USE=dxvk
export PW_WINDOWS_VER=7 # Set windows version 10, 7 or XP
export PW_DLL_INSTALL="vcrun2019 d3dcompiler_47" # Install DDL in port prefix (used winetricks)
export WINEDLLOVERRIDES="concrt140,msvcp140,msvcp140_1,msvcp140_2,d3dcompiler_47=n"
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_DXVK_VER=1.8.1
##export PW_VKD3D_VER=2.2
##export PW_DXR_ON=1
##export PW_VULKAN_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_NVAPI=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 ENABLE_VKBASALT=1
##export PW_NO_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
......@@ -42,4 +32,4 @@ export WINEDLLOVERRIDES="concrt140,msvcp140,msvcp140_1,msvcp140_2,d3dcompiler_47
##export PW_LOG=0 # Enable debug mode fo terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -13,7 +13,7 @@
##export PW_DXVK_VER=1.8.1
##export PW_VKD3D_VER=2.2
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -39,4 +39,4 @@
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -41,4 +41,4 @@
##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
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -11,7 +11,7 @@ export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
export MESA_EXTENSION_MAX_YEAR=2002
export __GL_ExtensionStringVersion=17700
ADD_IN_START_PORTWINE ()
add_in_start_portwine ()
{
if [ ! -e "$PATH_TO_GAME/0_Proton_PW_MoHAA" ] ; then
touch "$PATH_TO_GAME/0_Proton_PW_MoHAA" && mv "$PATH_TO_GAME/main/newconfig.cfg" "$PATH_TO_GAME/main/newconfig.cfg.bak" && mv "$PATH_TO_GAME/main/configs/unnamedsoldier.cfg" "$PATH_TO_GAME/main/configs/unnamedsoldier.cfg.bak" && mv "$PATH_TO_GAME/mainta/newconfig.cfg" "$PATH_TO_GAME/mainta/newconfig.cfg.bak" && mv "$PATH_TO_GAME/mainta/configs/unnamedsoldier.cfg" "$PATH_TO_GAME/mainta/configs/unnamedsoldier.cfg.bak" && mv "$PATH_TO_GAME/maintt/newconfig.cfg" "$PATH_TO_GAME/maintt/newconfig.cfg.bak" && mv "$PATH_TO_GAME/maintt/configs/unnamedsoldier.cfg" "$PATH_TO_GAME/maintt/configs/unnamedsoldier.cfg.bak" &&
......
......@@ -32,4 +32,4 @@ export PW_COMMENT_DB="OSU!"
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_USE_TERMINAL=1 # Force run in terminal
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -26,4 +26,4 @@ export PW_DLL_INSTALL="physx d3dx9" # Install DDL in port prefix (used wi
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
#export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -13,7 +13,7 @@
##export PW_DXVK_VER=1.8.1
##export PW_VKD3D_VER=2.2
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -39,4 +39,4 @@
##export PW_DXGI_FROM_DXVK=0
##export WINEARCH=win32 # defaut = win64
##export WINEPREFIX=
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -24,7 +24,7 @@ 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="vcrun6sp6 mfc42 vcrun6 vcrun2012 mfc120 vcrun2013"
export PW_DLL_INSTALL="mfc42 vcrun2012 mfc120 vcrun2013"
#export LAUNCH_PARAMETERS="-d3d9"
export PW_GUI_DISABLED_CS=1
#export PW_WINDOWS_VER=XP # Set windows version 10, 7 or XP
\ No newline at end of file
......@@ -6,7 +6,7 @@
export PW_VULKAN_USE=dxvk
export PW_USE_TERMINAL=1
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx_dotnet"
export PW_DLL_INSTALL="dotnet40 vcrun2017 vcrun6 mfc42 vb6run physx"
export PW_DLL_INSTALL="dotnet40 vcrun2017 mfc42 vb6run physx"
export PW_COMMENT_DB="World Of Tanks EnCore Installer"
## export DXVK_HUD=fps,devinfo
## export PW_MANGOHUD=1
......
......@@ -8,7 +8,7 @@ export PW_DLL_INSTALL="vcrun2013 vcrun2017 dotnet472"
#####################examples###########################
##export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
##export WINEDLLOVERRIDES="blabla=n,b"
##export PW_DLL_INSTALL="vcrun2019 vcrun6" # Install DDL in port prefix (used winetricks)
##export PW_DLL_INSTALL="vcrun2019 " # Install DDL in port prefix (used winetricks)
##export PW_LOG=0 # Enable debug mode fo terminal
##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
......@@ -29,4 +29,4 @@ export PW_DLL_INSTALL="vcrun2013 vcrun2017 dotnet472"
##export VKD3D_CONFIG=force_bindless_texel_buffer
##export PW_WINDOWS_VER=10 # Set windows version 10, 7 or XP
##export PW_VIRTUAL_DESKTOP=1
##ADD_IN_START_PORTWINE () { commands ; }
##add_in_start_portwine () { commands ; }
......@@ -15,300 +15,11 @@ if [ "${s_install}" != "1" ] && [ ! -x "`which "zenity" 2>/dev/null`" ];then
echo "You will need to install: zenity, and restart the port."
xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
fi
pw_ping_test () {
ping -w3 -c1 github.com &> /dev/null
[ "$?" == "0" ] && return 0 || return 1
}
print_error () {
echo "ERROR: $@"
}
print_info () {
echo "INFO: $@"
}
print_var () {
for vp in $@ ; do echo "${vp}=${!vp}" ; done
}
try_copy_file () {
if [ ! -f "$1" ] ; then print_info "file $1 not found for copy" && return 1
elif [ -z "$2" ] ; then print_error "no way to copy file $1" && return 1
else
cp -f "$1" "$2"
if [ "$?" != 0 ]
then print_error "failed to copy file $1 to $2" || return 1
else print_info "copy file $1 to $2 was successful" || return 0
fi
fi
}
try_copy_dir () {
if [ ! -d "$1" ] ; then print_info "directory $1 not found for copy"
elif [ -z "$2" ] ; then print_error "no way to copy directory $1"
else
cp -fr "$1" "$2"
[ "$?" != 0 ] && print_error "failed to copy directory $1 to $2" || return 0
fi
return 1
}
try_remove_file () {
if [ -f "$1" ] ; then
rm -f "$1"
[ "$?" != 0 ] && print_error "failed to remove file $1" || return 0
fi
return 1
}
try_remove_dir () {
if [ -d "$1" ] ; then
rm -fr "$1"
[ "$?" != 0 ] && print_error "failed to remove directory $1" || return 0
fi
return 1
}
try_force_link_file () {
if [ ! -f "$1" ] ; then print_info "file $1 not found for link"
elif [ -z "$2" ] ; then print_error "no way to link file $1"
else
ln -sf "$1" "$2"
[ "$?" != 0 ] && print_error "failed to link file $1 to $2" || return 0
fi
return 1
}
try_force_link_dir () {
if [ ! -d "$1" ] ; then print_info "directory $1 not found for link"
elif [ -z "$2" ] ; then print_error "no way to link directory $1"
else
ln -sf "$1" "$2"
[ "$?" != 0 ] && print_error "failed to link directory $1 to $2" || return 0
fi
return 1
}
try_download () {
set -o pipefail
wget -c -t 5 -T 2 "$1" --output-document="$2" 2>&1 | \
sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\/, \2\/s, ETA \3/; s/^20[0-9][0-9].*/#Done./' | \
zenity --progress --percentage=0 --title="Download $(basename $1)" --text=Starting... --auto-close --auto-kill --width=500 --height=90
[ "${PIPESTATUS[0]}" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
try_download_silent () {
wget -c -t 5 -T 2 "$1" --output-document="$2"
[ "$?" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
}
zenity_error_download () {
`zenity --error --title "Error..." --text "You will need to check internet connettion,\nand press OK for repeet download" --no-wrap ` > /dev/null 2>&1
}
create_new_dir () {
if [ ! -d "$1" ] ; then
mkdir -p "$1"
fi
}
var_winedlloverride_update () {
if [ ! -z "${WINEDLLOVERRIDES}" ]
then export WINEDLLOVERRIDES="${1};${WINEDLLOVERRIDES}"
else export WINEDLLOVERRIDES="${1}"
fi
}
var_vkd3d_config_update () {
if [ ! -z "${VKD3D_CONFIG}" ]
then export VKD3D_CONFIG="${1};${VKD3D_CONFIG}"
else export VKD3D_CONFIG="${1}"
fi
}
unpack_tar_xz () {
set -o pipefail
tar -Jxvf "$1" -C "$2" | sszen
[ "${PIPESTATUS[0]}" != 0 ] && print_error "File unpacking error." && return 1 || return 0
}
pw_mangohud_check () {
export RUN_MANGOHUD=""
if [ "${PW_MANGOHUD}" == "1" ] ; then
if [ "${PW_VULKAN_USE}" = "0" ]
then export RUN_MANGOHUD="mangohud --dlsym"
else export RUN_MANGOHUD="mangohud"
fi
else
export DISABLE_MANGOHUD=1
fi
}
pw_vkbasalt_check () {
if [ ! -z "${ENABLE_VKBASALT}" ] && [ "${ENABLE_VKBASALT}" == 1 ]
then export VKBASALT_CONFIG_FILE="${PORT_WINE_PATH}/data/vkBasalt.conf"
else export DISABLE_VKBASALT=1
fi
}
gui_question () {
`zenity --question --title "${inst_set}." --text "$1" --no-wrap ` &> /dev/null
[ $? -eq "0" ] && return 0 || return 1
}
pw_clear_pfx () {
try_remove_file "${WINEPREFIX}/system.reg"
try_remove_file "${WINEPREFIX}/user.reg"
try_remove_file "${WINEPREFIX}/userdef.reg"
try_remove_file "${WINEPREFIX}/winetricks.log"
try_remove_file "${WINEPREFIX}/.update-timestamp"
try_remove_file "${WINEPREFIX}/drive_c/.windows-serial"
try_remove_dir "${WINEPREFIX}/drive_c/windows/"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Setup"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Windows"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/WindowsTask"
try_remove_dir "${WINEPREFIX}/drive_c/ProgramData/Package Cache"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Application Data/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Local Settings/Temporary Internet Files"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Application Data/wine_gecko"
try_remove_dir "${WINEPREFIX}/drive_c/users/Public/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Application Data/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Local Settings/Temporary Internet Files"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Application Data/Microsoft"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Application Data/wine_gecko"
try_remove_dir "${WINEPREFIX}/drive_c/users/steamuser/Temp"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Internet Explorer"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Windows Media Player"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Windows NT"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files/Common Files"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Internet Explorer"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Common Files"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Windows Media Player"
try_remove_dir "${WINEPREFIX}/drive_c/Program Files (x86)/Windows NT"
try_remove_dir "${PORT_WINE_TMP_PATH}/mesa_shader_cache"
rm -f "${PORT_WINE_TMP_PATH}"/*.bin
rm -f "${PORT_WINE_TMP_PATH}"/*.foz
}
check_user_conf () {
if [ ! -f "${USER_CONF}" ]; then
echo "#!/bin/bash" > "${USER_CONF}"
echo "# User overides db and var settings..." >> "${USER_CONF}"
chmod u+x "${USER_CONF}"
fi
}
sszen() {
zenity --progress --title="Settings..." --text="Updating parameters" --pulsate --auto-close --width=500 --height=90 --no-cancel
}
PW_START_PROGRESS_BAR_CS () {
"${pw_yad}" --progress --progress-text="$@" --pulsate --close-on-unfocus \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &
echo ""
}
PW_START_PROGRESS_BAR_BLOCK () {
"${pw_yad}" --progress --progress-text="$@" --pulsate \
--no-buttons --undecorated --center --skip-taskbar --width=500 --wrap-width=500 &
echo ""
}
PW_STOP_PROGRESS_BAR () {
while [ ! -z "`pgrep -a yad | grep "\-\-progress" | awk '{print $1}'`" ]
do kill -n 9 `pgrep -a yad | grep "\-\-progress" | awk '{print $1}' | head -n 1` &> /dev/null
done
}
PW_LOAD_LIBS () {
if [ ! -e "${PW_WINELIB}/runtime/bin/yad" ] || [ ! -e "${PW_WINELIB}/runtime/lib/p7zip/7z" ] \
|| [ ! -e "${PW_WINELIB}/runtime/bin/vkcube" ] || [ ! -e "${PW_WINELIB}/runtime/bin/xterm" ] || \
[ -e "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" ] ; then
print_info "Download and install libraries..."
if try_download "https://github.com/Castro-Fidel/PortWINE/releases/download/libs${pw_libs_ver}/libs${pw_libs_ver}.tar.xz" "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" ; then
if unpack_tar_xz "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz" "${HOME}/.PortWINE/" ; then
try_remove_file "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz"
else
try_remove_dir "${HOME}/.PortWINE/libs${pw_libs_ver}"
try_remove_file "${HOME}/.PortWINE/tmp/libs${pw_libs_ver}.tar.xz"
`zenity --error --title "Error..." \
--text "Failed to install runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && PW_LOAD_LIBS
fi
else
`zenity --error --title "Error..." \
--text "Failed to download runtime libraries.\nCheck internet connection and press OK" \
--no-wrap ` > /dev/null 2>&1 && PW_LOAD_LIBS
fi
fi
export pw_yad="${PW_WINELIB}/runtime/bin/yad"
export pw_yad_new="${PW_WINELIB}/runtime/bin/yad_new"
export pw_zstd="${PW_WINELIB}/runtime/bin/zstd"
export pw_7z="${PW_WINELIB}/runtime/lib/p7zip/7z"
if [ -x "`which xterm 2>/dev/null`" ]; then
export SYS_XTERM=`which xterm`
export PW_XTERM="${SYS_XTERM} -geometry 159x37 -e"
else
export PW_XTERM="${PW_WINELIB}/runtime/bin/xterm -geometry 159x37 -e"
fi
}
PW_DOWNLOAD_MONO () {
if [ ! -d "${HOME}/.PortWINE/mono/wine-mono-${mono_ver}" ] ; then
export url_mono="https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${mono_ver}/wine-mono-${mono_ver}-x86.tar.xz"
echo "######################################################"
print_info "Download and install wine mono..."
if try_download "${url_mono}" "${HOME}/.PortWINE/tmp/wine-mono-${mono_ver}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/mono"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-mono-${mono_ver}-x86.tar.xz" "${HOME}/.PortWINE/mono/"
then
try_remove_dir "${HOME}/.PortWINE/mono/wine-mono-${mono_ver}-x86"
zenity_error_download && PW_DOWNLOAD_MONO
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-mono-${mono_ver}-x86.tar.xz"
else
zenity_error_download && PW_DOWNLOAD_MONO
fi
fi
}
PW_DOWNLOAD_GECKO () {
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${gecko_ver}-x86" ] ; then
export url_gecko_x86="https://dl.winehq.org/wine/wine-gecko/${gecko_ver}/wine-gecko-${gecko_ver}-x86.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86..."
if try_download "${url_gecko_x86}" "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86.tar.xz" "${HOME}/.PortWINE/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${gecko_ver}-x86"
zenity_error_download && PW_DOWNLOAD_GECKO
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86.tar.xz"
else
zenity_error_download && PW_DOWNLOAD_GECKO
fi
fi
if [ ! -d "${HOME}/.PortWINE/gecko/wine-gecko-${gecko_ver}-x86_64" ] ; then
export url_gecko_x86_64="https://dl.winehq.org/wine/wine-gecko/${gecko_ver}/wine-gecko-${gecko_ver}-x86_64.tar.xz"
echo "######################################################"
echo "Download and install wine gecko x86_64..."
if try_download "${url_gecko_x86_64}" "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86_64.tar.xz" ; then
create_new_dir "${HOME}/.PortWINE/gecko"
if ! unpack_tar_xz "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86_64.tar.xz" "${HOME}/.PortWINE/gecko/"
then
try_remove_dir "${HOME}/.PortWINE/gecko/wine-gecko-${gecko_ver}-x86_64"
zenity_error_download && PW_DOWNLOAD_GECKO
fi
try_remove_file "${HOME}/.PortWINE/tmp/wine-gecko-${gecko_ver}-x86_64.tar.xz"
else
zenity_error_download && PW_DOWNLOAD_GECKO
fi
fi
}
PW_TRAY_ICON () {
if [ -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ] ; then
tray_icon_click() {
echo ""
}
export -f tray_icon_click
tray_icon_click_exit() {
KILL_PORTWINE
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`"
fi
}
export -f tray_icon_click_exit
. "$(dirname $(readlink -f "$0"))/functions_helper"
"${pw_yad_new}" --notification --no-middle --text="PortProton" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--image="$PW_GUI_ICON_PATH/port_proton.png" \
--command="bash -c tray_icon_click" \
--tooltip="PortProton" \
--menu="| \
<<< CHANGE LOG >>>!bash -c open_changelog!"$PW_GUI_ICON_PATH/port_changelog.png"| \
<<< FORCE EXIT >>>!bash -c tray_icon_click_exit!"$PW_GUI_ICON_PATH/port_exit.png"|"
fi
}
START_PORTWINE () {
PW_TRAY_ICON &
start_portwine () {
pw_check_and_download_wine "${PW_WINE_USE}"
pw_tray_icon &
if [ -x "`which konsole 2>/dev/null`" ]; then export PW_TERM="konsole --nofork -e"
# elif [ -x "`which gnome-terminal 2>/dev/null`" ]; then export PW_TERM="gnome-terminal -- /bin/bash" ???
elif [ -x "`which lxterminal 2>/dev/null`" ]; then export PW_TERM="lxterminal -e"
......@@ -320,48 +31,34 @@ START_PORTWINE () {
xrdb -merge "${HOME}/.Xresources"
fi
PW_START_PROGRESS_BAR_CS "Start ${portname}... Please wait..."
pw_start_progress_bar_cs "Start ${portname}... Please wait..."
export WINE_GST_REGISTRY_DIR="${PORT_WINE_TMP_PATH}"
export MEDIACONV_AUDIO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/audio.foz
export MEDIACONV_AUDIO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_audio.foz
export MEDIACONV_VIDEO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/video.foz
export MEDIACONV_VIDEO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_video.foz
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/lib/gstreamer-1.0"
export STAGING_SHARED_MEMORY=1
export PW_FORCE_LARGE_ADDRESS_AWARE=1
export WINE="${WINEDIR}/bin/wine"
export WINELOADER="${WINEDIR}/bin/wine"
export WINESERVER="${WINEDIR}/bin/wineserver"
export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine"
create_new_dir "${WINEDIR}/share/wine/"
try_remove_dir "${WINEDIR}"/share/wine/gecko
try_remove_dir "${WINEDIR}"/share/wine/mono
try_force_link_dir "${HOME}/.PortWINE/gecko" "${WINEDIR}"/share/wine/
try_force_link_dir "${HOME}/.PortWINE/mono" "${WINEDIR}"/share/wine/
if [ ! -z "${LD_LIBRARY_PATH}" ]
then export LD_LIBRARY_PATH="${WINEDIR}/lib64/:${WINEDIR}/lib/:${LD_LIBRARY_PATH}"
else export LD_LIBRARY_PATH="${WINEDIR}/lib64/:${WINEDIR}/lib/"
fi
if [ ! -z "${PATH}" ]
then export PATH="${WINEDIR}/bin:${PATH}"
else export PATH="${WINEDIR}/bin"
fi
if [ "${PW_USE_RUNTIME}" = 0 ] ; then
export PW_RUNTIME=""
export pw_runtime=""
echo "RUNTIME is disabled"
else
export PW_AND_RUNTIME_LIBRARY_PATH="/overrides/lib/x86_64-linux-gnu/:/overrides/lib/x86_64-linux-gnu/aliases/:/overrides/lib/i386-linux-gnu/:/overrides/lib/i386-linux-gnu/aliases/:"
if [ ! -z "${PW_SANDBOX_HOME_PATH}" ] && [ -d "${PW_SANDBOX_HOME_PATH}" ]; then
export PW_RUNTIME="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
--unshare-home \
--home="${PW_SANDBOX_HOME_PATH}" \
--runtime=${PW_WINELIB}/runtime \
--"
else
export PW_RUNTIME="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
export pw_runtime="${PW_WINELIB}/pressure-vessel/bin/pressure-vessel-unruntime \
--share-home \
--runtime=${PW_WINELIB}/runtime \
--"
......@@ -387,6 +84,9 @@ START_PORTWINE () {
else export PRESSURE_VESSEL_FILESYSTEMS_RW="${PWRTMRW}"
fi
done
if [ ! -f "${PW_WINELIB}/runtime/etc/os-release" ]
then try_force_link_file "${PW_WINELIB}/runtime/lib/os-release" "${PW_WINELIB}/runtime/etc/os-release"
fi
echo "RUNTIME is enabled"
fi
......@@ -401,6 +101,7 @@ START_PORTWINE () {
export VKD3D_DEBUG="none"
export DXVK_LOG_PATH="none"
fi
export GST_DEBUG="WARNING:0"
#default wine-mono override for FNA games
export WINE_MONO_OVERRIDES="Microsoft.Xna.Framework.*,Gac=n"
......@@ -456,9 +157,6 @@ START_PORTWINE () {
if [ ! -z "${PW_DXR_ON}" ] && [ "${PW_DXR_ON}" != 0 ] ; then
var_vkd3d_config_update dxr
fi
create_new_dir "${PORT_WINE_TMP_PATH}/dxvk_cache"
export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"/dxvk_cache
export DXVK_STATE_CACHE=1
export optirun_on=""
export check_optimus_manager=
export PW_NVIDIA="$(lspci | grep NVIDIA)"
......@@ -483,10 +181,6 @@ START_PORTWINE () {
if [ ! -d "${PORT_WINE_TMP_PATH}"/gl_shader_cache ] ; then
mkdir -p "${PORT_WINE_TMP_PATH}"/gl_shader_cache
fi
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000
export __GL_DXVK_OPTIMIZATIONS=1
else
export DRI_PRIME=1
fi
......@@ -517,210 +211,13 @@ START_PORTWINE () {
export PW_GAMEMODERUN=0
echo "Gamemod is not installed or disabled in vars script: PW_USE_GAMEMODE=$PW_USE_GAMEMODE"
fi
PW_INIT_PFX
RUN_WINETRICKS_FROM_DB
ADD_IN_START_PORTWINE
}
WAIT_WINESERVER () {
sleep 3
while [ ! -z "$(ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}')" ] ; do
sleep 1
done
}
KILL_PORTWINE () {
wine_pids=`ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader| ' | awk -F/ '{print $3}'`
if [ ! -z "${wine_pids}" ] ; then
for pw_kill_pids in ${wine_pids} ; do
if [ "`ps cax | grep ${pw_kill_pids}`" ] ; then
kill -n 9 ${pw_kill_pids}
fi
done
fi
if [ ! -z `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'` ] ; then
kill -n 9 `pgrep -a bwrap | grep ${portname} | head -n 1 | awk '{print $1}'`
fi
}
export -f KILL_PORTWINE
STOP_PORTWINE () {
WAIT_WINESERVER
ADD_IN_STOP_PORTWINE
if [ "$int_xneur" = "1" ]; then
xneur &
fi
if [ ! -z ${PW_XKBD} ]; then
setxkbmap ${PW_XKBD}
fi
PW_STOP_PROGRESS_BAR
try_remove_file "${PORT_SCRIPTS_PATH}/0"
try_remove_file "${PORT_SCRIPTS_PATH}/1"
KILL_PORTWINE
if [ ! -z "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`" ]
then kill -s SIGUSR1 "`pgrep -a yad_new | grep "\-\-notification" | awk '{print $1}'`"
fi
}
UPDATE_WINETRICKS () {
W_TRX_URL="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
W_TRX_EXT_VER="$(curl -s --list-only ${W_TRX_URL} | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
print_info "Version winetricks on server: ${W_TRX_EXT_VER}"
W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
print_info "Version winetricks in port: ${W_TRX_INT_VER}"
if [ ! -f "${PORT_WINE_TMP_PATH}/winetricks" ] && [ ! -z "$W_TRX_EXT_VER" ] || [ "$W_TRX_INT_VER" != "$W_TRX_EXT_VER" ] && [ ! -z "$W_TRX_EXT_VER" ]; then
if try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks_new" ; then
mv -f "${PORT_WINE_TMP_PATH}/winetricks_new" "${PORT_WINE_TMP_PATH}/winetricks"
W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')" && print_info "Winetricks version in port has been updated (${W_TRX_INT_VER})"
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
fi
fi
if [ -f "${PORT_WINE_TMP_PATH}/winetricks" ] ; then
sed -i 's/w_metadata vcrun2015 dlls \\/w_metadata !dont_use_2015! dlls \\/' "${PORT_WINE_TMP_PATH}/winetricks"
sed -i 's/w_metadata vcrun2017 dlls \\/w_metadata !dont_use_2017! dlls \\/' "${PORT_WINE_TMP_PATH}/winetricks"
fi
}
RUN_WINETRICKS_FROM_DB () {
UPDATE_WINETRICKS
if [ ! -z "${PW_MUST_HAVE_DLL}" ]
then export PW_DLL_INSTALL="${PW_MUST_HAVE_DLL} ${PW_DLL_INSTALL}"
fi
if [ ! -z "${PW_DLL_INSTALL}" ]; then
PW_STOP_PROGRESS_BAR
export PW_DLL_NEED_INSTALL=""
export USE_WT_FROM_DB=0
if [ ! -e "${WINEPREFIX}/winetricks.log" ] ; then
touch "${WINEPREFIX}/winetricks.log"
fi
for need_install_dll_to_pfx in ${PW_DLL_INSTALL} ; do
if [ "${need_install_dll_to_pfx}" == "vcrun2015" ] || [ "${need_install_dll_to_pfx}" == "vcrun2017" ] ; then
need_install_dll_to_pfx="vcrun2019"
sed -i '/vcrun2015/d' "${WINEPREFIX}/winetricks.log"
sed -i '/vcrun2017/d' "${WINEPREFIX}/winetricks.log"
elif [ "${need_install_dll_to_pfx}" == "vcrun2019" ] ; then
sed -i '/vcrun2015/d' "${WINEPREFIX}/winetricks.log"
sed -i '/vcrun2017/d' "${WINEPREFIX}/winetricks.log"
fi
grep "${need_install_dll_to_pfx}" "${WINEPREFIX}/winetricks.log"
if [ "$?" == "1" ] ; then
if [ -z "${PW_DLL_NEED_INSTALL}" ]
then export PW_DLL_NEED_INSTALL="${need_install_dll_to_pfx}"
else export PW_DLL_NEED_INSTALL="${need_install_dll_to_pfx} ${PW_DLL_NEED_INSTALL}"
fi
export USE_WT_FROM_DB=1
fi
done
if [ "${USE_WT_FROM_DB}" == "1" ] ; then
PW_STOP_PROGRESS_BAR
print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}"
chmod -R 775 "${HOME}/.cache/winetricks"
${PW_RUNTIME} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${PORT_WINE_TMP_PATH}/winetricks" -q -f ${PW_DLL_NEED_INSTALL}
fi
PW_START_PROGRESS_BAR_CS "Start ${portname}... Please wait..."
fi
if [[ -z `cat "${WINEPREFIX}/system.reg" | grep "Windows $PW_WINDOWS_VER"` ]] ; then
if [ ! -z "${PW_WINDOWS_VER}" ] && [ `echo "$PW_WINDOWS_VER" | sed 's/.*/\L&/'` == "xp" ] ; then
export PW_WINDOWS_VER="xp64"
fi
${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
echo "Set to win${PW_WINDOWS_VER}"
WAIT_WINESERVER
fi
}
PW_INIT_DB () {
if [ ! -z "${portwine_exe}" ]; then
export PORTWINE_DB=`echo "${portwine_exe}" | awk -F '/' 'NF>1{print $NF}' | sed s/".exe"/""/gi`
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
export WIN_PATH_TO_GAME=`echo "C:${PATH_TO_GAME}" | sed "s%$WINEPREFIX%%g" | sed "s/drive_c//g" | sed 's#/#\\\#g'`
fi
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -ilw "#${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ]; then
. "${PORTWINE_DB_FILE}"
echo "Use ${PORTWINE_DB_FILE} db file."
else
. "${PORT_SCRIPTS_PATH}/portwine_db/default"
echo "Use default db file."
fi
fi
}
PW_UPDATE () {
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ] ; then
if try_download_silent "${PW_FTP_URL}/current_version/${portname}_ver" "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" ; then
read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
if [ ! -z "${current_ver}" ] && [ "${current_ver}" -gt "${install_ver}" ] ; then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=230 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \
FALSE "${port_upd5}" \
FALSE "${port_upd6}" `
case $xsd in
"${port_upd4}")
KILL_PORTWINE
# if try_download https://portwine-linux.ru/ftp/portwine/PortProton-$current_ver "${HOME}/.PortWINE/tmp/PortProton-$current_ver" ; then
# sh "${HOME}/.PortWINE/tmp/PortProton-$current_ver"
# try_remove_file "${HOME}/.PortWINE/tmp/PortProton-$current_ver"
# fi &
xdg-open $porturl
exit 0 ;;
"${port_upd5}")
echo " " ;;
"${port_upd6}")
echo "0" > "${PORT_WINE_TMP_PATH}/update_notifier" ;;
esac
fi
fi
fi
if [ ! -f "${HOME}/.config/.PortTime" ] ; then
echo "10" > "${HOME}/.config/.PortTime"
fi
read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ] ; then
port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime"
else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=230 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \
FALSE "${port_time5}" \
FALSE "${port_time6}" `
if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime"
else
case $xsd2 in
"${port_time4}")
xdg-open "$urlg" &
echo "300" > "${HOME}/.config/.PortTime"
exit 0 ;;
"${port_time5}")
echo "75" > "${HOME}/.config/.PortTime" ;;
"${port_time6}")
echo "150" > "${HOME}/.config/.PortTime" ;;
esac
fi
fi
}
PW_INIT_PFX () {
#init_pfx
if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ] || \
[ ! -d "${WINEPREFIX}/dosdevices" ] || [ ! -f "${WINEPREFIX}"/userdef.reg ] || \
[ ! -f "${WINEPREFIX}"/system.reg ] || [ ! -f "${WINEPREFIX}"/user.reg ]
then
rm -f "${WINEDIR}"*/lib*/*steam*
rm -f "${WINEDIR}"*/lib*/wine/*steam*
rm -f "${WINEDIR}"*/lib*/wine/*/*steam*
pw_clear_pfx
create_new_dir "${WINEPREFIX}"
if [ -d "${WINEDIR}/share/default_pfx/" ] ; then
cp -fr "${WINEDIR}/share/default_pfx/"* "${WINEPREFIX}"
fi
create_new_dir "${WINEPREFIX}/drive_c"
create_new_dir "${WINEPREFIX}/dosdevices"
create_new_dir "${WINEPREFIX}/drive_c/windows/syswow64/"
......@@ -733,14 +230,14 @@ PW_INIT_PFX () {
try_copy_file "${WINEDIR}/share/fonts/"LiberationSerif-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"times.ttf
try_copy_file "${WINEDIR}/share/fonts/"LiberationMono-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"cour.ttf
try_copy_file "${WINEDIR}/share/fonts/"SourceHanSansSCRegular.otf "${WINEPREFIX}/drive_c/windows/Fonts/"msyh.ttf
PW_STOP_PROGRESS_BAR
PW_START_PROGRESS_BAR_BLOCK "Updating prefix... Please wait..."
KILL_PORTWINE
${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -u
WAIT_WINESERVER
KILL_PORTWINE
PW_STOP_PROGRESS_BAR
PW_START_PROGRESS_BAR_CS "Initialization prefix..."
pw_stop_progress_bar
pw_start_progress_bar_block "Updating prefix... Please wait..."
kill_portwine
${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" wineboot -u
wait_wineserver
kill_portwine
pw_stop_progress_bar
pw_start_progress_bar_cs "Initialization prefix..."
fi
[ ! -d "${WINEPREFIX}/dosdevices/c:" ] && try_force_link_dir "${WINEPREFIX}/drive_c/" "${WINEPREFIX}/dosdevices/c:"
[ ! -d "${WINEPREFIX}/dosdevices/z:" ] && try_force_link_dir "/" "${WINEPREFIX}/dosdevices/z:"
......@@ -786,6 +283,10 @@ PW_INIT_PFX () {
try_copy_file "${WINEDIR}/lib/wine/vkd3d-proton/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/vkd3d-proton/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
var_winedlloverride_update "${wine_vkd3d_dll}=n"
create_new_dir "${PORT_WINE_TMP_PATH}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache"
export __GL_SHADER_DISK_CACHE=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000
done
var_winedlloverride_update "dxgi=b"
export VKD3D_FEATURE_LEVEL="12_0"
......@@ -798,73 +299,74 @@ PW_INIT_PFX () {
try_copy_file "${WINEDIR}/lib64/wine/dxvk/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
var_winedlloverride_update "${wine_dxvk_dll}=n"
done
# echo "Try copy native VKD3D files"
# for wine_vkd3d_dll in d3d12 libvkd3d-proton-utils-3 ; do
# try_copy_file "${WINEDIR}/lib/wine/vkd3d-proton/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
# try_copy_file "${WINEDIR}/lib64/wine/vkd3d-proton/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
# var_winedlloverride_update "${wine_vkd3d_dll}=n"
# done
# echo "Use DXVK + VKD3D-PROTON"
create_new_dir "${PORT_WINE_TMP_PATH}/dxvk_cache"
export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"/dxvk_cache
export DXVK_STATE_CACHE=1
export __GL_DXVK_OPTIMIZATIONS=1
var_winedlloverride_update "d3d12,libvkd3d-proton-utils-3="
echo "Use DXVK"
fi
PW_OTHER_FIXES
}
PW_SCRIPTS_UPDATE () {
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "1000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi
export scripts_install_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_ver" | head -n 1`
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
fi
read "scripts_update_not" < "${PORT_WINE_TMP_PATH}/scripts_update_notifier"
if [ "${scripts_update_not}" = "1" ] ; then
if try_download_silent "https://github.com/Castro-Fidel/PortWINE/raw/master/data_from_portwine/scripts/var" "${PORT_WINE_TMP_PATH}/scripts_cur_ver" ; then
export scripts_current_ver=`cat "${PORT_WINE_TMP_PATH}/scripts_cur_ver" | grep SCRIPTS_VERSION | awk -F "=" '{print $2}'`
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
echo "Scripts version in github = ${scripts_current_ver}"
echo "Scripts version local = ${scripts_install_ver}"
if [ ! -z "${scripts_current_ver}" ] && [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
xcsd=`zenity --title "${scripts_upd1}" --text "${scripts_upd2}" --list --radiolist --height=230 --column="${inst_set}" --column "${scripts_upd3}" \
TRUE "${scripts_upd4}" \
FALSE "${scripts_upd5}" \
FALSE "${scripts_upd6}"`
case $xcsd in
"${scripts_upd4}")
echo "######################################################"
echo "Update scripts..."
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
if try_download "https://github.com/Castro-Fidel/PortWINE/archive/refs/heads/master.tar.gz" "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" ; then
tar -xvzf "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz" -C "${PORT_WINE_TMP_PATH}"
if [ "$?" == "0" ] ; then
cp -fr "${PORT_WINE_TMP_PATH}/PortWINE-master/data_from_portwine/"* "${PORT_WINE_PATH}/data/"
try_remove_file "${PORT_WINE_TMP_PATH}/PortWINE-master.tar.gz"
try_remove_dir "${PORT_WINE_TMP_PATH}/PortWINE-master/"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
"${pw_yad}" --title="Changelog" --borders=10 \
--text="Скрипты были успешно обновлены.\nДля продолжения запуска порта нажмите ОК." \
--text-align=center --text-info --show-uri --wrap --center --width=1200 --height=550 \
--filename="${PORT_WINE_PATH}/data/changelog" --uri-color=red
[ "$?" == 0 ] && /bin/bash -c ${pw_full_command_line[*]} &
exit 0
fi
else
zenity_error_download && PW_SCRIPTS_UPDATE
fi ;;
"${scripts_upd5}")
echo " " ;;
"${scripts_upd6}")
echo "0" > "${PORT_WINE_TMP_PATH}/scripts_update_notifier" ;;
esac
pw_other_fixes
#run_winetricks_from_db
update_winetricks
if [ ! -z "${PW_MUST_HAVE_DLL}" ]
then export PW_DLL_INSTALL="${PW_MUST_HAVE_DLL} ${PW_DLL_INSTALL}"
fi
if [ ! -z "${PW_DLL_INSTALL}" ]; then
pw_stop_progress_bar
export PW_DLL_NEED_INSTALL=""
export USE_WT_FROM_DB=0
if [ ! -e "${WINEPREFIX}/winetricks.log" ] ; then
touch "${WINEPREFIX}/winetricks.log"
fi
for need_install_dll_to_pfx in ${PW_DLL_INSTALL} ; do
if [ "${need_install_dll_to_pfx}" == "vcrun2015" ] || [ "${need_install_dll_to_pfx}" == "vcrun2017" ] ; then
need_install_dll_to_pfx="vcrun2019"
sed -i '/vcrun2015/d' "${WINEPREFIX}/winetricks.log"
sed -i '/vcrun2017/d' "${WINEPREFIX}/winetricks.log"
elif [ "${need_install_dll_to_pfx}" == "vcrun2019" ] ; then
sed -i '/vcrun2015/d' "${WINEPREFIX}/winetricks.log"
sed -i '/vcrun2017/d' "${WINEPREFIX}/winetricks.log"
fi
grep "${need_install_dll_to_pfx}" "${WINEPREFIX}/winetricks.log"
if [ "$?" == "1" ] ; then
if [ -z "${PW_DLL_NEED_INSTALL}" ]
then export PW_DLL_NEED_INSTALL="${need_install_dll_to_pfx}"
else export PW_DLL_NEED_INSTALL="${need_install_dll_to_pfx} ${PW_DLL_NEED_INSTALL}"
fi
export USE_WT_FROM_DB=1
fi
done
if [ "${USE_WT_FROM_DB}" == "1" ] ; then
pw_stop_progress_bar
print_info "Try to install DLL in prefix: ${PW_DLL_NEED_INSTALL}"
chmod -R 775 "${HOME}/.cache/winetricks"
if [ "${PW_WINE_VER}" != "PROTON_STEAM" ] ; then
export PW_WINE_VER_FROM_DB="${PW_WINE_USE}"
export PW_WINE_VER="PROTON_STEAM"
init_wine_ver
cabextract_fix
fi
${pw_runtime} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${PORT_WINE_TMP_PATH}/winetricks" -q -f ${PW_DLL_NEED_INSTALL}
if [ "${PW_WINE_USE}" != "proton_steam" ] ; then
/bin/bash -c ${pw_full_command_line[*]} &
exit 0
fi
fi
pw_start_progress_bar_cs "Start ${portname}... Please wait..."
fi
if [[ -z `cat "${WINEPREFIX}/system.reg" | grep "Windows $PW_WINDOWS_VER"` ]] ; then
if [ ! -z "${PW_WINDOWS_VER}" ] && [ `echo "$PW_WINDOWS_VER" | sed 's/.*/\L&/'` == "xp" ] ; then
export PW_WINDOWS_VER="xp64"
fi
${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
echo "Set to win${PW_WINDOWS_VER}"
wait_wineserver
fi
add_in_start_portwine
}
PW_RUN () {
pw_run () {
if [ ! -z "$portwine_exe" ] ; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "${PATH_TO_GAME}"
......@@ -873,31 +375,30 @@ PW_RUN () {
fi
pw_mangohud_check
pw_vkbasalt_check
print_var "WINEDIR" "WINEARCH" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_VULKAN_USE" "VKD3D_CONFIG"
print_var "WINEDIR" "WINEARCH" "WINEPREFIX" "WINEDLLOVERRIDES" "PATH_TO_GAME" "PW_WINE_USE" "PW_VULKAN_USE" "VKD3D_CONFIG" "LD_LIBRARY_PATH" "PATH"
if [ "${PW_LOG}" == 1 ] ; then
export PW_LOG_TO_FILE="${PORT_WINE_PATH}/${portname}.log"
if [ ! -z "${PW_GAMEMODERUN}" ] && [ "${PW_GAMEMODERUN}" != 0 ] ; then
echo "Full command line: $PW_TERM ${optirun_on} gamemoderun ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}" "&>>${PW_LOG_TO_FILE}"
${optirun_on} gamemoderun ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
${optirun_on} gamemoderun ${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
else
echo "Full command line: $PW_TERM ${optirun_on} ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}" "&>>${PW_LOG_TO_FILE}"
${optirun_on} ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
${optirun_on} ${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} &>>"${PW_LOG_TO_FILE}"
fi
else
[ "${PW_USE_TERMINAL}" != "1" ] && export PW_TERM=""
if [ ! -z "${PW_GAMEMODERUN}" ] && [ "${PW_GAMEMODERUN}" != 0 ] ; then
echo "Use gamemode without terminal"
echo "Full command line: $PW_TERM ${optirun_on} gamemoderun ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}"
$PW_TERM ${optirun_on} gamemoderun ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
$PW_TERM ${optirun_on} gamemoderun ${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" \
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
else
echo "Don\`t use gamemode without terminal"
echo "Full command line: $PW_TERM ${optirun_on} ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}"
$PW_TERM ${optirun_on} ${PW_RUNTIME} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" ${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
$PW_TERM ${optirun_on} ${pw_runtime} env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" \
${RUN_MANGOHUD} "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi
fi
}
###MAIN###
unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH PW_CHECK_AUTOINSTAL
unset MANGOHUD MANGOHUD_DLSYM PW_NO_ESYNC PW_NO_FSYNC PW_VULKAN_USE WINEDLLOVERRIDES PW_NO_WRITE_WATCH
unset PW_CHECK_AUTOINSTAL PW_VKBASALT_EFFECTS PW_VKBASALT_FFX_CAS PORTWINE_DB PORTWINE_DB_FILE PW_DISABLED_CREAT_DB
cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)"
cd "${PORT_SCRIPTS_PATH}/../../" && export PORT_WINE_PATH="$(pwd)"
export PORT_WINE_TMP_PATH="${PORT_WINE_PATH}/data/tmp"
......@@ -917,7 +418,7 @@ fi
var_winedlloverride_update "winemenubuilder.exe="
export urlg="https://portwine-linux.ru/portwine-faq/"
export PW_FTP_URL="https://portwine-linux.ru/ftp"
export PW_WINELIB="${HOME}/.PortWINE/libs${pw_libs_ver}"
export PW_WINELIB="${HOME}/.PortWINE/libs${PW_LIBS_VER}"
export PW_GUI_ICON_PATH="${PORT_WINE_PATH}/data/img/gui"
export install_ver=`cat "${PORT_WINE_TMP_PATH}/${portname}_ver" | head -n 1`
export WINETRICKS_DOWNLOADER="curl"
......@@ -926,11 +427,11 @@ check_user_conf
if [ -z "${INSTALLING_PORT}" ] ; then
. "${USER_CONF}"
PW_LOAD_LIBS
PW_DOWNLOAD_MONO
PW_DOWNLOAD_GECKO
PW_UPDATE
PW_SCRIPTS_UPDATE
PW_INIT_DB
pw_download_libs
pw_download_mono
pw_download_gecko
pw_update_notifier
pw_scripts_update
pw_init_db
. "${USER_CONF}"
fi
......@@ -5,23 +5,25 @@ if [ -f "$1" ]; then
export portwine_exe="$(readlink -f "$1")"
fi
. "$(dirname $(readlink -f "$0"))/runlib"
kill_portwine
PORTWINE_LAUNCH () {
START_PORTWINE
portwine_launch () {
start_portwine
PORTWINE_MSI=`basename "${portwine_exe}" | grep .msi`
PORTWINE_BAT=`basename "${portwine_exe}" | grep .bat`
if [ ! -z "${PW_VIRTUAL_DESKTOP}" ] && [ "${PW_VIRTUAL_DESKTOP}" == "1" ] ; then
pw_screen_resolution=`xrandr --current | grep "*" | awk '{print $1;}' | head -1`
PW_RUN explorer "/desktop=portwine,${pw_screen_resolution}" "$portwine_exe"
pw_run explorer "/desktop=portwine,${pw_screen_resolution}" "$portwine_exe"
elif [ ! -z "${PORTWINE_MSI}" ]; then
PW_RUN msiexec /i "$portwine_exe"
pw_run msiexec /i "$portwine_exe"
elif [ ! -z "${PORTWINE_BAT}" ] || [ ! -z "${portwine_exe}" ]; then
PW_RUN ${WINE_WIN_START} "$portwine_exe"
pw_run ${WINE_WIN_START} "$portwine_exe"
else
PW_RUN explorer
pw_run explorer
fi
}
PORTWINE_CREATE_SHORTCUT () {
portwine_create_shortcut () {
if [ ! -z "${portwine_exe}" ]; then
PORTPROTON_EXE="${portwine_exe}"
else
......@@ -44,21 +46,7 @@ PORTWINE_CREATE_SHORTCUT () {
rm -f "${PORTPROTON_PATH}/"*.ico
rm -f "${PORTPROTON_PATH}/"*.png
fi
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*`
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ -z "`cat "${PORTWINE_DB_FILE}" | grep "export PW_VULKAN_USE=" | grep -v "#"`" ] ; then
echo "export PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORTWINE_DB_FILE}"
elif [ -z "${PORTWINE_DB_FILE}" ]; then
echo "#!/bin/bash" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#Author: "${USER}"" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#"${PORTWINE_DB}.exe"" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#Rating=1-5" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "########################################################" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "export PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
cat "${PORT_SCRIPTS_PATH}/portwine_db/default" | grep "##" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
fi
name_desktop="${PORTPROTON_NAME}"
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
if [ -z "${PW_CHECK_AUTOINSTAL}" ]
......@@ -79,8 +67,9 @@ name_desktop="${PORTPROTON_NAME}"
fi
xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null &
}
PORTWINE_DEBUG () {
KILL_PORTWINE
portwine_start_debug () {
kill_portwine
export PW_LOG=1
export PW_WINEDBG_DISABLE=0
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
......@@ -108,11 +97,15 @@ PORTWINE_DEBUG () {
echo `ldd --version | grep -m1 ldd | awk '{print $NF}'` >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ "${PW_VULKAN_USE}" = "0" ]; then echo "PW_VULKAN_USE=${PW_VULKAN_USE} - DX9-11 to OpenGL" >> "${PORT_WINE_PATH}/${portname}.log"
elif [ "${PW_VULKAN_USE}" = "dxvk" ]; then echo "PW_VULKAN_USE=${PW_VULKAN_USE}_v."${PW_DXVK_VER}"" >> "${PORT_WINE_PATH}/${portname}.log"
else echo "PW_VULKAN_USE=${PW_VULKAN_USE}_v."${PW_VKD3D_VER}"" >> "${PORT_WINE_PATH}/${portname}.log"
elif [ "${PW_VULKAN_USE}" = "dxvk" ]; then echo "PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORT_WINE_PATH}/${portname}.log"
else echo "PW_VULKAN_USE=${PW_VULKAN_USE}" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Version WINE in the Port:" >> "${PORT_WINE_PATH}/${portname}.log"
print_var PW_WINE_USE >> "${PORT_WINE_PATH}/${portname}.log"
[ -f "${WINEDIR}/version" ] && cat "${WINEDIR}/version" >> "${PORT_WINE_PATH}/${portname}.log"
echo "------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Date and time of start debug for ${portname}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Date and time of start debug for ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
date >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "The installation path of the ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -150,12 +143,6 @@ PORTWINE_DEBUG () {
echo "---------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "!!!gamemod not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
if [ -f "${WINEDIR}/version" ]
then cat "${WINEDIR}/version" >> "${PORT_WINE_PATH}/${portname}.log"
else ${PW_RUNTIME} "$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
fi
echo "-------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "winetricks.log:" >> "${PORT_WINE_PATH}/${portname}.log"
cat "${WINEPREFIX}/winetricks.log" >> "${PORT_WINE_PATH}/${portname}.log"
......@@ -172,97 +159,101 @@ PORTWINE_DEBUG () {
export DXVK_HUD="full"
PORTWINE_LAUNCH &
sleep 1 && zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap &> /dev/null && KILL_PORTWINE
portwine_launch &
sleep 1 && zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap &> /dev/null && kill_portwine
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
"$pw_yad" --title="${portname}.log" --borders=10 --no-buttons --text-align=center \
--text-info --show-uri --wrap --center --width=1200 --height=550 --uri-color=red \
--filename="${PORT_WINE_PATH}/${portname}.log"
}
PW_WINECFG () {
START_PORTWINE
PW_RUN winecfg
pw_winecfg () {
start_portwine
pw_run winecfg
}
PW_WINEFILE () {
START_PORTWINE
PW_RUN explorer
pw_winefile () {
start_portwine
pw_run explorer
}
PW_WINECMD () {
pw_winecmd () {
export PW_USE_TERMINAL=1
START_PORTWINE
start_portwine
cd "${WINEPREFIX}/drive_c"
${PW_RUNTIME} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" cmd
${pw_runtime} xterm -e env LD_LIBRARY_PATH="${PW_AND_RUNTIME_LIBRARY_PATH}${LD_LIBRARY_PATH}" "${WINELOADER}" cmd
}
PW_WINEREG () {
START_PORTWINE
PW_RUN regedit
pw_winereg () {
start_portwine
pw_run regedit
}
PW_WINETRICKS () {
UPDATE_WINETRICKS
pw_winetricks () {
update_winetricks
export PW_USE_TERMINAL=1
START_PORTWINE
${PW_TERM} "${PORT_WINE_TMP_PATH}/winetricks" -q
export PW_WINE_VER="PROTON_STEAM"
init_wine_ver
cabextract_fix
start_portwine
${PW_TERM} "${PORT_WINE_TMP_PATH}/winetricks" -q -f
}
PW_EDIT_DB () {
pw_edit_db () {
xdg-open "${PORTWINE_DB_FILE}"
}
PW_AUTO_INSTALL_FROM_DB () {
pw_autoinstall_from_db () {
. "$PORT_SCRIPTS_PATH/autoinstall"
$PW_YAD_SET
}
###MAIN###
if [ ! -z "${PORTWINE_DB_FILE}" ] ; then
export YAD_EDIT_DB="--button=EDIT DB!!${loc_edit_db} ${PORTWINE_DB}:118"
[ -z "${PW_COMMENT_DB}" ] && PW_COMMENT_DB="PortWINE database file for "\"${PORTWINE_DB}"\" was found."
if [ -z "${PW_VULKAN_USE}" ] || [ -z "${PW_WINE_USE}" ] ; then
unset PW_GUI_DISABLED_CS
[ -z "${PW_VULKAN_USE}" ] && export PW_VULKAN_USE=dxvk
[ -z "${PW_WINE_USE}" ] && export PW_WINE_USE=proton_steam
fi
case "${PW_VULKAN_USE}" in
"vkd3d")
export PW_DEFAULT_VULKAN_USE='VKD3D (DX 12 to Vulkan)\!DXVK (DX 9-11 to Vulkan)\!OPENGL ' ;;
"0")
export PW_DEFAULT_VULKAN_USE='OPENGL \!DXVK (DX 9-11 to Vulkan)\!VKD3D (DX 12 to Vulkan)' ;;
*)
export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)\!VKD3D (DX 12 to Vulkan)\!OPENGL ' ;;
esac
case "${PW_WINE_USE}" in
"proton_ge")
export PW_DEFAULT_WINE_USE='PROTON_GE (FSR included)\!PROTON_STEAM' ;;
*)
export PW_DEFAULT_WINE_USE='PROTON_STEAM\!PROTON_GE (FSR included)' ;;
esac
else
export PW_DEFAULT_VULKAN_USE='DXVK (DX 9-11 to Vulkan)\!VKD3D (DX 12 to Vulkan)\!OPENGL '
export PW_DEFAULT_WINE_USE='PROTON_STEAM\!PROTON_GE (FSR included)'
unset PW_GUI_DISABLED_CS
fi
if [ ! -z "${portwine_exe}" ]; then
if [ -z "${PW_GUI_DISABLED_CS}" ] || [ "${PW_GUI_DISABLED_CS}" = 0 ] || [ -z "${PW_VULKAN_USE}" ]; then
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ ! -z "${PW_VULKAN_USE}" ]; then
if [ -z "${PW_COMMENT_DB}" ] ; then
PW_COMMENT_DB="PortWINE database file for "\"${PORTWINE_DB}"\" was found."
fi
OUTPUT_START=$("${pw_yad}" --text-align=center --text "$PW_COMMENT_DB" --wrap-width=150 --borders=15 --form --center \
--title "$portname" --image "$PW_GUI_ICON_PATH/port_proton.png" --separator=";" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--button='EDIT DB'!!"${loc_edit_db} ${PORTWINE_DB}":118 \
--button='CREATE SHORTCUT'!!"${loc_creat_shortcut}":100 \
--button='DEBUG'!!"${loc_debug}":102 \
--button='LAUNCH'!!"${loc_launch}":106 )
PW_YAD_SET="$?"
elif [ ! -z "${PORTWINE_DB_FILE}" ] && [ -z "${PW_VULKAN_USE}" ]; then
if [ -z "${PW_COMMENT_DB}" ] ; then
PW_COMMENT_DB="PortWINE database file for "\"${PORTWINE_DB}"\" was found."
fi
OUTPUT_START=$("${pw_yad}" --text-align=center --text "$PW_COMMENT_DB" --wrap-width=150 --borders=15 --form --center \
--title "$portname" --image "$PW_GUI_ICON_PATH/port_proton.png" --separator=";" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--field="Run with :CB" "DXVK (DX 9-11 to Vulkan)"\!"VKD3D (DX 12 to Vulkan)"\!"OPENGL " \
--button='EDIT DB'!!"${loc_edit_db} ${PORTWINE_DB}":118 \
--button='CREATE SHORTCUT'!!"${loc_creat_shortcut}":100 \
--button='DEBUG'!!"${loc_debug}":102 \
--button='LAUNCH'!!"${loc_launch}":106 )
PW_YAD_SET="$?"
export VULKAN_MOD=`echo "$OUTPUT_START" | awk '{print $1}'`
else
OUTPUT_START=$("${pw_yad}" --wrap-width=250 --borders=15 --form --center \
--title "$portname" --image "$PW_GUI_ICON_PATH/port_proton.png" --separator=";" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--field="Run with :CB" "DXVK (DX 9-11 to Vulkan)"\!"VKD3D (DX 12 to Vulkan)"\!"OPENGL " \
--button='CREATE SHORTCUT'!!"${loc_creat_shortcut}":100 \
--button='DEBUG'!!"${loc_debug}":102 \
--button='LAUNCH'!!"${loc_launch}":106 )
PW_YAD_SET="$?"
export VULKAN_MOD=`echo "$OUTPUT_START" | awk '{print $1}'`
fi
elif [ ! -z "${PORTWINE_DB_FILE}" ]; then
PORTWINE_LAUNCH
else
OUTPUT_START=$("${pw_yad}" --wrap-width=250 --borders=15 --form --center \
if [ -z "${PW_GUI_DISABLED_CS}" ] || [ "${PW_GUI_DISABLED_CS}" = 0 ] ; then
OUTPUT_START=$("${pw_yad}" --text-align=center --text "$PW_COMMENT_DB" --wrap-width=150 --borders=15 --form --center \
--title "$portname" --image "$PW_GUI_ICON_PATH/port_proton.png" --separator=";" \
--window-icon="$PW_GUI_ICON_PATH/port_proton.png" \
--field="Run with :CB" "DXVK (DX 9-11 to Vulkan)"\!"VKD3D (DX 12 to Vulkan)"\!"OPENGL " \
--field="Run with :CB" "${PW_DEFAULT_VULKAN_USE}" \
--field="Run with :CB" "${PW_DEFAULT_WINE_USE}" \
--field=":LBL" "" \
"${YAD_EDIT_DB}" \
--button='CREATE SHORTCUT'!!"${loc_creat_shortcut}":100 \
--button='DEBUG'!!"${loc_debug}":102 \
--button='LAUNCH'!!"${loc_launch}":106 )
PW_YAD_SET="$?"
export VULKAN_MOD=`echo "$OUTPUT_START" | awk '{print $1}'`
export VULKAN_MOD=`echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $1}' | awk '{print $1}'`
export PW_WINE_VER=`echo "${OUTPUT_START}" | grep \;\; | awk -F";" '{print $2}' | awk '{print $1}'`
elif [ ! -z "${PORTWINE_DB_FILE}" ]; then
portwine_launch
fi
else
button_click () {
......@@ -298,8 +289,8 @@ else
export -f gui_rm_portproton
gui_wine_uninstaller () {
START_PORTWINE
PW_RUN uninstaller
start_portwine
pw_run uninstaller
}
export -f gui_wine_uninstaller
......@@ -328,15 +319,15 @@ else
"${pw_yad}" --plug=${KEY} --tabnum=1 --columns=3 --form --separator=";" \
--image "$PW_GUI_ICON_PATH/port_proton.png" \
--field=":CB" " DXVK (DX 9-11 to Vulkan)"\!"VKD3D (DX 12 to Vulkan)"\!"OPENGL " \
--field=":CB" " DXVK (DX 9-11 to Vulkan)"\!"VKD3D (DX 12 to Vulkan)"\!"OPENGL " \
--field=":LBL" "" \
--field='DEBUG'!!"${loc_debug}":"BTN" '@bash -c "button_click DEBUG"' \
--field='WINECFG'!!"${loc_winecfg}":"BTN" '@bash -c "button_click WINECFG"' \
--field="${portname}-${install_ver} (${scripts_install_ver})"!!"":"FBTN" '@bash -c "open_changelog"' \
--field=":CB" " PROTON_STEAM"\!" PROTON_GE (FSR included)" \
--field=":LBL" "" \
--field='WINEFILE'!!"${loc_winefile}":"BTN" '@bash -c "button_click WINEFILE"' \
--field='WINECMD'!!"${loc_winecmd}":"BTN" '@bash -c "button_click WINECMD"' \
--field="F.A.Q."!!"":"FBTN" '@bash -c "xdg-open https://portwine-linux.ru/portwine-faq/ ; button_click"' \
--field="${portname}-${install_ver} (${scripts_install_ver})"!!"":"FBTN" '@bash -c "open_changelog"' \
--field=":LBL" "" \
--field='WINEREG'!!"${loc_winereg}":"BTN" '@bash -c "button_click WINEREG"' \
--field='WINETRICKS'!!"${loc_winetricks}":"BTN" '@bash -c "button_click WINETRICKS"' &> "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" & \
......@@ -350,7 +341,9 @@ else
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_yad_form"
fi
if [ -f "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" ] ; then
export VULKAN_MOD=`cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk '{print $1}'`
cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan"
export VULKAN_MOD=`cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk '{print $1}' | awk -F";" '{print $1}'`
export PW_WINE_VER=`cat "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan" | grep \;\; | awk -F";" '{print $5}' | awk '{print $1}'`
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_yad_form_vulkan"
fi
fi
......@@ -360,18 +353,40 @@ if [ ! -z "${VULKAN_MOD}" ] ; then
elif [ "${VULKAN_MOD}" = "OPENGL" ]; then export PW_VULKAN_USE="0"
fi
fi
init_wine_ver
if [ -z "${PW_DISABLED_CREAT_DB}" ] ; then
if [ ! -z "${PORTWINE_DB}" ] ; then
PORTWINE_DB_FILE=`grep -il "\#${PORTWINE_DB}.exe" "${PORT_SCRIPTS_PATH}/portwine_db"/*`
if [ -z "${PORTWINE_DB_FILE}" ] ; then
echo "#!/bin/bash" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#Author: "${USER}"" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#"${PORTWINE_DB}.exe"" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
echo "#Rating=1-5" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
cat "${PORT_SCRIPTS_PATH}/portwine_db/default" | grep "##" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
export PORTWINE_DB_FILE="${PORT_SCRIPTS_PATH}/portwine_db/${PORTWINE_DB}"
fi
edit_db_from_gui PW_VULKAN_USE
edit_db_from_gui PW_WINE_USE
PW_DB_TMP=`cat "${PORTWINE_DB_FILE}"`
echo "${PW_DB_TMP}" | awk '! a[$0]++' > "${PORTWINE_DB_FILE}"
unset PW_DB_TMP
fi
fi
case "$PW_YAD_SET" in
1|252) exit 0 ;;
100) PORTWINE_CREATE_SHORTCUT ;;
DEBUG|102) PORTWINE_DEBUG ;;
106) PORTWINE_LAUNCH ;;
WINECFG|108) PW_WINECFG ;;
WINEFILE|110) PW_WINEFILE ;;
WINECMD|112) PW_WINECMD ;;
WINEREG|114) PW_WINEREG ;;
WINETRICKS|116) PW_WINETRICKS ;;
118) PW_EDIT_DB ;;
*) PW_AUTO_INSTALL_FROM_DB ;;
100) portwine_create_shortcut ;;
DEBUG|102) portwine_start_debug ;;
106) portwine_launch ;;
WINECFG|108) pw_winecfg ;;
WINEFILE|110) pw_winefile ;;
WINECMD|112) pw_winecmd ;;
WINEREG|114) pw_winereg ;;
WINETRICKS|116) pw_winetricks ;;
118) pw_edit_db ;;
*) pw_autoinstall_from_db ;;
esac
########################################################################
STOP_PORTWINE
stop_portwine
#!/bin/bash
#Author: Castro-Fidel (PortWINE-Linux.ru)
#SCRIPTS_VERSION=1123
#SCRIPTS_NEXT_VERSION=2000
########################################################################
export PW_MANGOHUD=1
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution
export MANGOHUD_CONFIG=font_size=24,position=top-left,toggle_hud=Shift_R+F12,no_display,resolution,wine,gpu_name,vulkan_driver,gpu_stats,vkbasalt
#export DXVK_HUD=fps,devinfo
#export ENABLE_VKBASALT=1
#export PW_VIRTUAL_DESKTOP=1
......@@ -20,41 +20,39 @@ export PW_FORCE_USE_VSYNC=2
export PW_LOG=0
export PW_TERM=""
export PW_USE_TERMINAL=0
export PW_MUST_HAVE_DLL=""
export PW_MUST_HAVE_DLL="mfc42 vcrun2019 d3dcompiler_42 d3dcompiler_43 d3dcompiler_47 d3dx9"
export PW_WINEDBG_DISABLE=1
export PW_WINDOWS_VER="10"
export WINEARCH="win64"
export pw_libs_ver="_v17"
export porturl="http://portwine-linux.ru/"
export PW_LIBS_VER="_v17"
export PORTWINE_URL="http://portwine-linux.ru/"
export GDK_BACKEND="x11"
export mono_ver=6.1.2
export gecko_ver=2.47.2
export WINEDIR="${PORT_WINE_PATH}/data/dist"
export PW_PROTON_GE_VER="6.15-GE-2"
export PW_MONO_VER="6.3.0"
export PW_GECKO_VER="2.47.2"
export WINEPREFIX="${PORT_WINE_PATH}/data/pfx"
export WINE_WIN_START="start.exe /i /unix"
if [ ! -z "`cat "${PORT_WINE_PATH}/data/dist/version" | grep "GE"`" ] ; then
export WINE_FULLSCREEN_FSR=1
export WINE_FULLSCREEN_FSR_STRENGTH=1
export mono_ver=6.2.2
fi
export WINE_FULLSCREEN_FSR="1"
export WINE_FULLSCREEN_FSR_STRENGTH="2"
#################################################################
ADD_IN_START_PORTWINE ()
add_in_start_portwine ()
{
echo " "
}
########################################################################
ADD_IN_STOP_PORTWINE ()
add_in_stop_portwine ()
{
echo " "
}
########################################################################
PW_OTHER_FIXES () {
pw_other_fixes () {
#fix after installation Origin, for disabled OriginWebHelperService by default
if [ ! -z `cat "${WINEPREFIX}/system.reg" | grep Origin.exe | head -n 1 | awk '{print $1}'` ] ; then
sysreg_norig=$(((`cat -n "${WINEPREFIX}/system.reg" | grep OriginWebHelperService | awk '{print $1}'` + 3)))
sed -i "${sysreg_norig}s/dword:0000000[1-2]/dword:00000003/" "${WINEPREFIX}/system.reg"
fi
}
###FOR_OLD_VERSION_PORTPROTON###
#SCRIPTS_VERSION=1123
......@@ -13,7 +13,9 @@ Tonemap = /usr/local/share/reshade/shaders/Tonemap.fx
Vignette = /usr/local/share/reshade/shaders/Vignette.fx
Curves = /usr/local/share/reshade/shaders/Curves.fx
FakeHDR = /usr/local/share/reshade/shaders/FakeHDR.fx
AdaptiveSharpen = /usr/local/share/reshade/shaders/AdaptiveSharpen.fx
FilmGrain2 = /usr/local/share/reshade/shaders/FilmGrain2.fx
casSharpness=0.75
casSharpness = 0.7
toggleKey = Home
effects = FakeHDR:cas
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