With hardware prices going up I decided to write this small storage space saving guide (inspired by this other guide). Normally installing the dev client would double your disk space usage. However if you are using Btrfs you can have the dev client with it taking little to no space (it will take as much extra space as it differs from prod).
Prerequisites:
- Btrfs filesystem with CoW enabled (enabled by default)
I am going to assume your War Thunder install is at ~/Games/WarThunder for the purposes of this tutorial. Change the path to match yours as needed.
Change into the parent dir with $ cd ~/Games.
Step 0: Prepare the production client (optional but recommended)
You can enable circuit switching on your original client as well as on the dev one. This will make it easier to both setup the dev client and if you ever want to swap them (explained later).
To enable the circuit dropdown create a directory called matchingdevmode in your WarThunder directory.
mkdir WarThunder/matchingdevmode
Edit your WarThunder/config.blk so that it enables the expert mode. Open it in your favourite editor and search for the yunetwork section. Edit it so it looks like this.
yunetwork{
curCircuit:t="production"
isExpertMode:b=yes
}
Step 1: Ensure the client is on a btrfs subvolume
Run btrfs subvolume list . and look for the WarThunder directory in the output. If you installed War Thunder into a normal directory it should not be present
Move/rename your War Thunder directory first as we want our subvolume to have the name WarThunder.
mv WarThunder WarThunder_temp
Create a new btrfs subvolume
btrfs subvolume create WarThunder
Move all the files into the subvolume and delete the old directory
mv WarThunder_temp/* WarThunder/
rmdir WarThunder_temp
Step 2: Create a snapshot for the Dev client
btrfs subvolume snapshot WarThunder WarThunderDev
With this we have created a CoW linked snapshot of our production client. It should happen instantly as no deep copies are made. It should also not take up any additional space on the disk.
Step 3: Swap the new client to dev
If you haven’t done step 0 for the production client you need to do it for the Dev one. Follow step 0 instructions but on the WarThunderDev directory now. If you have done step 0 you don’t have to do it again for Dev.
Edit WarThunderDev/config.blk’s yunetwork section so that it now connects to the dev circuit. It should look like this.
yunetwork{
curCircuit:t="dev"
isExpertMode:b=yes
}
Step 4: Create .desktop file (optional but recommended)
In ~/.local/share/applications there should already be a War Thunder.desktop file. Make a copy and name it War Thunder Dev.desktop.
cd ~/.local/share/applications
cp War\ Thunder.desktop War\ Thunder\ Dev.desktop
Edit the new file so it points to the Dev directory by replacing the paths.
It should look something like this after the edit
[Desktop Entry]
Name=War Thunder Dev
Exec=/home/themadseventeen/Games/WarThunderDev/launcher
Icon=/home/themadseventeen/Games/WarThunderDev/launcher.ico
Type=Application
Categories=Game;
Terminal=false
You are done. If everything worked correctly “War Thunder Dev” should show up in your application launcher and launching it will open the corresponding dev launcher. “War Thunder” should still open production and they should be completely separate.
Tips and tricks:
Shared UserSkins directory:
Instead of having two UserSkins directories in both clients that you need to keep in sync you can move them out to a separate location (like ~/Games/Shared for example) and symlink them into both directories
Swapping clients to preload major updates:
Major updates are usually the last dev server that was up or are small update from them. By keeping the dev server up to date you will have the major update basically preloaded. However using “War Thunder Dev” to play on prod (when the update drops) can get confusing.
To swap dev and prod clients you can do the following.
Do this only after the major update is available for download
cd ~/Games
mv WarThunder WarThunder_prod
mv WarThunderDev WarThunder
mv WarThunder_prod WarThunderDev
By opening “War Thunder” you are now greeted what was until then the dev client. Switch it to “production” in the dropdown menu. Wait for it to update (there should be no updates or a very small one). Open “War Thunder Dev” and switch it from “production” to “dev”. It should “copy” the files from the other client. Don’t worry it’s going to use the CoW mechanism.
Enjoy!