mirror of
https://github.com/the-sane/lug-helper.git
synced 2025-01-27 17:00:34 +00:00
Use custom wine for all wine binaries
This commit is contained in:
parent
c9f9bc6811
commit
61c3e82e66
@ -33,13 +33,13 @@ export MESA_SHADER_CACHE_MAX_SIZE=10G
|
||||
#export DXVK_HUD=fps,compiler
|
||||
#export MANGOHUD=1
|
||||
|
||||
#####################################################
|
||||
# Configure the wine binary to be used
|
||||
################################################################
|
||||
# Configure the wine binaries to be used
|
||||
#
|
||||
# To use a custom wine runner, set its path here
|
||||
# wine_exec="/path/to/custom/runner/bin/wine"
|
||||
#####################################################
|
||||
wine_exec="wine"
|
||||
# To use a custom wine runner, set the path to its bin directory
|
||||
# wine_path="/path/to/custom/runner/bin"
|
||||
################################################################
|
||||
wine_path="$(command -v wine | xargs dirname)"
|
||||
|
||||
#############################################
|
||||
# Run optional prelaunch and postexit scripts
|
||||
@ -47,8 +47,8 @@ wine_exec="wine"
|
||||
# To use, update the game install paths here, then create the scripts with your desired actions in them
|
||||
# Replace the trap line in the section below with the example provided here
|
||||
#
|
||||
# "$HOME/Games/star-citizen/sc-prelaunch.sh"
|
||||
# trap "update_check; wineserver -k; $HOME/Games/star-citizen/sc-postexit.sh" EXIT
|
||||
# "$WINEPREFIX/sc-prelaunch.sh"
|
||||
# trap "update_check; \"$wine_path\"/wineserver -k; \"$WINEPREFIX\"/sc-postexit.sh" EXIT
|
||||
|
||||
#############################################
|
||||
# It's a trap!
|
||||
@ -56,19 +56,19 @@ wine_exec="wine"
|
||||
# Kill the wine prefix when this script exits
|
||||
# This makes sure there will be no lingering background wine processes
|
||||
update_check() {
|
||||
while winedbg --command "info proc" | grep -qi "rsi.*setup"; do
|
||||
while "$wine_path"/winedbg --command "info proc" | grep -qi "rsi.*setup"; do
|
||||
sleep 2
|
||||
done
|
||||
}
|
||||
trap "update_check; wineserver -k" EXIT
|
||||
trap "update_check; \"$wine_path\"/wineserver -k" EXIT
|
||||
|
||||
#################
|
||||
# Launch the game
|
||||
#################
|
||||
# To enable feral gamemode, replace the launch line below with:
|
||||
# gamemoderun "$wine_exec" "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
# gamemoderun "$wine_path"/wine "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
#
|
||||
# To enable gamescope and feral gamemode, replace the launch line below with the desired gamescope arguments. For example:
|
||||
# gamescope --hdr-enabled -W 2560 -H 1440 --force-grab-cursor gamemoderun "$wine_exec" "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
# gamescope --hdr-enabled -W 2560 -H 1440 --force-grab-cursor gamemoderun "$wine_path"/wine "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
|
||||
"$wine_exec" "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
"$wine_path"/wine "C:\Program Files\Roberts Space Industries\RSI Launcher\RSI Launcher.exe"
|
||||
|
@ -1360,10 +1360,10 @@ runner_manage_wine() {
|
||||
# Set the string sed will match against when editing the launch script
|
||||
# This will be used to detect the appropriate variable and replace its value
|
||||
# with the path to the downloaded item
|
||||
post_download_sed_string="wine_exec="
|
||||
post_download_sed_string="wine_path="
|
||||
# Set the value of the above variable that will be restored after a runner is deleted
|
||||
# In this case, we want to revert to calling system wine
|
||||
post_delete_restore_value="wine"
|
||||
post_delete_restore_value='$(command -v wine | xargs dirname)'
|
||||
|
||||
# Call the download_manage function with the above configuration
|
||||
# The argument passed to the function is used for special handling
|
||||
@ -2139,7 +2139,7 @@ post_download() {
|
||||
fi
|
||||
|
||||
# Replace the specified variable
|
||||
sed -i "s|^${post_download_sed_string}.*|${post_download_sed_string}\"${wine_prefix}/runners/${downloaded_item_name}/bin/wine\"|" "$wine_prefix/$wine_launch_script_name"
|
||||
sed -i "s|^${post_download_sed_string}.*|${post_download_sed_string}\"${wine_prefix}/runners/${downloaded_item_name}/bin\"|" "$wine_prefix/$wine_launch_script_name"
|
||||
else
|
||||
message warning "The launch script will need to be edited manually!\n\n$wine_prefix/$wine_launch_script_name"
|
||||
fi
|
||||
@ -2158,7 +2158,7 @@ post_download() {
|
||||
fi
|
||||
|
||||
# Restore the specified variable
|
||||
sed -i "s|^${post_download_sed_string}.*|${post_download_sed_string}\"${post_delete_restore_value}\"|" "$wine_prefix/$wine_launch_script_name"
|
||||
sed -i "s#^${post_download_sed_string}.*#${post_download_sed_string}\"${post_delete_restore_value}\"#" "$wine_prefix/$wine_launch_script_name"
|
||||
else
|
||||
message warning "The launch script will need to be edited manually!\n\n$wine_prefix/$wine_launch_script_name"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user