Commit 366dcb42 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Fix error: start.exe

parent 66d9182c
#!/bin/bash
#Author: Аливэй
#Ableton Live 11 Suite.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_WINDOWS_VER=10
#!/bin/bash
#Author: Сергей 33 (46)
#BF2.exe
#Rating=4
################################################
export PW_VULKAN_USE=vkd3d
export PW_WINDOWS_VER="7"
#!/bin/bash
#Author:
#bg3_dx11.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL="d3dcompiler_43 d3dcompiler_47 vcrun2019"
#export DXVK_HUD=1
#!/bin/bash
#Author:
#bg3.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
#export MANGOHUD=1
#!/bin/bash
#Author: dez
#Battle.net Launcher.exe
#Battle.net-Setup.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL="vcrun2019 arial"
export PW_WINDOWS_VER=10
export PW_NVAPI_DISABLE=1
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
#Rating=? #Rating=?
################################################ ################################################
export PW_VULKAN_USE=vkd3d export PW_VULKAN_USE=vkd3d
export WINEDLLOVERRIDES="amd_ags_x64=n,b" #export WINEDLLOVERRIDES="amd_ags_x64=b"
#export PW_LOG=0 # Enable debug mode fo terminal #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_FSYNC=1 # Do not use futex-based in-process synchronization primitives. (Automatically disabled on systems with no FUTEX_WAIT_MULTIPLE support.
export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronization primitives
#export PW_DXVK_NO_ASYNC=1 #export PW_DXVK_NO_ASYNC=1
#export PW_USE_TERMINAL=1 #export PW_USE_TERMINAL=1
...@@ -21,7 +21,7 @@ export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronizatio ...@@ -21,7 +21,7 @@ export PW_NO_ESYNC=1 # Do not use eventfd-based in-process synchronizatio
#export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default. #export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
export PULSE_LATENCY_MSEC=60 export PULSE_LATENCY_MSEC=60
#export PW_DLL_INSTALL="foo bar" #export PW_DLL_INSTALL="foo bar"
declare -a LAUNCH_PARAMETERS export LAUNCH_PARAMETERS="+in_terminal 1 +com_skipIntroVideo 1 +com_skipSignInManager 1"
export LAUNCH_PARAMETERS=('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')
#export PW_GUI_DISABLED_CS=1 #export PW_GUI_DISABLED_CS=1
#export PW_DXGI_FROM_DXVK=1 #export PW_DXGI_FROM_DXVK=1
#export VK_ICD_FILENAMES="/opt/amdgpu/etc/vulkan/icd.d/amd_icd64.json"
#!/bin/bash
#Author: MrModer#6697
#DetroitBecomeHuman.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export PW_FORCE_USE_VSYNC=0
export PW_WINDOWS_VER="10"
export PW_VIRTUAL_DESKTOP=1
#!/bin/bash
#Author: spider
#Diablo II.exe
#Rating=1-5
################################################
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_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
##export PW_DXVK_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_OLD_GL_STRING=0
##export PW_NVAPI_DISABLE=1
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##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 ; }
#!/bin/bash
#Author: lemonchic with help from Dezert1r
#GTAIV.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export PW_NO_ESYNC=1
export PW_NO_FSYNC=1
export LAUNCH_PARAMETERS="-nomemrestrict -norestrictions -percentvidmem 100 -availablevidmem 2048 -novblank" # Change -availablevidmem 2048 if you have less than 2 Gb video memory
##export RADV_DEBUG=nodcc # Enable if you have Big Navi videocard (Radeon RX 60xx)
#!/bin/bash
#Author: nixon
#HITMAN3.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS=""
export PW_DXGI_FROM_DXVK=1
#export MANGOHUD=1
#export PW_NVAPI_DISABLE=1 # for nvidia gpu
#!/bin/bash
#Author:
#HellbladeGame.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
#!/bin/bash
#Author: mrm0der
#LOF2.exe
#Rating=1-5
################################################
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_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
##export PW_DXVK_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_OLD_GL_STRING=0
##export PW_NVAPI_DISABLE=1
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
export PULSE_LATENCY_MSEC=120 # Fix crackling audio in games
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##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 ; }
#!/bin/bash
#Author: Aliway
#Little Nightmares II.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_WINDOWS_VER=10
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
#Praest.exe #Praest.exe
#Rating=5 #Rating=5
################################################ ################################################
export PW_VULKAN_USE=vkd3d export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS="" export LAUNCH_PARAMETERS="-dx11"
#!/bin/bash
#Author: MrModer
#RADMIR_LAUNCHER.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=0
export WINEDLLOVERRIDES="libglesv2="
#!/bin/bash
#Author: Garrett
#RockstarService.exe
#Launcher.exe
#LauncherPatcher.exe
#Rating=?
################################################
export PW_VULKAN_USE=dxvk
export PW_DLL_INSTALL="arial vcrun2019"
export PW_WINDOWS_VER=10
\ No newline at end of file
#!/bin/bash
#Author: Veil
#Secrets Of Grindea.exe
#Rating=5
################################################
export PW_VULKAN_USE=dxvk
export PW_DLL_INSTALL="faudio"
#!/bin/bash
#Author: PortWINE-Linux.ru
#Sirus Launcher.exe
#Rating=4
#####################examples###########################
export PW_VULKAN_USE=dxvk # dxvk, vkd3d or 0 for OpenGL
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_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
##export PW_DXVK_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_OLD_GL_STRING=0
##export PW_NVAPI_DISABLE=1
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##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 ; }
#!/bin/bash
#Author:
#Enderal Launcher.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_WINDOWS_VER=7
#!/bin/bash
#Author: merkli
#XR_3DA.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS="-nointro -noprefetch" # -nointro command line option to skip intro movies
# -noprefetch command line option to shorten load times
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
#avengers.exe #avengers.exe
#Rating=? #Rating=?
################################################ ################################################
export PW_VULKAN_USE=dxvk export PW_VULKAN_USE=vkd3d
export LAUNCH_PARAMETERS="" export LAUNCH_PARAMETERS=""
export WINEDLLOVERRIDES="amd_ags_x64=b" #export WINEDLLOVERRIDES="amd_ags_x64=b"
#!/bin/bash
#Author:
#gta_sa.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
export LAUNCH_PARAMETERS=""
export PW_DLL_INSTALL="d3dx9 physx"
\ No newline at end of file
#!/bin/bash
#Author: Ridbowt (Nikola P.)
#Sources: https://www.gog.com/forum/medal_of_honor_series/moh_dont_start_on_linux/post2 + https://lutris.net/games/medal-of-honor-allied-assault-war-chest/ + https://www.playground.ru/medal_of_honor_allied_assault/cheat/medal_of_honor_allied_assault_sovet_lyuboe_razreshenie_dalnost_prorisovki_pole_obzora_fov_pravilnoe_otkrytie_vseh_medalej-816472
#Comment: Резервные копии кофиг-файлов находятся в корне игры, в каталогах "/Medal of Honor/main/" + "/Medal of Honor/main/configs/", "/Medal of Honor/mainta/" + "/Medal of Honor/mainta/configs/", "/Medal of Honor/maintt/" + "/Medal of Honor/maintt/configs/". Чтобы восстановить исходные конфигурации - просто удалите в этих каталогах файлы newconfig.cfg и unnamedsoldier.cfg; после этого удалите расширение .bak у файлов newconfig.cfg.bak и unnamedsoldier.cfg.bak.
#MOHAA.exe
#moh_spearhead.exe
#moh_breakthrough.exe
#Rating=5
################################################
export PW_VULKAN_USE=0
export LAUNCH_PARAMETERS=""
export MESA_EXTENSION_MAX_YEAR=2002
export __GL_ExtensionStringVersion=17700
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" &&
echo '//
// Video Card Family: NVidia GeForce
// Video Card Driver: NVIDIA GeForce GTX 760
//
// Mhz 1100
// Vidmem 64
// Sysmem 256
//
seta com_maxfps "144"
seta cg_drawviewmodel "2"
seta cg_effectdetail "1.0"
seta cg_marks_add "1"
seta cg_max_tempmodels "1200"
seta cg_rain "1"
seta cg_reserve_tempmodels "240"
seta cg_shadows "2"
seta g_ddayfodderguys "2"
seta g_ddayfog "0"
seta g_ddayshingleguys "2"
seta r_colorbits "32"
seta r_drawstaticdecals "1"
seta r_ext_compressed_textures "1"
seta r_fastdlights "0"
seta r_fastentlight "0"
seta r_forceClampToEdge "1"
seta r_lodcap "1.0"
seta r_lodscale "1.1"
seta r_lodviewmodelcap "1.0"
seta r_maxmode "9"
seta r_picmip "0"
seta r_picmip_models "0"
seta r_picmip_sky "0"
seta r_subdivisions "1"
seta r_texturebits "32"
seta r_texturemode "GL_LINEAR_MIPMAP_LINEAR"
seta r_vidmode1024 "0"
seta r_vidmodemax "1"
seta s_khz "44"
seta ter_error "4"
seta ter_maxlod "6"
seta ter_maxtris "24576"
seta vss_draw "1"
seta vss_maxcount "15"
' | tee "$PATH_TO_GAME/main/newconfig.cfg" | tee "$PATH_TO_GAME/mainta/newconfig.cfg" | tee "$PATH_TO_GAME/maintt/newconfig.cfg" >/dev/null &&
echo '// generated by moh:aa do not modify
//
// Key Bindings
//
unbindall
bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+moveup"
bind 1 "useweaponclass pistol"
bind 2 "useweaponclass rifle"
bind 3 "useweaponclass smg"
bind 4 "useweaponclass mg"
bind 5 "useweaponclass grenade"
bind 6 "useweaponclass heavy"
bind 7 "toggleitem"
bind ` "toggleconsole"
bind a "+moveleft"
bind c "+leanright"
bind d "+moveright"
bind e "+use"
bind h "weapdrop"
bind p "pushmenu_weaponselect"
bind q "holster"
bind r "reload"
bind s "+back"
bind t "sayteam"
bind u "pushmenu_teamselect"
bind v "instamsg_main"
bind w "+forward"
bind y "say"
bind z "+leanleft"
bind PAUSE "pause"
bind LCTRL "+movedown"
bind LSHIFT "+speed"
bind F2 "ui_getplayermodel;pushmenu_dm mpoptions"
bind F3 "pushmenu Controls"
bind F4 "pushmenu_sp LoadSave"
bind F5 "savegame quick"
bind F6 "messagemode"
bind F9 "loadgame quick"
bind F12 "screenshot"
bind MOUSE1 "+attackprimary"
bind MOUSE2 "+attacksecondary"
bind MWHEELDOWN "weapprev"
bind MWHEELUP "weapnext"
//
// Cvars
//
seta ui_console "1"
seta r_mode "-1"
seta r_customWidth "1920"
seta r_customHeight "1080"
seta s_milesdriver "Miles Fast 2D Positional Audio"
seta r_gamma "1.000000"
seta r_lastValidRenderer "GeForce GTX 760/PCIe/SSE2"
seta sensitivity "10.750000"
seta s_volume "0.900000"
seta s_musicvolume "0.900000"
seta vss_maxcount "10"
seta r_texturemode "gl_linear_mipmap_linear"
seta developer "1"
//
// Aliases
//
' | tee "$PATH_TO_GAME/main/configs/unnamedsoldier.cfg" | tee "$PATH_TO_GAME/mainta/configs/unnamedsoldier.cfg" | tee "$PATH_TO_GAME/maintt/configs/unnamedsoldier.cfg" >/dev/null
else
true
fi
}
...@@ -6,3 +6,4 @@ ...@@ -6,3 +6,4 @@
export PW_VULKAN_USE=dxvk #dxvk, vkd3d or 0 for OpenGL export PW_VULKAN_USE=dxvk #dxvk, vkd3d or 0 for OpenGL
#export PW_DLL_INSTALL="" # Install DDL in port prefix (used winetricks) #export PW_DLL_INSTALL="" # Install DDL in port prefix (used winetricks)
export LAUNCH_PARAMETERS="--disable-gpu" # Additional launch options export LAUNCH_PARAMETERS="--disable-gpu" # Additional launch options
export PW_USE_TERMINAL=1
#!/bin/bash
#Author: chal55rus
#wotblitz.exe
#Rating=1-5
################################################
export PW_VULKAN_USE=dxvk
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_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
##export PW_DXVK_NO_ASYNC=1 # Disabled ASYNC for VULKAN
##export PW_USE_TERMINAL=0 # Force run in terminal
##export PW_OLD_GL_STRING=0
##export PW_NVAPI_DISABLE=1
##export PW_VKD3D_FEATURE_LEVEL=0
##export PW_NO_WRITE_WATCH=0 # Disable support for memory write watches in ntdll. This is a very dangerous hack and should only be applied if you have verified that the game can operate without write watches. This improves performance for some very specific games (e.g. CoreRT-based games).
##export PW_HIDE_NVIDIA_GPU=0
##export PW_FORCE_USE_VSYNC=2 # Vsync: 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
##export PW_WINEDBG_DISABLE=1 # Disabled WINEDBG
##export PW_FORCE_DISABLED_GAMEMOD=0 # Force disabele gamemod
##export PW_FORCE_LARGE_ADDRESS_AWARE=1 # Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. Enabled by default.
##export PULSE_LATENCY_MSEC=60 # Fix crackling audio in games
##export LAUNCH_PARAMETERS="('"+com_skipIntroVideo 1"' '"+com_skipSignInManager 1"')" # Additional launch options
##export PW_GUI_DISABLED_CS=1 # 1 = disabled GUI
##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 ; }
...@@ -14,95 +14,104 @@ if [ "${s_install}" != "1" ] && [ ! -x "`which "zenity" 2>/dev/null`" ];then ...@@ -14,95 +14,104 @@ if [ "${s_install}" != "1" ] && [ ! -x "`which "zenity" 2>/dev/null`" ];then
echo "You will need to install: zenity, and restart the port." 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 xdg-open "http://portwine-linux.ru/portwine-faq/" > /dev/null 2>&1 & exit 0
fi fi
print_error () {
PS1_old="${PS1}" && PS1="\e[40;11;31m[\u@\h \W]$"
echo "ERROR: $@"
PS1="${PS1_old}"
}
print_info () {
PS1_old="${PS1}" && PS1="\e[40;11;36m[\u@\h \W]$"
echo "INFO: $@"
PS1="${PS1_old}"
}
print_var () {
PS1_old="${PS1}" && PS1="\e[47;11;30m[\u@\h \W]$"
for vp in $@ ; do echo "${vp} = ${!vp}" ; done
PS1="${PS1_old}"
}
try_copy_file () { try_copy_file () {
if [ ! -f "$1" ] ; then if [ ! -f "$1" ] ; then print_info "file $1 not found for copy"
echo "INFO: file $1 not found for copy" elif [ -z "$2" ] ; then print_error "no way to copy file $1"
elif [ -z "$2" ] ; then else
echo "ERROR: no way to copy file $1" cp -f "$1" "$2"
else [ "$?" != 0 ] && print_error "failed to copy file $1 to $2" || return 0
cp -f "$1" "$2" fi
[ "$?" != 0 ] && echo "ERROR: failed to copy file $1 to $2" || return 0 return 1
fi
} }
try_copy_dir () { try_copy_dir () {
if [ ! -d "$1" ] ; then if [ ! -d "$1" ] ; then print_info "directory $1 not found for copy"
echo "INFO: directory $1 not found for copy" elif [ -z "$2" ] ; then print_error "no way to copy directory $1"
elif [ -z "$2" ] ; then else
echo "ERROR: no way to copy directory $1" cp -fr "$1" "$2"
else [ "$?" != 0 ] && print_error "failed to copy directory $1 to $2" || return 0
cp -fr "$1" "$2" fi
[ "$?" != 0 ] && echo "ERROR: failed to copy directory $1 to $2" || return 0 return 1
fi
} }
try_remove_file () { try_remove_file () {
if [ ! -f "$1" ] ; then if [ ! -f "$1" ] ; then print_info "file $1 not found for remove"
echo "INFO: file $1 not found for remove" else
else rm -f "$1"
rm -f "$1" [ "$?" != 0 ] && print_error "failed to remove file $1" || return 0
[ "$?" != 0 ] && echo "ERROR: failed to remove file $1" || return 0 fi
fi return 1
} }
try_remove_dir () { try_remove_dir () {
if [ ! -d "$1" ] ; then if [ ! -d "$1" ] ; then print_info "directory $1 not found for remove"
echo "INFO: directory $1 not found for remove" else
else rm -fr "$1"
rm -fr "$1" [ "$?" != 0 ] && print_error "failed to remove directory $1" || return 0
[ "$?" != 0 ] && echo "ERROR: failed to remove directory $1" || return 0 fi
fi return 1
} }
try_force_link_file () { try_force_link_file () {
if [ ! -f "$1" ] ; then if [ ! -f "$1" ] ; then print_info "file $1 not found for link"
echo "INFO: file $1 not found for link" elif [ -z "$2" ] ; then print_error "no way to link file $1"
elif [ -z "$2" ] ; then else
echo "ERROR: no way to link file $1" [ -f "$2" ] && rm -f "$2"
else ln -s "$1" "$2"
[ -f "$2" ] && rm -f "$2" [ "$?" != 0 ] && print_error "failed to link file $1 to $2" || return 0
ln -s "$1" "$2" fi
[ "$?" != 0 ] && echo "ERROR: failed to link file $1 to $2" || return 0 return 1
fi
} }
try_force_link_dir () { try_force_link_dir () {
if [ ! -d "$1" ] ; then if [ ! -d "$1" ] ; then print_info "directory $1 not found for link"
echo "INFO: directory $1 not found for link" elif [ -z "$2" ] ; then print_error "no way to link directory $1"
elif [ -z "$2" ] ; then else
echo "ERROR: no way to link directory $1" check_target_dir=`echo ${1} | awk -F/ '{print $NF}'`
else [ -d "${2}${check_target_dir}" ] && rm -fr "${2}${check_target_dir}"
check_target_dir=`echo ${1} | awk -F/ '{print $NF}'` ln -s "$1" "$2"
[ -d "${2}${check_target_dir}" ] && rm -fr "${2}${check_target_dir}" [ "$?" != 0 ] && print_error "failed to link directory $1 to $2" || return 0
ln -s "$1" "$2" fi
[ "$?" != 0 ] && echo "ERROR: failed to link directory $1 to $2" || return 0 return 1
fi
} }
try_download () { try_download () {
wget -c -t 3 -T 2 "$1" --output-document="$2" wget -c -t 3 -T 2 "$1" --output-document="$2"
[ "$?" != 0 ] && echo "ERROR: failed to download $1. Scipping." || return 0 [ "$?" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
} }
create_new_dir () { create_new_dir () {
if [ ! -d "$1" ] ; then if [ ! -d "$1" ] ; then
mkdir -p "$1" mkdir -p "$1"
fi fi
}
var_winedlloverride_update () {
if [ ! -z "${WINEDLLOVERRIDES}" ]
then export WINEDLLOVERRIDES="${1};${WINEDLLOVERRIDES}"
else export WINEDLLOVERRIDES="${1}"
fi
} }
sszen() { sszen() {
zenity --progress --title="Settings..." --text="Updating parameters" --no-cancel --pulsate --auto-close --width 400 zenity --progress --title="Settings..." --text="Updating parameters" --no-cancel --pulsate --auto-close --width 400
} }
PW_START_PROGRESS_BAR () { PW_START_PROGRESS_BAR () {
"${pw_yad}" --progress --progress-text="Start ${portname}... Please wait..." --pulsate --close-on-unfocus \ "${pw_yad}" --progress --progress-text="Start ${portname}... Please wait..." --pulsate --close-on-unfocus \
--no-buttons --undecorated --center --skip-taskbar --width=600 --wrap-width=500 & --no-buttons --undecorated --center --skip-taskbar --width=600 --wrap-width=500 &
export start_progress_yad_pid=$(echo $!) export start_progress_yad_pid=$(echo $!)
} }
PW_STOP_PROGRESS_BAR () { PW_STOP_PROGRESS_BAR () {
if [ ! -z "${start_progress_yad_pid}" ] ; then if [ ! -z "${start_progress_yad_pid}" ] ; then
kill "${start_progress_yad_pid}" kill "${start_progress_yad_pid}"
fi fi
} }
export PW_WINDOWS_VER="7" export PW_WINDOWS_VER="7"
cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)" cd "$(dirname "`readlink -f "$0"`")" && export PORT_SCRIPTS_PATH="$(pwd)"
...@@ -130,7 +139,8 @@ fi ...@@ -130,7 +139,8 @@ fi
if [ ! -e "${PORT_WINE_TMP_PATH}/${portname}_ver" ]; then if [ ! -e "${PORT_WINE_TMP_PATH}/${portname}_ver" ]; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver" echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi fi
export pw_libs_ver="_v5"
export pw_libs_ver="_v6"
export pw_gecko_mono_ver="_v1" export pw_gecko_mono_ver="_v1"
export PW_VULKAN_DLL="${PORT_WINE_PATH}"/data/vulkan export PW_VULKAN_DLL="${PORT_WINE_PATH}"/data/vulkan
export WINEDIR="${PORT_WINE_PATH}"/data/dist export WINEDIR="${PORT_WINE_PATH}"/data/dist
...@@ -145,9 +155,8 @@ export urlg="https://portwine-linux.ru/portwine-faq/" ...@@ -145,9 +155,8 @@ export urlg="https://portwine-linux.ru/portwine-faq/"
export PW_FTP_URL="https://portwine-linux.ru/ftp" export PW_FTP_URL="https://portwine-linux.ru/ftp"
export PW_TERM="" export PW_TERM=""
export PW_WINE_VER_DXVK="" export PW_WINE_VER_DXVK=""
if [ -z "${WINEDLLOVERRIDES}" ] ; then var_winedlloverride_update "winemenubuilder.exe="
export WINEDLLOVERRIDES="winemenubuilder.exe="
fi
zen_width=500 zen_width=500
if [ -f "${WINEDIR}"_dxvk/version ]; then if [ -f "${WINEDIR}"_dxvk/version ]; then
read PW_WINE_VER_DXVK < "${WINEDIR}"_dxvk/version read PW_WINE_VER_DXVK < "${WINEDIR}"_dxvk/version
...@@ -212,443 +221,445 @@ if [ ! -z "${PORTWINE_DB}" ]; then ...@@ -212,443 +221,445 @@ if [ ! -z "${PORTWINE_DB}" ]; then
fi fi
fi fi
######################################################################## ########################################################################
START_PORTWINE () START_PORTWINE ()
{ {
if [ "${PW_USE_TERMINAL}" = "1" ]; then if [ "${PW_USE_TERMINAL}" = "1" ]; then
if [ -x "`which konsole 2>/dev/null`" ]; then if [ -x "`which konsole 2>/dev/null`" ]; then
export PW_TERM="konsole -e" export PW_TERM="konsole -e"
elif [ -x "`which xterm 2>/dev/null`" ]; then elif [ -x "`which xterm 2>/dev/null`" ]; then
export PW_TERM="xterm -e" export PW_TERM="xterm -e"
elif [ -x "`which gnome-terminal 2>/dev/null`" ]; then elif [ -x "`which gnome-terminal 2>/dev/null`" ]; then
export PW_TERM="gnome-terminal -- $SHELL -c" export PW_TERM="gnome-terminal -- $SHELL -c"
elif [ -x "`which lxterminal 2>/dev/null`" ]; then elif [ -x "`which lxterminal 2>/dev/null`" ]; then
export PW_TERM="lxterminal -e" export PW_TERM="lxterminal -e"
else
export PW_TERM="${PW_XTERM}"
fi
fi
PW_UPDATE
if [ ! -z "${PW_VULKAN_USE}" ]; then
export var_pw_vulkan="${PW_VULKAN_USE}"
echo "${var_pw_vulkan}" > "${PORT_WINE_TMP_PATH}/pw_vulkan"
else else
export PW_TERM="${PW_XTERM}" read "var_pw_vulkan" < "${PORT_WINE_TMP_PATH}/pw_vulkan" && export var_pw_vulkan
fi fi
fi PW_START_PROGRESS_BAR
PW_UPDATE if [ "${var_pw_vulkan}" = "0" ]; then
if [ ! -z "${PW_VULKAN_USE}" ]; then if [ -d "${WINEDIR}_dxvk" ]; then
export var_pw_vulkan="${PW_VULKAN_USE}" export WINEDIR="${WINEDIR}_dxvk"
echo "${var_pw_vulkan}" > "${PORT_WINE_TMP_PATH}/pw_vulkan"
else
read "var_pw_vulkan" < "${PORT_WINE_TMP_PATH}/pw_vulkan" && export var_pw_vulkan
fi
PW_START_PROGRESS_BAR
if [ "${var_pw_vulkan}" = "0" ]; then
if [ -d "${WINEDIR}_dxvk" ]; then
export WINEDIR="${WINEDIR}_dxvk"
fi
export MESA_GLSL_CACHE_DIR="${PORT_WINE_TMP_PATH}"
export GL_NO_DSO_FINALIZER=1 #Modded by Rus_Nor
export GL_YIELD="NOTHING" #Modded by Rus_Nor
export GL_SHARPEN_IGNORE_FILM_GRAIN=0 #Modded by Rus_Nor
export GL_SHARPEN_ENABLE=1 #Modded by Rus_Nor
export __GL_SHARPEN_VALUE=0 #Modded by Rus_Nor
for wine_build_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 ; do
try_copy_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
done
try_copy_file "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/"
export WINEESYNC=""
echo "Use OpenGL"
elif [ "${var_pw_vulkan}" = "dxvk" ]; then
if [ -d "${WINEDIR}_dxvk" ]; then
export WINEDIR="${WINEDIR}_dxvk"
fi
for wine_dxvk_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 dxgi ; do
try_copy_file "${PW_VULKAN_DLL}/dxvk/x32/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${PW_VULKAN_DLL}/dxvk/x64/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
if [ ! -z "${WINEDLLOVERRIDES}" ] ; then
export WINEDLLOVERRIDES="${wine_dxvk_dll}=n;${WINEDLLOVERRIDES}"
else
export WINEDLLOVERRIDES="${wine_dxvk_dll}=n"
fi fi
done export MESA_GLSL_CACHE_DIR="${PORT_WINE_TMP_PATH}"
echo "Use DXVK (DX9-DX11 to Vulkan)" export GL_NO_DSO_FINALIZER=1 #Modded by Rus_Nor
else export GL_YIELD="NOTHING" #Modded by Rus_Nor
if [ -d "${WINEDIR}_vkd3d" ]; then export GL_SHARPEN_IGNORE_FILM_GRAIN=0 #Modded by Rus_Nor
export WINEDIR="${WINEDIR}_vkd3d" export GL_SHARPEN_ENABLE=1 #Modded by Rus_Nor
fi export __GL_SHARPEN_VALUE=0 #Modded by Rus_Nor
for wine_vkd3d_dll in d3d12 ; do for wine_build_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 ; do
try_copy_file "${PW_VULKAN_DLL}/vkd3d-proton/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" try_copy_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${PW_VULKAN_DLL}/vkd3d-proton/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/" try_copy_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
if [ ! -z "${WINEDLLOVERRIDES}" ] ; then done
export WINEDLLOVERRIDES="${wine_vkd3d_dll}=n;${WINEDLLOVERRIDES}" try_copy_file "${WINEDIR}"/lib/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/syswow64/"
else try_copy_file "${WINEDIR}"/lib64/wine/fakedlls/dxgi.dll "${WINEPREFIX}/drive_c/windows/system32/"
export WINEDLLOVERRIDES="${wine_vkd3d_dll}=n" var_winedlloverride_update "dxgi=b"
export WINEESYNC=""
echo "Use OpenGL"
elif [ "${var_pw_vulkan}" = "dxvk" ]; then
if [ -d "${WINEDIR}_dxvk" ]; then
export WINEDIR="${WINEDIR}_dxvk"
fi fi
done for wine_dxvk_dll in d3d11 d3d10 d3d10core d3d10_1 d3d9 dxgi ; do
try_copy_file "${WINEDIR}/lib/wine/fakedlls/dxgi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" try_copy_file "${PW_VULKAN_DLL}/dxvk/x32/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/fakedlls/dxgi.dll" "${WINEPREFIX}/drive_c/windows/system32/" try_copy_file "${PW_VULKAN_DLL}/dxvk/x64/${wine_dxvk_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
export PW_WINDOWS_VER="10" [ "$?" == 0 ] && var_winedlloverride_update "${wine_dxvk_dll}=n"
echo "Use VKD3D (DX12 to vulkan)" done
fi echo "Use DXVK (DX9-DX11 to Vulkan)"
try_copy_file "${PW_VULKAN_DLL}/dxvk/x32/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" else
try_copy_file "${PW_VULKAN_DLL}/dxvk/x64/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/system32/" if [ -d "${WINEDIR}_vkd3d" ]; then
export WINEDIR="${WINEDIR}_vkd3d"
fi
for wine_vkd3d_dll in d3d12 ; do
try_copy_file "${PW_VULKAN_DLL}/vkd3d-proton/x86/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${PW_VULKAN_DLL}/vkd3d-proton/x64/${wine_vkd3d_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
[ "$?" == 0 ] && var_winedlloverride_update "${wine_vkd3d_dll}=n"
done
try_copy_file "${WINEDIR}/lib/wine/fakedlls/dxgi.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/fakedlls/dxgi.dll" "${WINEPREFIX}/drive_c/windows/system32/"
var_winedlloverride_update "dxgi=b"
export PW_WINDOWS_VER="10"
echo "Use VKD3D (DX12 to vulkan)"
fi
try_copy_file "${PW_VULKAN_DLL}/dxvk/x32/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${PW_VULKAN_DLL}/dxvk/x64/dxvk_config.dll" "${WINEPREFIX}/drive_c/windows/system32/"
[ "$?" == 0 ] && var_winedlloverride_update "dxvk_config.dll=n"
export WINELOADER="${WINEDIR}/bin/wine" export WINELOADER="${WINEDIR}/bin/wine"
export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine" export WINEDLLPATH="${WINEDIR}/lib64/wine:${WINEDIR}/lib/wine"
export WINESERVER="${WINEDIR}/bin/wineserver" export WINESERVER="${WINEDIR}/bin/wineserver"
if [ ! -z "${PATH}" ] ; then if [ ! -z "${PATH}" ]
export PATH="${WINEDIR}/bin:${PATH}" then export PATH="${WINEDIR}/bin:${PATH}"
else else export PATH="${WINEDIR}/bin"
export PATH="${WINEDIR}/bin" fi
fi export WINE="${WINELOADER}"
export WINE="${WINELOADER}"
rm -f "${WINEDIR}"*/lib*/*steam* rm -f "${WINEDIR}"*/lib*/*steam*
rm -f "${WINEDIR}"*/lib*/wine/*steam* rm -f "${WINEDIR}"*/lib*/wine/*steam*
rm -f "${WINEDIR}"*/lib*/wine/fakedlls/*steam* rm -f "${WINEDIR}"*/lib*/wine/fakedlls/*steam*
rm -f "${WINEPREFIX}/drive_c/windows/system32"/steam* rm -f "${WINEPREFIX}/drive_c/windows/system32"/steam*
rm -f "${WINEPREFIX}/drive_c/windows/syswow64"/steam* rm -f "${WINEPREFIX}/drive_c/windows/syswow64"/steam*
try_copy_file "${WINEDIR}/share/fonts/"LiberationSans-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arial.ttf try_copy_file "${WINEDIR}/share/fonts/"LiberationSans-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arial.ttf
try_copy_file "${WINEDIR}/share/fonts/"LiberationSans-Bold.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arialbd.ttf try_copy_file "${WINEDIR}/share/fonts/"LiberationSans-Bold.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"arialbd.ttf
try_copy_file "${WINEDIR}/share/fonts/"LiberationSerif-Regular.ttf "${WINEPREFIX}/drive_c/windows/Fonts/"times.ttf 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/"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 try_copy_file "${WINEDIR}/share/fonts/"SourceHanSansSCRegular.otf "${WINEPREFIX}/drive_c/windows/Fonts/"msyh.ttf
for wine_build_dll in ntdll mf mf3216 mferror mfmediaengine mfplat mfplay mfreadwrite vulkan-1 ; do for wine_build_dll in ntdll mf mf3216 mferror mfmediaengine mfplat mfplay mfreadwrite vulkan-1 ; do #sqmapi msmpeg2vdec msmpeg2adec colorcnv
try_copy_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/" try_copy_file "${WINEDIR}/lib/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/syswow64/"
try_copy_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/" try_copy_file "${WINEDIR}/lib64/wine/${wine_build_dll}.dll" "${WINEPREFIX}/drive_c/windows/system32/"
done [ "$?" == 0 ] && var_winedlloverride_update "${wine_build_dll}=b"
export WINEDLLOVERRIDES="mf,mf3216,mferror,mfmediaengine,mfplat,mfplay,mfreadwrite=b;steam_api,steam_api64,steamclient,steamclient64=n;${WINEDLLOVERRIDES}" done
export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/gstreamer-1.0" var_winedlloverride_update "vstdlib_s,tier0_s,steam,steam2,steam_api,steam_api64,steamclient,steamclient64=n"
export WINE_GST_REGISTRY_DIR="${PORT_WINE_TMP_PATH}" export GST_PLUGIN_SYSTEM_PATH_1_0="${WINEDIR}/lib64/gstreamer-1.0:${WINEDIR}/gstreamer-1.0"
export MEDIACONV_AUDIO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/audio.foz export WINE_GST_REGISTRY_DIR="${PORT_WINE_TMP_PATH}"
export MEDIACONV_AUDIO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_audio.foz export MEDIACONV_AUDIO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/audio.foz
export MEDIACONV_VIDEO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/video.foz export MEDIACONV_AUDIO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_audio.foz
export MEDIACONV_VIDEO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_video.foz export MEDIACONV_VIDEO_DUMP_FILE="${PORT_WINE_TMP_PATH}"/video.foz
export MEDIACONV_VIDEO_TRANSCODED_FILE="${PORT_WINE_TMP_PATH}"/transcoded_video.foz
if [ ! -z "${PW_LOG}" ] && [ "${PW_LOG}" != 0 ] ; then if [ ! -z "${PW_LOG}" ] && [ "${PW_LOG}" != 0 ] ; then
export WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg" export WINEDEBUG="fixme-all,err+loaddll,err+dll,err+file,err+reg"
export DXVK_LOG_LEVEL="info" export DXVK_LOG_LEVEL="info"
export VKD3D_DEBUG="warn" export VKD3D_DEBUG="warn"
export WINE_MONO_TRACE="E:System.NotImplementedException" export WINE_MONO_TRACE="E:System.NotImplementedException"
else else
export WINEDEBUG="-all" export WINEDEBUG="-all"
export DXVK_LOG_LEVEL="none" export DXVK_LOG_LEVEL="none"
export VKD3D_DEBUG="none" export VKD3D_DEBUG="none"
export DXVK_LOG_PATH="none" export DXVK_LOG_PATH="none"
fi fi
#default wine-mono override for FNA games #default wine-mono override for FNA games
export WINE_MONO_OVERRIDES="Microsoft.Xna.Framework.*,Gac=n" export WINE_MONO_OVERRIDES="Microsoft.Xna.Framework.*,Gac=n"
if [ ! -z "${PW_NO_ESYNC}" ] && [ "${PW_NO_ESYNC}" != 0 ] ; then if [ ! -z "${PW_NO_ESYNC}" ] && [ "${PW_NO_ESYNC}" != 0 ]
export WINEESYNC="" then export WINEESYNC=""
else else export WINEESYNC="1"
export WINEESYNC="1" fi
fi if [ ! -z "${PW_NO_FSYNC}" ] && [ "${PW_NO_FSYNC}" != 0 ] ; then
if [ ! -z "${PW_NO_FSYNC}" ] && [ "${PW_NO_FSYNC}" != 0 ] ; then export WINEFSYNC=""
export WINEFSYNC="" export WINEFSYNC_FUTEX2="0"
export WINEFSYNC_FUTEX2="0" else
else export WINEFSYNC="1"
export WINEFSYNC="1" export WINEFSYNC_FUTEX2="1"
export WINEFSYNC_FUTEX2="1" fi
fi if [ ! -z "${PW_FORCE_LARGE_ADDRESS_AWARE}" ] && [ "${PW_FORCE_LARGE_ADDRESS_AWARE}" != 0 ] ; then
if [ ! -z "${PW_FORCE_LARGE_ADDRESS_AWARE}" ] && [ "${PW_FORCE_LARGE_ADDRESS_AWARE}" != 0 ] ; then export WINE_LARGE_ADDRESS_AWARE="1"
export WINE_LARGE_ADDRESS_AWARE="1" fi
fi if [ ! -z "${PW_OLD_GL_STRING}" ] && [ "${PW_OLD_GL_STRING}" != 0 ] ; then
if [ ! -z "${PW_OLD_GL_STRING}" ] && [ "${PW_OLD_GL_STRING}" != 0 ] ; then export MESA_EXTENSION_MAX_YEAR="2003" #mesa override
export MESA_EXTENSION_MAX_YEAR="2003" #mesa override export __GL_ExtensionStringVersion="17700" #nvidia override
export __GL_ExtensionStringVersion="17700" #nvidia override fi
fi if [ ! -z "${PW_NO_WRITE_WATCH}" ] && [ "${PW_NO_WRITE_WATCH}" != 0 ] ; then
if [ ! -z "${PW_NO_WRITE_WATCH}" ] && [ "${PW_NO_WRITE_WATCH}" != 0 ] ; then export WINE_DISABLE_WRITE_WATCH="1"
export WINE_DISABLE_WRITE_WATCH="1" fi
fi if [ ! -z "${PW_DXVK_NO_ASYNC}" ] && [ "${PW_DXVK_NO_ASYNC}" != 0 ] ; then
if [ ! -z "${PW_DXVK_NO_ASYNC}" ] && [ "${PW_DXVK_NO_ASYNC}" != 0 ] ; then export RADV_DEBUG="llvm"
export RADV_DEBUG="llvm" fi
fi if [ ! -z "${PW_NVAPI_DISABLE}" ] && [ "${PW_NVAPI_DISABLE}" != 0 ] ; then
if [ ! -z "${PW_NVAPI_DISABLE}" ] && [ "${PW_NVAPI_DISABLE}" != 0 ] ; then var_winedlloverride_update "nvapi,nvapi64="
export WINEDLLOVERRIDES="nvapi,nvapi64=;${WINEDLLOVERRIDES}" fi
fi if [ ! -z "${PW_WINEDBG_DISABLE}" ] && [ "${PW_WINEDBG_DISABLE}" != 0 ] ; then
var_winedlloverride_update "winedbg.exe="
fi
if [ ! -z "${PW_HIDE_NVIDIA_GPU}" ] && [ "${PW_HIDE_NVIDIA_GPU}" != 0 ] ; then
export WINE_HIDE_NVIDIA_GPU="1"
fi
if [ ! -z "${PW_VKD3D_FEATURE_LEVEL}" ] && [ "${PW_VKD3D_FEATURE_LEVEL}" != 0 ] ; then
export VKD3D_FEATURE_LEVEL="12_0"
fi
if [ ! -z "${PW_WINEDBG_DISABLE}" ] && [ "${PW_WINEDBG_DISABLE}" != 0 ] ; then create_new_dir "${PORT_WINE_TMP_PATH}/dxvk_cache"
export WINEDLLOVERRIDES="winedbg.exe=;${WINEDLLOVERRIDES}" export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"/dxvk_cache
fi export DXVK_STATE_CACHE=1
if [ ! -z "${PW_HIDE_NVIDIA_GPU}" ] && [ "${PW_HIDE_NVIDIA_GPU}" != 0 ] ; then export STAGING_SHARED_MEMORY=1
export WINE_HIDE_NVIDIA_GPU="1" export optirun_on=
fi export check_optimus_manager=
if [ ! -z "${PW_VKD3D_FEATURE_LEVEL}" ] && [ "${PW_VKD3D_FEATURE_LEVEL}" != 0 ] ; then export PW_NVIDIA="$(lspci | grep NVIDIA)"
export VKD3D_FEATURE_LEVEL="12_0" if [ -x "`which optimus-manager 2>/dev/null`" ]; then
fi export check_optimus_manager=`optimus-manager --status | grep Current | cut -f 2 -d':' | sed -e 's/^[[:space:]]*//'`
if [ ! -d "${PORT_WINE_TMP_PATH}"/dxvk_cache ] ; then fi
mkdir -p "${PORT_WINE_TMP_PATH}"/dxvk_cache if [ ! -z "${PW_NVIDIA}" ] && [ "${check_optimus_manager}" != "intel" ]; then
fi if [ "${check_optimus_manager}" = "nvidia" ]; then
export DXVK_STATE_CACHE_PATH="${PORT_WINE_TMP_PATH}"/dxvk_cache export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
export DXVK_STATE_CACHE=1 elif [ -x "`which primusrun 2>/dev/null`" ]; then
export STAGING_SHARED_MEMORY=1 export optirun_on="primusrun"
export optirun_on= export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
export check_optimus_manager= elif [ -x "`which optirun 2>/dev/null`" ]; then
export PW_NVIDIA="$(lspci | grep NVIDIA)" export optirun_on="optirun -b primus"
if [ -x "`which optimus-manager 2>/dev/null`" ]; then export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
export check_optimus_manager=`optimus-manager --status | grep Current | cut -f 2 -d':' | sed -e 's/^[[:space:]]*//'` elif [ -x "`which prime-run 2>/dev/null`" ]; then
fi export optirun_on="prime-run"
if [ ! -z "${PW_NVIDIA}" ] && [ "${check_optimus_manager}" != "intel" ]; then export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
if [ "${check_optimus_manager}" = "nvidia" ]; then fi
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json export __NV_PRIME_RENDER_OFFLOAD=1
elif [ -x "`which primusrun 2>/dev/null`" ]; then export __GLX_VENDOR_LIBRARY_NAME=nvidia
export optirun_on="primusrun" if [ ! -d "${PORT_WINE_TMP_PATH}"/gl_shader_cache ] ; then
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json mkdir -p "${PORT_WINE_TMP_PATH}"/gl_shader_cache
elif [ -x "`which optirun 2>/dev/null`" ]; then fi
export optirun_on="optirun -b primus" export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache"
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json export __GL_SHADER_DISK_CACHE=1
elif [ -x "`which prime-run 2>/dev/null`" ]; then export __GL_SHADER_DISK_CACHE_SIZE=1000000000
export optirun_on="prime-run" export __GL_DXVK_OPTIMIZATIONS=1
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json else
fi export DRI_PRIME=1
export __NV_PRIME_RENDER_OFFLOAD=1 fi
export __GLX_VENDOR_LIBRARY_NAME=nvidia case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT
if [ ! -d "${PORT_WINE_TMP_PATH}"/gl_shader_cache ] ; then "0")
mkdir -p "${PORT_WINE_TMP_PATH}"/gl_shader_cache export vblank_mode=0
fi export __GL_SYNC_TO_VBLANK=0 ;;
export __GL_SHADER_DISK_CACHE_PATH="${PORT_WINE_TMP_PATH}/gl_shader_cache" "1")
export __GL_SHADER_DISK_CACHE=1 export vblank_mode=1
export __GL_SHADER_DISK_CACHE_SIZE=1000000000 export __GL_SYNC_TO_VBLANK=1 ;;
export __GL_DXVK_OPTIMIZATIONS=1 esac
else #export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/"
export DRI_PRIME=1 export int_xneur=0
fi if [ $(pgrep xneur)>'0' ]; then
case "$PW_FORCE_USE_VSYNC" in # 0-FORCE_OFF, 1-FORCE_ON, 2-BY_DEFAULT killall xneur
"0") export int_xneur=1
export vblank_mode=0 fi
export __GL_SYNC_TO_VBLANK=0 ;; export PW_XKBD="$(setxkbmap -query | grep -w ru | awk '{print($2)}')"
"1") if [ ! -z ${PW_XKBD} ]; then
export vblank_mode=1 setxkbmap us,ru
export __GL_SYNC_TO_VBLANK=1 ;; fi
esac if [ -x "`which "gamemoderun" 2>/dev/null`" ] && [ "$PW_FORCE_DISABLED_GAMEMOD" -eq "0" ]; then
#export DXVK_CONFIG_FILE="${PORT_WINE_PATH}/data/" export PW_GAMEMODERUN=1
export int_xneur=0 echo "Gamemod will be launched."
if [ $(pgrep xneur)>'0' ]; then else
killall xneur export PW_GAMEMODERUN=0
export int_xneur=1 echo "Gamemod is not installed or disabled in vars script: PW_FORCE_DISABLED_GAMEMOD=$PW_FORCE_DISABLED_GAMEMOD"
fi fi
export PW_XKBD="$(setxkbmap -query | grep -w ru | awk '{print($2)}')" PW_CREATE_PFX
if [ ! -z ${PW_XKBD} ]; then RUN_WINETRICKS_FROM_DB
setxkbmap us,ru ADD_IN_START_PORTWINE
fi
if [ -x "`which "gamemoderun" 2>/dev/null`" ] && [ "$PW_FORCE_DISABLED_GAMEMOD" -eq "0" ]; then
export PW_GAMEMODERUN=1
echo "Gamemod will be launched."
else
export PW_GAMEMODERUN=0
echo "Gamemod is not installed or disabled in vars script: PW_FORCE_DISABLED_GAMEMOD=$PW_FORCE_DISABLED_GAMEMOD"
fi
PW_CREATE_PFX
RUN_WINETRICKS_FROM_DB
ADD_IN_START_PORTWINE
} }
WAIT_WINESERVER () { WAIT_WINESERVER () {
sleep 3 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 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 sleep 1
done done
} }
KILL_PORTWINE () { KILL_PORTWINE () {
wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}') #modded by Cefeiko wine_pids=$(ls -l /proc/*/exe 2>/dev/null | grep -ie ${portname} | grep -E 'wine(64)?-preloader|wineserver' | awk -F/ '{print $3}') #modded by Cefeiko
if [ ! -z "${wine_pids}" ] ; then if [ ! -z "${wine_pids}" ] ; then
"${WINESERVER}" -k "${WINESERVER}" -k
kill -9 ${wine_pids} kill -9 ${wine_pids}
fi fi
} }
STOP_PORTWINE () { STOP_PORTWINE () {
WAIT_WINESERVER WAIT_WINESERVER
ADD_IN_STOP_PORTWINE ADD_IN_STOP_PORTWINE
if [ "$int_xneur" = "1" ]; then if [ "$int_xneur" = "1" ]; then
xneur & xneur &
fi fi
if [ ! -z ${PW_XKBD} ]; then if [ ! -z ${PW_XKBD} ]; then
setxkbmap ${PW_XKBD} setxkbmap ${PW_XKBD}
fi fi
PW_STOP_PROGRESS_BAR PW_STOP_PROGRESS_BAR
} }
UPDATE_WINETRICKS () { UPDATE_WINETRICKS () {
W_TRX_URL="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks" W_TRX_URL="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
W_TRX_EXT_VER="$(curl --connect-timeout 2 -s --list-only ${W_TRX_URL} | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')" W_TRX_EXT_VER="$(curl -s --list-only ${W_TRX_URL} | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
if [ ! -f "${PORT_WINE_TMP_PATH}/winetricks" ] ; then print_info "Version winetricks on server: ${W_TRX_EXT_VER}"
try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks" if [ ! -f "${PORT_WINE_TMP_PATH}/winetricks" ] ; then
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
else
W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
if [ $W_TRX_INT_VER != $W_TRX_EXT_VER ] ; then
rm -f "${PORT_WINE_TMP_PATH}/winetricks"
try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks" try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks"
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks" chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
fi else
fi #modded by Cefeiko W_TRX_INT_VER="$(cat "${PORT_WINE_TMP_PATH}/winetricks" | grep -i 'WINETRICKS_VERSION=' | sed 's/WINETRICKS_VERSION=//')"
sed -i '/w_try winetricks_early_wine cmd/d' "${PORT_WINE_TMP_PATH}/winetricks" print_info "Version winetricks in port: ${W_TRX_EXT_VER}"
try_remove_dir "${HOME}/.cache/winetricks/" if [ $W_TRX_INT_VER != $W_TRX_EXT_VER ] ; then
rm -f "${PORT_WINE_TMP_PATH}/winetricks"
try_download "${W_TRX_URL}" "${PORT_WINE_TMP_PATH}/winetricks"
[ "$?" == 0 ] && print_info "Winetricks version in port has been updated"
chmod u+x "${PORT_WINE_TMP_PATH}/winetricks"
fi
fi #modded by Cefeiko
sed -i '/w_try winetricks_early_wine cmd/d' "${PORT_WINE_TMP_PATH}/winetricks"
try_remove_dir "${HOME}/.cache/winetricks/"
} }
RUN_WINETRICKS_FROM_DB () { RUN_WINETRICKS_FROM_DB () {
UPDATE_WINETRICKS UPDATE_WINETRICKS
if [ ! -z "${PW_DLL_INSTALL}" ]; then if [ ! -z "${PW_DLL_INSTALL}" ]; then
PW_STOP_PROGRESS_BAR
export USE_WT_FROM_DB=0
if [ -e "${WINEPREFIX}/winetricks.log" ] ; then
for need_install_dll_to_pfx in ${PW_DLL_INSTALL} ; do
grep "${need_install_dll_to_pfx}" "${WINEPREFIX}/winetricks.log"
if [ "$?" == "1" ] ; then
export USE_WT_FROM_DB=1
break
fi
done
else
export USE_WT_FROM_DB=1
fi
if [ "${USE_WT_FROM_DB}" == "1" ] ; then
UPDATE_WINETRICKS
PW_STOP_PROGRESS_BAR PW_STOP_PROGRESS_BAR
${PW_XTERM} "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q ${PW_DLL_INSTALL} export USE_WT_FROM_DB=0
if [ -e "${WINEPREFIX}/winetricks.log" ] ; then
for need_install_dll_to_pfx in ${PW_DLL_INSTALL} ; do
grep "${need_install_dll_to_pfx}" "${WINEPREFIX}/winetricks.log"
if [ "$?" == "1" ] ; then
export USE_WT_FROM_DB=1
break
fi
done
else
export USE_WT_FROM_DB=1
fi
if [ "${USE_WT_FROM_DB}" == "1" ] ; then
UPDATE_WINETRICKS
PW_STOP_PROGRESS_BAR
${PW_XTERM} "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q ${PW_DLL_INSTALL}
PW_START_PROGRESS_BAR
fi
PW_START_PROGRESS_BAR PW_START_PROGRESS_BAR
fi fi
PW_START_PROGRESS_BAR if [[ -z `cat "${WINEPREFIX}/system.reg" | grep "Windows $PW_WINDOWS_VER"` ]] ; then
fi if [ ! -z "${PW_WINDOWS_VER}" ] && [ `echo "$PW_WINDOWS_VER" | sed 's/.*/\L&/'` == "xp" ] ; then
if [[ -z `cat "${WINEPREFIX}/system.reg" | grep "Windows $PW_WINDOWS_VER"` ]] ; then export PW_WINDOWS_VER="xp64"
if [ ! -z "${PW_WINDOWS_VER}" ] && [ `echo "$PW_WINDOWS_VER" | sed 's/.*/\L&/'` == "xp" ] ; then fi
export PW_WINDOWS_VER="xp64" "${PW_RUNTIME}" "${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
echo "Set to win${PW_WINDOWS_VER}"
fi fi
"${PW_RUNTIME}" "${WINELOADER}" winecfg -v `echo "win${PW_WINDOWS_VER}" | sed 's/.*/\L&/'`
echo "Set to win${PW_WINDOWS_VER}"
fi
} }
PW_UPDATE () { PW_UPDATE () {
if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then if [ ! -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver" echo "10" > "${PORT_WINE_TMP_PATH}/${portname}_ver"
fi fi
if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then if [ ! -f "${PORT_WINE_TMP_PATH}/update_notifier" ] ; then
echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier" echo "1" > "${PORT_WINE_TMP_PATH}/update_notifier"
fi fi
read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier" read "update_not" < "${PORT_WINE_TMP_PATH}/update_notifier"
if [ "${update_not}" = "1" ] ; then if [ "${update_not}" = "1" ] ; then
try_download "${PW_FTP_URL}/current_version/${portname}_ver" "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" && try_download "${PW_FTP_URL}/current_version/${portname}_ver" "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" &&
if [ -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then if [ -f "${PORT_WINE_TMP_PATH}/${portname}_ver" ] ; then
read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" read current_ver < "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
read install_ver < "${PORT_WINE_TMP_PATH}/${portname}_ver" read install_ver < "${PORT_WINE_TMP_PATH}/${portname}_ver"
try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_cur_ver" try_remove_file "${PORT_WINE_TMP_PATH}/${portname}_cur_ver"
if [ "${current_ver}" -gt "${install_ver}" ] ; then if [ "${current_ver}" -gt "${install_ver}" ] ; then
xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=220 --column="${inst_set}" --column "${port_upd3}" \ xsd=`zenity --title "${port_upd1}" --text "${port_upd2}" --list --radiolist --height=220 --column="${inst_set}" --column "${port_upd3}" \
TRUE "${port_upd4}" \ TRUE "${port_upd4}" \
FALSE "${port_upd5}" \ FALSE "${port_upd5}" \
FALSE "${port_upd6}" ` FALSE "${port_upd6}" `
case $xsd in case $xsd in
"${port_upd4}") "${port_upd4}")
"${WINESERVER}" -k "${WINESERVER}" -k
xdg-open $porturl xdg-open $porturl
exit 0 ;; exit 0 ;;
"${port_upd5}") "${port_upd5}")
echo " " ;; echo " " ;;
"${port_upd6}") "${port_upd6}")
echo "0" > "${PORT_WINE_TMP_PATH}/update_notifier" ;; echo "0" > "${PORT_WINE_TMP_PATH}/update_notifier" ;;
esac esac
fi fi
fi fi
fi fi
if [ ! -f "${HOME}/.config/.PortTime" ] ; then if [ ! -f "${HOME}/.config/.PortTime" ] ; then
echo "10" > "${HOME}/.config/.PortTime" echo "10" > "${HOME}/.config/.PortTime"
fi fi
read "port_time" < "${HOME}/.config/.PortTime" read "port_time" < "${HOME}/.config/.PortTime"
if [ "${port_time}" -gt "1" ] ; then if [ "${port_time}" -gt "1" ] ; then
port_time=$((${port_time}-1)) port_time=$((${port_time}-1))
echo "${port_time}" > "${HOME}/.config/.PortTime" echo "${port_time}" > "${HOME}/.config/.PortTime"
else else
xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=240 --column="${inst_set3}" --column "${port_time3}" \ xsd2=`zenity --title "${port_time1}" --text "${port_time2}" --list --radiolist --height=240 --column="${inst_set3}" --column "${port_time3}" \
TRUE "${port_time4}" \ TRUE "${port_time4}" \
FALSE "${port_time5}" \ FALSE "${port_time5}" \
FALSE "${port_time6}" ` FALSE "${port_time6}" `
if [ $? = 1 ] ; then if [ $? = 1 ] ; then
echo "1" > "${HOME}/.config/.PortTime" echo "1" > "${HOME}/.config/.PortTime"
else else
case $xsd2 in case $xsd2 in
"${port_time4}") "${port_time4}")
if [ ! -z "$(command -v sensible-browser)" ]; then if [ ! -z "$(command -v sensible-browser)" ]; then
sensible-browser "$urlg" & sensible-browser "$urlg" &
elif [ ! -z "$(command -v xdg-open)" ]; then elif [ ! -z "$(command -v xdg-open)" ]; then
xdg-open "$urlg" & xdg-open "$urlg" &
elif [ ! -z "$(command -v gnome-open)" ]; then elif [ ! -z "$(command -v gnome-open)" ]; then
gnome-open "$urlg" & gnome-open "$urlg" &
elif [ ! -z "$(command -v python)" ]; then elif [ ! -z "$(command -v python)" ]; then
python -m webbrowser "$urlg" python -m webbrowser "$urlg"
fi & fi &
echo "300" > "${HOME}/.config/.PortTime" echo "300" > "${HOME}/.config/.PortTime"
sleep 5 sleep 5
exit 0 ;; exit 0 ;;
"${port_time5}") "${port_time5}")
echo "75" > "${HOME}/.config/.PortTime" ;; echo "75" > "${HOME}/.config/.PortTime" ;;
"${port_time6}") "${port_time6}")
echo "150" > "${HOME}/.config/.PortTime" ;; echo "150" > "${HOME}/.config/.PortTime" ;;
esac esac
fi fi
fi fi
} }
PW_CREATE_PFX () { PW_CREATE_PFX () {
#sed -i '/HKCU,Software\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf #sed -i '/HKCU,Software\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf #sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf #sed -i '/HKLM,Software\\Wow6432Node\\Valve\\Steam/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf #sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
#sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf #sed -i '/HKCR,steam\\shell\\open\\command/d' "${WINEDIR}"*/share/wine/wine.inf
if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ] || [ ! -f "${WINEPREFIX}"/user.reg ] || [ ! -f "${WINEPREFIX}"/userdef.reg ] || [ ! -f "${WINEPREFIX}"/system.reg ] ; then if [ ! -d "${WINEPREFIX}" ] || [ ! -d "${WINEPREFIX}"/drive_c/windows ] || [ ! -f "${WINEPREFIX}"/user.reg ] || [ ! -f "${WINEPREFIX}"/userdef.reg ] || [ ! -f "${WINEPREFIX}"/system.reg ] ; then
PW_STOP_PROGRESS_BAR PW_STOP_PROGRESS_BAR
${PW_XTERM} "${PW_RUNTIME}" "${WINELOADER}" wineboot -u ${PW_XTERM} "${PW_RUNTIME}" "${WINELOADER}" wineboot -u
`zenity --info --title "Info..." --text " Updating prefix completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1 `zenity --info --title "Info..." --text " Updating prefix completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1
exit 0 exit 0
fi fi
#sed -i '/steamclient/d' "${WINEPREFIX}"/*.reg #sed -i '/steamclient/d' "${WINEPREFIX}"/*.reg
#sed -i '/SteamPath/d' "${WINEPREFIX}"/*.reg #sed -i '/SteamPath/d' "${WINEPREFIX}"/*.reg
} }
PW_SCRIPTS_UPDATE () { PW_SCRIPTS_UPDATE () {
if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then if [ ! -f "${PORT_WINE_TMP_PATH}/scripts_ver" ] ; then
echo "1000" > "${PORT_WINE_TMP_PATH}/scripts_ver" echo "1000" > "${PORT_WINE_TMP_PATH}/scripts_ver"
fi fi
try_download "${PW_FTP_URL}/current_version/scripts_ver" "${PORT_WINE_TMP_PATH}/scripts_cur_ver" try_download "${PW_FTP_URL}/current_version/scripts_ver" "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
if [ "$?" == "0" ] ; then if [ "$?" == "0" ] ; then
read scripts_current_ver < "${PORT_WINE_TMP_PATH}/scripts_cur_ver" read scripts_current_ver < "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
read scripts_install_ver < "${PORT_WINE_TMP_PATH}/scripts_ver" read scripts_install_ver < "${PORT_WINE_TMP_PATH}/scripts_ver"
try_remove_file "${PORT_WINE_TMP_PATH}/scripts_cur_ver" try_remove_file "${PORT_WINE_TMP_PATH}/scripts_cur_ver"
if [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then if [ "${scripts_current_ver}" -gt "${scripts_install_ver}" ] ; then
echo "######################################################" echo "######################################################"
echo "Update scripts..." echo "Update scripts..."
try_download "${PW_FTP_URL}/dist/scripts.tar.xz" "${PORT_WINE_TMP_PATH}/scripts.tar.xz" try_download "${PW_FTP_URL}/dist/scripts.tar.xz" "${PORT_WINE_TMP_PATH}/scripts.tar.xz"
tar -Jxvf "${PORT_WINE_TMP_PATH}/scripts.tar.xz" -C "${PORT_WINE_PATH}/data/" tar -Jxvf "${PORT_WINE_TMP_PATH}/scripts.tar.xz" -C "${PORT_WINE_PATH}/data/"
if [ "$?" == "0" ] ; then if [ "$?" == "0" ] ; then
try_remove_file "${PORT_WINE_TMP_PATH}/scripts.tar.xz" try_remove_file "${PORT_WINE_TMP_PATH}/scripts.tar.xz"
echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver" echo "${scripts_current_ver}" > "${PORT_WINE_TMP_PATH}/scripts_ver"
`zenity --info --title "Info..." --text " Updating scripts and database of games\n and programs completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1 `zenity --info --title "Info..." --text " Updating scripts and database of games\n and programs completed successfully.\n\n Restart ${portname}." --no-wrap ` > /dev/null 2>&1
exit 0 exit 0
fi
fi fi
fi fi
fi
} }
PW_RUN () { PW_RUN () {
if [ ! -z "$portwine_exe" ] ; then if [ ! -z "$portwine_exe" ] ; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )" export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME" cd "$PATH_TO_GAME"
else else
cd "${WINEPREFIX}/drive_c" cd "${WINEPREFIX}/drive_c"
fi
if [ ! -z "${PW_GAMEMODERUN}" ] && [ "${PW_GAMEMODERUN}" != 0 ] ; then
if [ ! -z ${optirun_on} ]; then
${optirun_on} $PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
else
$PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
fi fi
else
if [ ! -z ${optirun_on} ]; then print_var "PATH_TO_GAME" "WINEDLLOVERRIDES" "PATH"
${optirun_on} $PW_TERM "${PW_RUNTIME}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]}
else if [ ! -z "${PW_GAMEMODERUN}" ] && [ "${PW_GAMEMODERUN}" != 0 ] ; then
$PW_TERM "${PW_RUNTIME}" "${WINELOADER}" "$@" ${LAUNCH_PARAMETERS[*]} if [ ! -z ${optirun_on} ]; then
echo "Full command line: ${optirun_on} $PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}"
${optirun_on} $PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}
else
echo "Full command line: $PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}"
$PW_TERM "${PW_RUNTIME}" gamemoderun "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}
fi
else
if [ ! -z ${optirun_on} ]; then
echo "Full command line: ${optirun_on} $PW_TERM "${PW_RUNTIME}" "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}"
${optirun_on} $PW_TERM "${PW_RUNTIME}" "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}
else
echo "Full command line: $PW_TERM "${PW_RUNTIME}" "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}"
$PW_TERM "${PW_RUNTIME}" "${WINELOADER}" explorer "$@" ${LAUNCH_PARAMETERS[*]}
fi
fi fi
fi
} }
...@@ -5,215 +5,199 @@ if [ -f "$1" ]; then ...@@ -5,215 +5,199 @@ if [ -f "$1" ]; then
fi fi
. "$(dirname $(readlink -f "$0"))/runlib" . "$(dirname $(readlink -f "$0"))/runlib"
PW_SCRIPTS_UPDATE PW_SCRIPTS_UPDATE
########################################################################
PORTWINE_LAUNCH () PORTWINE_LAUNCH () {
{ KILL_PORTWINE
KILL_PORTWINE START_PORTWINE
START_PORTWINE PORTWINE_MSI=`basename "${portwine_exe}" | grep .msi`
PORTWINE_MSI=`basename "${portwine_exe}" | grep .msi` PORTWINE_BAT=`basename "${portwine_exe}" | grep .bat`
PORTWINE_BAT=`basename "${portwine_exe}" | grep .bat` if [ ! -z "${PW_VIRTUAL_DESKTOP}" ] && [ "${PW_VIRTUAL_DESKTOP}" == "1" ] ; then
if [ ! -z "${PW_VIRTUAL_DESKTOP}" ] && [ "${PW_VIRTUAL_DESKTOP}" == "1" ] ; then pw_screen_resolution=`xrandr --current | grep "*" | awk '{print $1;}' | head -1`
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
elif [ ! -z "${PORTWINE_MSI}" ]; then echo "PORTWINE_MSI=${PORTWINE_MSI}"
echo "PORTWINE_MSI=${PORTWINE_MSI}" PW_RUN msiexec /i "$portwine_exe"
PW_RUN msiexec /i "$portwine_exe" elif [ ! -z "${PORTWINE_BAT}" ]; then
elif [ ! -z "${PORTWINE_BAT}" ]; then echo "PORTWINE_BAT=${PORTWINE_BAT}"
echo "PORTWINE_BAT=${PORTWINE_BAT}" PW_RUN explorer "$portwine_exe"
PW_RUN explorer "$portwine_exe" elif [ ! -z "${portwine_exe}" ]; then
elif [ ! -z "${portwine_exe}" ]; then PW_RUN "$portwine_exe"
PW_RUN "$portwine_exe" elif [ -z "${gamestart}" ]; then
elif [ -z "${gamestart}" ]; then PW_RUN explorer
PW_RUN explorer else
else PW_RUN "${gamestart}"
PW_RUN "${gamestart}"
fi
}
########################################################################
PORTWINE_CREATE_SHORTCUT ()
{
if [ ! -z "${portwine_exe}" ]; then
PORTPROTON_EXE="${portwine_exe}"
else
PORTPROTON_EXE=$(zenity --file-selection --file-filter=""*.exe" "*.bat"" \
--title="${sc_path}" --filename="${PORT_WINE_PATH}/data/pfx/drive_c/")
if [ $? -eq 1 ];then exit 1; fi
fi
PORTPROTON_NAME="$(basename "${PORTPROTON_EXE}" | sed s/".exe"/""/gi )"
PORTPROTON_PATH="$( cd "$( dirname "${PORTPROTON_EXE}" )" >/dev/null 2>&1 && pwd )"
if [ -x "`which wrestool 2>/dev/null`" ]; then
wrestool -x --output="${PORTPROTON_PATH}/" -t14 "${PORTPROTON_EXE}"
cp "$(ls -S -1 "${PORTPROTON_EXE}"*".ico" | head -n 1)" "${PORTPROTON_EXE}.ico"
cp -f "${PORTPROTON_EXE}.ico" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.ico"
rm -f "${PORTPROTON_PATH}/"*.ico
fi
if [ $? -eq 1 ] ; then exit 1 ; fi
export PW_VULKAN_TO_DB=`cat "${PORT_WINE_TMP_PATH}/pw_vulkan"`
if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -il "${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ -z "${PW_VULKAN_USE}" ]; then
echo "export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" >> "${PORTWINE_DB_FILE}"
elif [ -z "${PORTWINE_DB_FILE}" ]; then
echo "#!/bin/bash
#Author: "${USER}"
#"${PORTWINE_DB}.exe"
#Rating=1-5
################################################
export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi fi
cat "${PORT_SCRIPTS_PATH}/portwine_db/default" | grep "##" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec=env PW_GUI_DISABLED_CS=1 "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${PORTPROTON_EXE}\" "" \
>> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Path="${PORT_SCRIPTS_PATH}/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.ico"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
`zenity --question --title "${inst_set}." --text "${ss_done}" --no-wrap ` > /dev/null 2>&1
if [ $? -eq "0" ]; then
cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/
fi
xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null &
} }
######################################################################## PORTWINE_CREATE_SHORTCUT () {
PORTWINE_DEBUG () if [ ! -z "${portwine_exe}" ]; then
{ PORTPROTON_EXE="${portwine_exe}"
KILL_PORTWINE
export PW_LOG=1
export PW_WINEDBG_DISABLE=0
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
START_PORTWINE
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "GLIBC version:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "echo $(ldd --version)" | grep ldd >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "PortWINE version:" >> "${PORT_WINE_PATH}/${portname}.log"
read install_ver < "${PORT_WINE_TMP_PATH}/${portname}_ver"
echo "${portname}-${install_ver}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "var_pw_vulkan = ${var_pw_vulkan}" >> "${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"
date >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "The installation path of the ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$PORT_WINE_PATH" >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Operating system" >> "${PORT_WINE_PATH}/${portname}.log"
lsb_release -d | sed s/Description/ОС/g >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Desktop Environment" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$DESKTOP_SESSION" >> "${PORT_WINE_PATH}/${portname}.log"
echo "${XDG_CURRENT_DESKTOP}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Kernel" >> "${PORT_WINE_PATH}/${portname}.log"
uname -r >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "CPU" >> "${PORT_WINE_PATH}/${portname}.log"
cat /proc/cpuinfo | grep "model name" >> "${PORT_WINE_PATH}/${portname}.log"
echo "------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "RAM" >> "${PORT_WINE_PATH}/${portname}.log"
free -m >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Graphic cards and drivers" >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/glxinfo" -B >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name:" >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vulkaninfo" | grep deviceName >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vkcube" --c 50
if [ $? -eq 0 ]; then
echo "Vulkan cube test passed successfully" >> "${PORT_WINE_PATH}/${portname}.log"
else
echo "Vkcube test completed with error" >> "${PORT_WINE_PATH}/${portname}.log"
fi
echo "---------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
if [ ! -x "`which gamemoderun 2>/dev/null`" ]
then
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"
"$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE:" >> "${PORT_WINE_PATH}/${portname}.log"
export DXVK_HUD="full"
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
try_remove_file "${PORT_WINE_PATH}/${portname}.log.wine"
if [ ! -z "${portwine_exe}" ]; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
$PW_XTERM "${WINELOADER}" ${optirun_on} "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 &
else else
$PW_XTERM "${WINELOADER}" "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 & PORTPROTON_EXE=$(zenity --file-selection --file-filter=""*.exe" "*.bat"" \
--title="${sc_path}" --filename="${PORT_WINE_PATH}/data/pfx/drive_c/")
if [ $? -eq 1 ];then exit 1; fi
fi
PORTPROTON_NAME="$(basename "${PORTPROTON_EXE}" | sed s/".exe"/""/gi )"
PORTPROTON_PATH="$( cd "$( dirname "${PORTPROTON_EXE}" )" >/dev/null 2>&1 && pwd )"
if [ -x "`which wrestool 2>/dev/null`" ]; then
wrestool -x --output="${PORTPROTON_PATH}/" -t14 "${PORTPROTON_EXE}"
cp "$(ls -S -1 "${PORTPROTON_EXE}"*".ico" | head -n 1)" "${PORTPROTON_EXE}.ico"
cp -f "${PORTPROTON_EXE}.ico" "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.ico"
rm -f "${PORTPROTON_PATH}/"*.ico
fi fi
elif [ -z "${gamestart}" ]; then if [ $? -eq 1 ] ; then exit 1 ; fi
if [ ! -z $optirun_on ]; then export PW_VULKAN_TO_DB=`cat "${PORT_WINE_TMP_PATH}/pw_vulkan"`
$PW_XTERM "${WINELOADER}" ${optirun_on} explorer 2>&1 & if [ ! -z "${PORTWINE_DB}" ]; then
PORTWINE_DB_FILE=`grep -il "${PORTWINE_DB}" "${PORT_SCRIPTS_PATH}/portwine_db"/* | sed s/".exe"/""/gi`
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ -z "${PW_VULKAN_USE}" ]; then
echo "export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" >> "${PORTWINE_DB_FILE}"
elif [ -z "${PORTWINE_DB_FILE}" ]; then
echo "#!/bin/bash
#Author: "${USER}"
#"${PORTWINE_DB}.exe"
#Rating=1-5
################################################
export PW_VULKAN_USE=${PW_VULKAN_TO_DB}" > "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
cat "${PORT_SCRIPTS_PATH}/portwine_db/default" | grep "##" >> "${PORT_SCRIPTS_PATH}/portwine_db/$PORTWINE_DB"
fi
name_desktop="${PORTPROTON_NAME}"
echo "[Desktop Entry]" > "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Name=${PORTPROTON_NAME}" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Exec=env PW_GUI_DISABLED_CS=1 "\"${PORT_SCRIPTS_PATH}/start.sh\" \"${PORTPROTON_EXE}\" "" \
>> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Type=Application" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Categories=Game" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "StartupNotify=true" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Path="${PORT_SCRIPTS_PATH}/"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
echo "Icon="${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.ico"" >> "${PORT_WINE_PATH}/${name_desktop}.desktop"
chmod u+x "${PORT_WINE_PATH}/${name_desktop}.desktop"
`zenity --question --title "${inst_set}." --text "${ss_done}" --no-wrap ` > /dev/null 2>&1
if [ $? -eq "0" ]; then
cp -f "${PORT_WINE_PATH}/${name_desktop}.desktop" /home/${USER}/.local/share/applications/
fi
xdg-open "${PORT_WINE_PATH}" 2>1 >/dev/null &
}
PORTWINE_DEBUG () {
KILL_PORTWINE
export PW_LOG=1
export PW_WINEDBG_DISABLE=0
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
START_PORTWINE
echo "${port_deb1}" > "${PORT_WINE_PATH}/${portname}.log"
echo "${port_deb2}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "GLIBC version:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "echo $(ldd --version)" | grep ldd >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "PortWINE version:" >> "${PORT_WINE_PATH}/${portname}.log"
read install_ver < "${PORT_WINE_TMP_PATH}/${portname}_ver"
echo "${portname}-${install_ver}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "var_pw_vulkan = ${var_pw_vulkan}" >> "${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"
date >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "The installation path of the ${portname}:" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$PORT_WINE_PATH" >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Operating system" >> "${PORT_WINE_PATH}/${portname}.log"
lsb_release -d | sed s/Description/ОС/g >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Desktop Environment" >> "${PORT_WINE_PATH}/${portname}.log"
echo "$DESKTOP_SESSION" >> "${PORT_WINE_PATH}/${portname}.log"
echo "${XDG_CURRENT_DESKTOP}" >> "${PORT_WINE_PATH}/${portname}.log"
echo "--------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Kernel" >> "${PORT_WINE_PATH}/${portname}.log"
uname -r >> "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "CPU" >> "${PORT_WINE_PATH}/${portname}.log"
cat /proc/cpuinfo | grep "model name" >> "${PORT_WINE_PATH}/${portname}.log"
echo "------------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "RAM" >> "${PORT_WINE_PATH}/${portname}.log"
free -m >> "${PORT_WINE_PATH}/${portname}.log"
echo "-----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Graphic cards and drivers" >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/glxinfo" -B >> "${PORT_WINE_PATH}/${portname}.log"
echo "----------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Vulkan info device name:" >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vulkaninfo" | grep deviceName >> "${PORT_WINE_PATH}/${portname}.log"
"${WINELIB}/amd64/usr/bin/vkcube" --c 50
if [ $? -eq 0 ]; then
echo "Vulkan cube test passed successfully" >> "${PORT_WINE_PATH}/${portname}.log"
else else
$PW_XTERM "${WINELOADER}" explorer 2>&1 & echo "Vkcube test completed with error" >> "${PORT_WINE_PATH}/${portname}.log"
fi fi
else echo "---------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
export PATH_TO_GAME="$( cd "$( dirname "${gamestart}" )" >/dev/null 2>&1 && pwd )" if [ ! -x "`which gamemoderun 2>/dev/null`" ]
cd "$PATH_TO_GAME" then
if [ ! -z $optirun_on ]; then echo "!!!gamemod not found!!!" >> "${PORT_WINE_PATH}/${portname}.log"
${optirun_on} $PW_XTERM "${PW_RUNTIME}" "${WINELOADER}" "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 & fi
echo "--------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "Version WINE in the Port" >> "${PORT_WINE_PATH}/${portname}.log"
"$WINELOADER" --version 2>&1 | tee -a "${PORT_WINE_PATH}/${portname}.log"
echo "-------------------------------------------" >> "${PORT_WINE_PATH}/${portname}.log"
echo "log WINE:" >> "${PORT_WINE_PATH}/${portname}.log"
export DXVK_HUD="full"
export PW_XTERM="${WINELIB}/amd64/usr/bin/xterm -l -lf ${PORT_WINE_PATH}/${portname}.log.wine -geometry 159x37 -e"
try_remove_file "${PORT_WINE_PATH}/${portname}.log.wine"
if [ ! -z "${portwine_exe}" ]; then
export PATH_TO_GAME="$( cd "$( dirname "${portwine_exe}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z ${optirun_on} ]; then
${optirun_on} $PW_XTERM "${WINELOADER}" explorer "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 &
else
$PW_XTERM "${WINELOADER}" explorer "$portwine_exe" ${LAUNCH_PARAMETERS} 2>&1 &
fi
elif [ -z "${gamestart}" ]; then
if [ ! -z $optirun_on ]; then
${optirun_on} $PW_XTERM "${WINELOADER}" explorer 2>&1 &
else
$PW_XTERM "${WINELOADER}" explorer 2>&1 &
fi
else else
$PW_XTERM "${PW_RUNTIME}" "${WINELOADER}" "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 & export PATH_TO_GAME="$( cd "$( dirname "${gamestart}" )" >/dev/null 2>&1 && pwd )"
cd "$PATH_TO_GAME"
if [ ! -z $optirun_on ]; then
${optirun_on} $PW_XTERM "${PW_RUNTIME}" "${WINELOADER}" explorer "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 &
else
$PW_XTERM "${PW_RUNTIME}" "${WINELOADER}" explorer "${gamestart}" ${LAUNCH_PARAMETERS} 2>&1 &
fi
fi fi
fi
zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap && "${WINESERVER}" -k zenity --info --title "DEBUG" --text "${port_debug}" --no-wrap && "${WINESERVER}" -k
STOP_PORTWINE | sszen STOP_PORTWINE | sszen
cat "${PORT_WINE_PATH}/${portname}.log.wine" >> "${PORT_WINE_PATH}/${portname}.log" cat "${PORT_WINE_PATH}/${portname}.log.wine" >> "${PORT_WINE_PATH}/${portname}.log"
try_remove_file "${PORT_WINE_PATH}/${portname}.log.wine" try_remove_file "${PORT_WINE_PATH}/${portname}.log.wine"
deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++') deb_text=$(cat "${PORT_WINE_PATH}/${portname}.log" | awk '! a[$0]++')
echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log" echo "$deb_text" > "${PORT_WINE_PATH}/${portname}.log"
echo "$deb_text" | zenity --text-info --editable --width=800 --height=600 --title="${portname}.log" echo "$deb_text" | zenity --text-info --editable --width=800 --height=600 --title="${portname}.log"
} }
######################################################################## PW_WINECFG () {
PW_WINECFG () START_PORTWINE
{ PW_RUN winecfg
START_PORTWINE
PW_RUN winecfg
} }
######################################################################## PW_WINEFILE () {
PW_WINEFILE () START_PORTWINE
{ PW_RUN "explorer"
START_PORTWINE
PW_RUN "explorer"
} }
######################################################################## PW_WINECMD () {
PW_WINECMD () export PW_USE_TERMINAL=1
{ START_PORTWINE
export PW_USE_TERMINAL=1 PW_RUN "cmd"
START_PORTWINE
PW_RUN "cmd"
} }
######################################################################## PW_WINEREG () {
PW_WINEREG () START_PORTWINE
{ PW_RUN "regedit"
START_PORTWINE
PW_RUN "regedit"
} }
######################################################################## PW_WINETRICKS () {
PW_WINETRICKS () UPDATE_WINETRICKS
{ export PW_USE_TERMINAL=1
UPDATE_WINETRICKS START_PORTWINE
export PW_USE_TERMINAL=1 $PW_TERM "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q --force
START_PORTWINE
$PW_TERM "${PW_RUNTIME}" "${PORT_WINE_TMP_PATH}/winetricks" -q --force
} }
########################################################################
if [ ! -z "${portwine_exe}" ]; then if [ ! -z "${portwine_exe}" ]; then
if [ -z "${PW_GUI_DISABLED_CS}" ] || [ "${PW_GUI_DISABLED_CS}" = 0 ] ; then if [ -z "${PW_GUI_DISABLED_CS}" ] || [ "${PW_GUI_DISABLED_CS}" = 0 ] ; then
if [ ! -z "${PORTWINE_DB_FILE}" ] && [ ! -z "${PW_VULKAN_USE}" ]; then if [ ! -z "${PORTWINE_DB_FILE}" ] && [ ! -z "${PW_VULKAN_USE}" ]; then
......
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