Created
August 7, 2021 18:54
-
-
Save Nithanim/670f55ec04c8fd81e124a85b3682b53d to your computer and use it in GitHub Desktop.
Start script for Guild Wars 2 with a custom wine build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a script for a custom Guild Wars 2 installation on Linux (Ubuntu 20.04). | |
# Drop it in the wine-prefix folder | |
# It is the start script for a custom wine build with some (performance) setings on top. | |
# Options are commented | |
# A gw2.log will be created right next to this script | |
path_to_gw2="/path_to_your_gw2_prefix/guild-wars-2/drive_c/Program Files/Guild Wars 2/GW2-64.exe" | |
# build a custom wine with https://github.com/Frogging-Family/wine-tkg-git | |
# short rundown: | |
# "git clone" and go into "wine-tkg-git" | |
# set your staging version in customization.cfg (e.g. _staging_version="v6.13") | |
# run "non-makepkg-build.sh". You then find the finished build in "non-makepkg-builds". | |
winepath=/mount/data/Programs/wine-tkg-git2/wine-tkg-git/non-makepkg-builds/wine-tkg-staging-fsync-git-6.13.r0.g52dd3381 | |
# Improves performance by suppressing messages nobody needs | |
export WINEDEBUG=-all | |
# use fsync if supported | |
# needs wine-patch and kernel-patch; automatically replaces esync if requirements fulfilled | |
# see also https://xanmod.org/ (warning: if you are on ubuntu have zfs, this kernel does NOT include zfs -> you need to use a zfs ppa such that dkms works) | |
export WINEFSYNC=1 | |
# fallback to esync when fsync not supported; should work in every case | |
export WINEESYNC=1 | |
# performance boost when looking around (probably) | |
export DXVK_ASYNC=1 | |
# might improve performance a little bit (probably) | |
export STAGING_SHARED_MEMORY=1 | |
# little overlay for fps and used gpu (can be commented out or set to empty string if not wanted; https://github.com/doitsujin/dxvk#hud) | |
export DXVK_HUD=devinfo,fps | |
# allows forcing a specific gpu if device chooser is installed | |
# https://github.com/aejsmith/vkdevicechooser | |
export ENABLE_DEVICE_CHOOSER_LAYER=1 | |
export VULKAN_DEVICE_INDEX=1 | |
# there are claims that this improves look-around-performance | |
export MESA_GLSL_CACHE_DIR="/tmp" #"/tmp/mesa_shader_cache" | |
# can (theoretically) be used to print used cursors to override them but does not really seem to work | |
#export XCURSOR_DISCOVER=1 | |
# Turns of the xfce compositor for a bit more fps | |
xfconf-query -c xfwm4 -p /general/use_compositing -s false | |
### Below here is the "heart" using the options above. | |
# Ignore this; just sets working dir to current script file path | |
SCRIPT=$( readlink -m $( type -p ${0} )) | |
BASE_DIR=`dirname "${SCRIPT}"` | |
NAME=`basename "${SCRIPT}"` | |
export WINEPREFIX=$BASE_DIR | |
export PATH="$winepath:$winepath/bin:$PATH" | |
wineexe=$winepath/bin/wine | |
truncate --size 0 gw2.log | |
$wineexe --version 2>&1 | tee -a gw2.log | |
# Pins GW2 to specific cpu cores. Might help in some cases. | |
#taskset -c 0,2,4,6,8,10 $wineexe "$path_to_gw2" -autologin -bmp -mapLoadinfo 2>&1 | tee -a gw2.log | |
$wineexe "$path_to_gw2" -autologin -bmp -mapLoadinfo 2>&1 | tee -a gw2.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment