- Mar 15, 2019
- 11
- 8
If you want to use CSGO's sdk, follow this: https://andrealmeid.com/post/2020-05-28-csgo-hammer-linux/
This is good enough, but I would also recommend using Lutris. Lutris's version of wine supports fsync, and Lutris itself allows you to customize wine settings much easier than using winetricks itself. Make sure to point Lutris to the wineprefix you made (i.e. ~/.hammer), and to launch from the .exe instead of the .bat.
I have stooped using Lutris, and you should just use a normal wine prefix with wine-tkg-git. If you still want dxvk, you can install dxvk in your wineprefix. On Arch, you install the aur package dxvk-mingw-git, then install it with the command
Since some versions of hammer don't work well with DXVK, and I am in love with bash scripts, I made this script that automatically uninstalls dxvk before running hammer, then re-installs after hammer is done running. If you want to use it, modify it for your own system paths :]. This also requires for the dxvk-mingw-git package to be installed.
EDIT:
So, if you run hammer and your 2d viewports are all black, and there is a lot of general flickering within your UI and windows, I highly recommend uninstall DXVK from your wine prefix. If you find it a hassle to use this script to uninstall and reinstall DXVK every time you want to use hammer, you could use a separate wine prefix.
Edit again: So, it has been a while since I ram hammer, and as of DXVK version 2.2, it looks like both vanilla hammer and hammerplusplus works with DXVK. Therefore, I think it is safe to use DXVK now.
Also, Slammin tools hammer (which I recommend using with the multi-thread vrad) works on Linux too. If you are going to use Slammin, you must and an argument to your launch command. You most add -game (path\to\game\directory\in\wine) If you don't point to your game directory using slammin tools, blended textures don't work. For example, even though I am on Linux, for my argument I have: -game "D:\SteamLibrary\steamapps\common\Team Fortress 2" If you want to find your path to your game reliably, you can type into your terminal wine explorer.exe and copy the path that you get when you go to your tf2 folder. Here's image proof that it works: View: https://i.imgur.com/vt424DX.png
Heads up with hammer++, it segfaults when opening the settings gui. Therefore, I change settings in the text files. ficool2 said it was occuring in the windows kernel, which would be wine in this case. Obviously, this isn't a problem in hammer and slammin' tools hammer, so who knows ¯\(ツ)/¯. Maybe it has changed sine the last time I tried hammer++, it has been a while.
With the latest version of wine-tkg-git it seems like the segfault has been fixed, as I was able to open and edit the menu in hammer++. Edit: Normal wine works too, as of Wine 8.13
Sorry if these seems like a mess, I just wanted to get this info out because I have seen plenty of poor guides for hammer on Linux. If you guess have questions, leave a comment, and I will try to respond
- First, open up steam through terminal with -console (steam -console)
- You will now see a console tab next to your other tabs on the top bar.
- Then, go to the website https://steamdb.info/ and look at your game.
- For example, let's look at TF2, who's steam id is 440.
- If you go to the depots of 440 (https://steamdb.info/app/440/depots/) you will see a depot with the ID 232251 which provides all of the windows binaries, and the sdk for TF2.
- With this now, go back to your steam console and type download_depot 440 232251
- This will download that depot into your
~/.local/share/steam/ubuntu12_32/steamapps/content/app_440/depot_232251/
- You will want to copy all of the files in the bin folder from the depot into your own bin folder already installed with the linux binaries.
- You know have hammer installed. You must now configure wine.
- DXVK works for most versions of hammer, but watch out for hammer++.
- First, make sure you have winetricks installed. To install on arch, type
sudo pacman -S winetricks
If you are on another distro, I can't help you there, for I use arch.
- If you want to, you can create a separate prefix to manage your winetrick dlls, but I use hammer out of my normal wine prefix, so it's up to your system/configuration.
- To open up winetricks, type
winetricks
into your terminal. If are using another prefix, doWINEPREFIX=.<prefixname> winetricks
- Select your default prefix
- Select Install a Windows DLL or component
- Install MS .NET 4.8, vcrun2003, vcrun2005, vcrun2008, vcrun2010, vcrun2012, vcrun2013, vcrun2015, .NET 2.0
- After everything is done installing, navigate to the bin folder where you copy and pasted the windows files into.
- Open up a terminal there. If you created a new wine prefix, type
WINEPREFIX=~/.<newprefix> wineconsole hammer.bat
. If you are using your normal prefix, typewineconsole hammer.bat
- After running hammer.bat once, I believe you can just run the exe from here on on, which is reflected in my bash script down below.
- Congrats! You now have hammer running on linux. If you want to increase compile times, I would suggest using an esync/fsync enabled wine binaries, alongside using the patched vrad with multi-threaded support.
- Here's a picture for proof: View: https://imgur.com/a/aSNLAkd
I
setup_dxvk install
Since some versions of hammer don't work well with DXVK, and I am in love with bash scripts, I made this script that automatically uninstalls dxvk before running hammer, then re-installs after hammer is done running. If you want to use it, modify it for your own system paths :]. This also requires for the dxvk-mingw-git package to be installed.
EDIT:
So, if you run hammer and your 2d viewports are all black, and there is a lot of general flickering within your UI and windows, I highly recommend uninstall DXVK from your wine prefix. If you find it a hassle to use this script to uninstall and reinstall DXVK every time you want to use hammer, you could use a separate wine prefix.
Bash:
#!/bin/bash
#This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
# Created by HurricanePootis (the license is overkill lol)
_wineprefix=.wine
_tf2install="$HOME/.local/share/Steam/steamapps/common/Team Fortress 2/"
cd "$HOME/$_wineprefix/drive_c/windows/syswow64"
if test -e d3d9.dll.old
then
setup_dxvk uninstall
else
:
fi
cd "$_tf2install/bin"
wine hammer.exe
wait
cd "$HOME/$_wineprefix/drive_c/windows/syswow64"
if test -e d3d9.dll.old
then
:
else
setup_dxvk install
fi
Edit again: So, it has been a while since I ram hammer, and as of DXVK version 2.2, it looks like both vanilla hammer and hammerplusplus works with DXVK. Therefore, I think it is safe to use DXVK now.
Also, Slammin tools hammer (which I recommend using with the multi-thread vrad) works on Linux too. If you are going to use Slammin, you must and an argument to your launch command. You most add -game (path\to\game\directory\in\wine) If you don't point to your game directory using slammin tools, blended textures don't work. For example, even though I am on Linux, for my argument I have: -game "D:\SteamLibrary\steamapps\common\Team Fortress 2" If you want to find your path to your game reliably, you can type into your terminal wine explorer.exe and copy the path that you get when you go to your tf2 folder. Here's image proof that it works: View: https://i.imgur.com/vt424DX.png
With the latest version of wine-tkg-git it seems like the segfault has been fixed, as I was able to open and edit the menu in hammer++. Edit: Normal wine works too, as of Wine 8.13
Sorry if these seems like a mess, I just wanted to get this info out because I have seen plenty of poor guides for hammer on Linux. If you guess have questions, leave a comment, and I will try to respond
Last edited: