Skip to content

Getting Started

Artur Paiva edited this page Oct 8, 2022 · 4 revisions

So, you've followed the install guide on the readme page and now where to go?

In this guide we will be installing and running a free first person shooter game called AssaultCube using protonlaunch. AssaultCube is fully available on Linux but it presents a good show of how protonlaunch works and how you can install your games.

Download AssaultCube

First you need to download your Windows program installer, some installers, notably EA Origin will detect that your browser is running on Linux and wont show a download option. You can use a User agent switcher browser plugin to circunvent that issue.

Most applications will show a Windows executable download option, and thats the case with AssaultCube. Go to assault.cubers.net and click in the Microsoft Windows download option.

This will download a executable of the installer for AssaultCube that we will install shortly on proton.

Create your prefix

First of all, we will creare your prefix. You dont need to create your prefix before installing the application. We are doing it here to make it easier to understand how protonlaunch works.

protonlaunch will creare your prefix once you've started in an empty or non-existent folder, it will even create the folder structure necessary to create the prefix if it has the correct permissions.

For that run env PROTONPREFIX="${HOME}/assaultcube" protonlaunch winver

That will show a window with the current wine version, that is built-in Window application called winver which wine also emulates so its also available on wine / proton. When you type protonlaunch winver you're calling the winver executable inside your proton prefix.

image

It will also create a folder called assaultcube on your home directory. That folder is your proton prefix. We specify it by using the environment variable PROTONPREFIX.

You can now close winver.

Installing AssaultCube

I'm assuming that you've downloaded AssaultCube to your Downloads folder and that the version you've installing is AssaultCube_v1.3.0.2_LockdownEdition. If not, just replace the path that i've passed to proton with the correct one for your use case.

Now, to run the installer executable just type env PROTONPREFIX="${HOME}/assaultcube" protonlaunch "${HOME}/Downloads/AssaultCube_v1.3.0.2_LockdownEdition.exe" and that should show the classic Windows installer for AssaultCube.

You could run the installer without the previous step without a problem, protonlaunch would create and bootstrap a profile the same way and then directly launch your installer. There's no restriction of what program you should run the first time you boot a prefix because protonlaunch first bootstrap your prefix then it launches your executable. The reason we did this way is to show you how the prefix creation process works before installing anything on it.

I'll ask you to install the game on its default directory for this tutorial to make it easy to follow along. But once you're familiar with proton / wine you shouldn't have any problem installing your games on any folder.

Follow the installer to the end and we can continue.

Change the current directory

By default the executable that you're calling on proton will launch on the folder you're currently in (the 'current working directory' or cwd) and thats what you expect for any application, you dont want it to run a program that rename your files from jpeg to png to switch directory before renaming the files.

But when you click on a Windows shortcut (a lnk file) that link would normally change the cwd to the directory where your program is installed in order to the program find the necessary auxiliary files to run that specific program.

For example you try to run photoshop.exe thats on your C:\Program Files but your command prompt is actually on C:\Windows. If the software accounted for that it will just work fine, but some software dont do that and they will just crash.

And that poses a problem to wine / proton, because when you launch your executable on wine / proton directly you aren't changing the directory that you're currently in and AssaultCube is one of those cases. It just wont launch at all in the wrong directory.

But nicely there is a simple solution, chage the current working directory to the directory where the game is installed and thats a good practice on every game and application over wine unless you explicitly dont want that behaviour.

To do that use the classic cd "${HOME}/assaultcube/pfx/drive_c/Program Files (x86)/AssaultCube 1.3.0.2/"

A fix is in the works for that situation

Launch the game

Now is the fun part. Just call the game / application executable and your game should magically run (if its compatible of course).

env PROTONPREFIX="${HOME}/assaultcube" protonlaunch "C:\\Program Files (x86)\\AssaultCube 1.3.0.2\\assaultcube.bat"

There are a couple of notes, first the assaultcube launcher is a batch file (.bat) not an .exe executable. Since wine is compatible with the command prompt theres no issue running batch files as normal.

The second note is more important, as you can see this time i've launched the game passing the Windows patch, that was on purpose. Wine / Proton supports both Windows style path and Linux style path and you can use both. When using Windows path you have to be careful of using double backslash.

Anything under your-prefix/pfx/drive_c can be accessed as simple as C:\ and there is a Z:\ drive that just allows access to your root partition. So Z:\\opt\\executable.exe is the same as /opt/executable.exe.

A even shorter and simple way to run is just type env PROTONPREFIX="${HOME}/assaultcube" protonlaunch assaultcube.bat since i'm already in the directory where assaultcube.bat is located.

Some extras

Most of what i've talked about here is translatable to running wine directly. Since proton is based on wine and protonlaunch tries to minick most of Wine structure those procedures can be easily expanded to be used directly with wine.

You should install a single application on each prefix. Prefixes are very cheap in disk storage and since you may need to install specific patches for your programs or set specific Windows versions so you don't want a program messing with another and breaking everything. Its a good practice to create a environment for each software on Wine and Proton.

If you're familiar with docker you already know that you dont run your webserver in the same container as your database. Wine / Proton follows the same principle, although prefixes aren't sandboxes.

Clone this wiki locally