Skip to content

Instantly share code, notes, and snippets.

@JJL772
Created January 23, 2022 19:37
Show Gist options
  • Save JJL772/94c6b473d5b3a1eff6e1c9a5c5f55440 to your computer and use it in GitHub Desktop.
Save JJL772/94c6b473d5b3a1eff6e1c9a5c5f55440 to your computer and use it in GitHub Desktop.
P2CE Hammer in WINE
1. Obtain a sufficiently new version of WINE.
Any version >= 6.0 should work. You may need to build this from source if your distro doesn't offer up to date packages for it.
Ubuntu and Mint users can read this page for how to install new versions of wine: https://github.com/Winetricks/winetricks/pull/1873
2. Install wintricks.
This is technically optional, if you want to install things manually skip this and move onto the next step.
Winetricks can usually be obtained through your distro's package manager. `winetricks --self-update` can be
used to update it to the latest version.
3. Install vcrun2019
Using winetricks, install vcrun2019 using `winetricks vcrun2019`.
If the checksum validation fails, you may need to run winetricks with --force to skip the validation.
*Although this is not recommended*, vcrun2019 is updated frequently and winetricks cannot always
keep up with the hash changes.
Alternatively, you may download and install vcrun2019 manually from the microsoft website.
4. Run hammer
Now's the easy part. Run hammer using `wine hammer.exe -winecompat`. This assumes your current working directory is in
`<game root>/bin/win64`.
The -winecompat flag runs hammer with some special tweaks to make it more usable through wine. Namely, it uses
the Qt file browser rather than wine's native one.
If, when selecting the game to use, hammer complains about not being able to find gameinfo.txt (or something similar),
it's probably because you have an existing gameconfig.txt from your windows install. You will need to delete this
file (located at hammer/cfg/gameconfig.txt) to let hammer regenerate the paths and the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment