====== Information ======
* [[https://www.guildwars2.com|Guild Wars 2]]
* Standalone
* 64-bit
===== Wine Resources =====
* [[https://appdb.winehq.org/objectManager.php?sClass=application&iId=14130|WineHQ AppDB]]
* [[https://lutris.net/games/guild-wars-2/|Lutris]]
===== Prerequisites =====
* [[distros:fedora_workstation_gnome|Fedora Workstation]]
* [[notes:wine|Wine]]
====== Install ======
===== Guild Wars 2 =====
* Install to default directory when prompted ((''C:\Program Files\Guild Wars 2''))
* Log-in when launcher progresses enough
* Ideally save the username and password, and enable Auto-play
* Close the launcher
mkdir -p ~/'.wine' ~/'Downloads/Guild Wars 2' && wget -O ~/'Downloads/Guild Wars 2/Gw2Setup.exe' 'https://account.arena.net/content/download/gw2/win/64' && MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2' WINEPREFIX=~/'.wine/Guild Wars 2' WINEARCH='win64' wine ~/'Downloads/Guild Wars 2/Gw2Setup.exe'
===== Restore Gw2.dat =====
* This expects ''Gw2.dat'' in the ''~/Downloads/Guild Wars 2'' folder
* 2023/09/27: ''Gw2.dat'' after ''-image'' is 74.7 GB
mv ~/'Downloads/Guild Wars 2/Gw2.dat' ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && sync
===== Clean-up =====
****
rm -Rf ~/'Downloads/Guild Wars 2' ~/'Desktop/Guild Wars 2.desktop' ~/'.wine/Guild Wars 2/'*'.dxvk-cache' && sync
====== Libraries ======
===== DXVK =====
* https://github.com/doitsujin/dxvk/actions ((need to be signed into GitHub, and select the latest ''master'' artifacts package))
ls ~/'Downloads/dxvk-master-'*'.zip' && rm -Rf '/tmp/dxvk-master' && mkdir -p '/tmp/dxvk-master' && unzip ~/'Downloads/dxvk-master-'*'.zip' -d '/tmp/dxvk-master/' && cp --backup '/tmp/dxvk-master/x64/'*'.dll' ~/'.wine/Guild Wars 2/drive_c/windows/system32/' && cp --backup '/tmp/dxvk-master/x32/'*'.dll' ~/'.wine/Guild Wars 2/drive_c/windows/syswow64/' && WINEPREFIX=~/'.wine/Guild Wars 2' winetricks 'd3d9=native' 'd3d10core=native' 'd3d11=native' 'dxgi=native' && mkdir -p ~/'.wine/Guild Wars 2/dxvk_shader_cache' && sync
====== Desktop Launcher ======
===== Initial =====
****
rm -Rf ~/'.local/share/applications/wine/Programs/Guild Wars 2'
===== Guild Wars 2 =====
mkdir -p ~/'.local/share/applications/wine/Programs/Guild Wars 2' && nano ~/'.local/share/applications/wine/Programs/Guild Wars 2/Guild Wars 2.desktop'
[Desktop Entry]
Name=Guild Wars 2
Categories=Game;AdventureGame;RolePlaying
Exec='/bin/bash' -c "cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && PULSE_LATENCY_MSEC='400' MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -autologin -bmp"
Type=Application
StartupNotify=true
Icon=1431_Gw2-64.0
StartupWMClass=gw2-64.exe
Actions=Cache;Kill;Update;Repair;Notes;
[Desktop Action Cache]
Exec='/bin/bash' -c "rm -Rf ~/'.wine/Guild Wars 2/mesa_shader_cache/'* ~/'.wine/Guild Wars 2/dxvk_shader_cache/'* && sync && notify-send 'The Guild Wars 2 cache has been cleaned.'"
Name=Cache Cleanup
[Desktop Action Kill]
Exec='/bin/bash' -c "WINEPREFIX=~/'.wine/Guild Wars 2' wineserver --kill"
Name=Force-close
[Desktop Action Update]
Exec='/bin/bash' -c "cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -image"
Name=Update Game Data
[Desktop Action Repair]
Exec='/bin/bash' -c "cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && PULSE_LATENCY_MSEC='400' MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -repair"
Name=Repair Game Data
[Desktop Action Notes]
StartupNotify=false
Exec='/bin/bash' -c "gio open 'https://wiki.realmofespionage.xyz/games:wine:guild_wars_2'"
Name=Installation Notes
# End
====== Quick Commands ======
===== Winecfg =====
****
WINEPREFIX=~/'.wine/Guild Wars 2' winecfg
===== Winetricks =====
****
WINEPREFIX=~/'.wine/Guild Wars 2' winetricks
===== Registry Editor =====
****
WINEPREFIX=~/'.wine/Guild Wars 2' regedit
===== Kill =====
****
WINEPREFIX=~/'.wine/Guild Wars 2' wineserver --kill
===== Execute =====
==== Guild Wars 2 ====
****
cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && PULSE_LATENCY_MSEC='400' MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' WINEDEBUG='' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -autologin
=== Other ===
* https://wiki.guildwars2.com/wiki/Command_line_arguments
-prefreset
-forwardrenderer
-maploadinfo
==== Updater ====
* ''Gw2-64.exe -image''
cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' WINEDEBUG='' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -image
==== Repair ====
* ''Gw2-64.exe -repair''
cd ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2' && PULSE_LATENCY_MSEC='400' MESA_SHADER_CACHE_DIR=~/'.wine/Guild Wars 2' DXVK_STATE_CACHE_PATH=~/'.wine/Guild Wars 2/dxvk_shader_cache' WINEPREFIX=~/'.wine/Guild Wars 2' WINEDEBUG='' wine ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2/Gw2-64.exe' -repair
===== File Manager =====
==== Root ====
****
gio open ~/'.wine/Guild Wars 2/drive_c/Program Files/Guild Wars 2'