Here’s another piece of gaming nostalgia: Freelancer. It’s celebrating its 20th birthday this year which seems like a good opportunity to me to get it up and running again.
Prerequisites
Although this can probably achieved in any number of ways here is what I used:
Lutris (flatpak or native), the version used here was
0.5.14
from FlathubFreelancer install script for Lutris (the following is a customized version of this which contains various fixes including a no-CD fix). This script contains a custom return code after the initial installation. This is necessary because this step does not exit cleanly resulting in the Lutris installation crashing.
Expand to see script
{ "count": 1, "next": null, "previous": null, "results": [ { "id": 11013, "game_id": 18262, "game_slug": "freelancer", "name": "Freelancer", "year": 2003, "runner": "wine", "slug": "freelancer-cdrom", "version": "CDROM", "description": "Includes the following:\r\n\r\n- Official 1.1 patch\r\n- Jason's Freelancer Patch (for widescreen support)\r\n- Draw distance extender (optional)", "notes": "I haven't set wine version as any recent one will work. An esync supporting version is recommended for slightly better performance.", "created_at": "2018-11-28T16:50:23.911000Z", "updated_at": "2021-12-10T18:28:02.398150Z", "draft": false, "published": true, "published_by": 51687, "is_playable": null, "script": { "files": [ { "officialpatch": "https://r.je/freelancer/flpatch.exe" }, { "jflp": "https://r.je/freelancer/jflp.exe" }, { "nocd": "https://r.je/freelancer/Freelancer.exe" }, { "perfoptions": "https://r.je/freelancer/PerfOptions.ini" }, { "msacm32": "https://r.je/freelancer/msacm32.dll" }, { "highdrawexe": "https://r.je/freelancer/Freelancer_IncreasedDrawDistance.exe" }, { "hidpifontsfix": "https://r.je/freelancer/hidpi_fonts.ini" }, { "wmfdist": "https://r.je/freelancer/WMFDIST.EXE" } ], "game": { "arch": "win32", "exe": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe", "prefix": "$GAMEDIR" }, "installer": [ { "task": { "arch": "win32", "description": "Creating Wine prefix", "name": "create_prefix", "prefix": "$GAMEDIR" } }, { "insert-disc": { "requires": "setup.exe" } }, { "task": { "description": "Installing Freelancer. Please choose \"Express install\".", "executable": "$DISC/setup.exe", "name": "wineexec", "prefix": "$GAMEDIR", "return_code": 256 } }, { "execute": { "command": "mkdir -p '$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/'", "description": "Creating configuration directory" } }, { "move": { "description": "Creating configuration file", "dst": "$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini", "src": "perfoptions" } }, { "task": { "description": "Installing 1.1 patch", "executable": "officialpatch", "name": "wineexec", "prefix": "$GAMEDIR" } }, { "task": { "description": "Installing required audio codecs (prevents in-game stuttering)", "executable": "wmfdist", "name": "wineexec", "prefix": "$GAMEDIR" } }, { "move": { "description": "Installing no-cd", "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe", "src": "nocd" } }, { "move": { "description": "Adding msacm32.dll (saves downloading a 300mb file from winetricks)", "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/msacm32.dll", "src": "msacm32" } }, { "task": { "description": "Installing Jason's Freelancer Patch for widescreen support", "executable": "jflp", "name": "wineexec", "prefix": "$GAMEDIR" } }, { "execute": { "command": "echo \"Setting in game resolution to $RESOLUTION_WIDTH x $RESOLUTION_HEIGHT...\"\n\nsed \"s/size\\s*=.*/size=$RESOLUTION_WIDTH, $RESOLUTION_HEIGHT /\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i \nsed \"s/color_bpp\\s*=.*/color_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i \necho \"...done\"\n\nif [ $RESOLUTION_HEIGHT -gt 1500 ]\nthen\n echo \"Your resolution's height is larger than 1500 pixels, this causes Freelancer to render fonts incorrectly on both windows and linux\"\n echo \"Applying font patch...\"\n cp $CACHE/hidpi_fonts.ini \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/FONTS/fonts.ini\"\n echo \"...done\"\nfi\n# Symlink steamuser to the main user directory so Proton uses the same PerfOptions.ini\nln -sf \"$GAMEDIR/drive_c/users/$USER\" \"$GAMEDIR/drive_c/users/steamuser\"\necho \"Complete!\"\n", "description": "Setting game resolution your screen's native resolution" } }, { "input_menu": { "description": "Increase draw distances?", "id": "DRAWDISTANCE", "options": [ { "y": "Yes" }, { "n": "No" } ], "preselect": "y" } }, { "execute": { "command": "if [ $INPUT = 'n' ]\nthen\n echo \"...skipping\"\nfi\nif [ $INPUT = 'y' ]\nthen\n echo \"Increasing game draw distance...\"\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/shiparch.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/rtc_shiparch.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SOLAR/solararch.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/select_equip.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/weapon_equip.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/misc_equip.ini\" -i\n sed \"s/LODranges.*/LODranges = 0, 99999/\" \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/st_equip.ini\" -i\n cp $CACHE/Freelancer_IncreasedDrawDistance.exe \"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\"\n\n echo \"...done\"\nfi\necho \"Complete!\"\n", "description": "Draw distance patch" } }, { "execute": { "command": "echo \"Fixing color depth\"\n\nsed \"s/color_bpp\\s*=.*/color_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\" -i \necho \"...done\"", "description": "Fix color depth" } }, { "task": { "arch": "win32", "key": "SampleCount", "name": "set_regedit", "path": "HKEY_CURRENT_USER\\Software\\Wine\\Direct3D", "prefix": "$GAMEDIR", "type": "REG_DWORD", "value": "00000008" } } ], "wine": { "overrides": { "msacm32.dll": "n,b" } } }, "content": "files:\n- officialpatch: https://r.je/freelancer/flpatch.exe\n- jflp: https://r.je/freelancer/jflp.exe\n- nocd: https://r.je/freelancer/Freelancer.exe\n- perfoptions: https://r.je/freelancer/PerfOptions.ini\n- msacm32: https://r.je/freelancer/msacm32.dll\n- highdrawexe: https://r.je/freelancer/Freelancer_IncreasedDrawDistance.exe\n- hidpifontsfix: https://r.je/freelancer/hidpi_fonts.ini\n- wmfdist: https://r.je/freelancer/WMFDIST.EXE\ngame:\n arch: win32\n exe: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\n prefix: $GAMEDIR\ninstaller:\n- task:\n arch: win32\n description: Creating Wine prefix\n name: create_prefix\n prefix: $GAMEDIR\n- insert-disc:\n requires: setup.exe\n- task:\n description: Installing Freelancer. Please choose \"Express install\".\n executable: $DISC/setup.exe\n name: wineexec\n prefix: $GAMEDIR\n- execute:\n command: mkdir -p '$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/'\n description: Creating configuration directory\n- move:\n description: Creating configuration file\n dst: $GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\n src: perfoptions\n- task:\n description: Installing 1.1 patch\n executable: officialpatch\n name: wineexec\n prefix: $GAMEDIR\n- task:\n description: Installing required audio codecs (prevents in-game stuttering)\n executable: wmfdist\n name: wineexec\n prefix: $GAMEDIR\n- move:\n description: Installing no-cd\n dst: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\n src: nocd\n- move:\n description: Adding msacm32.dll (saves downloading a 300mb file from winetricks)\n dst: $GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/msacm32.dll\n src: msacm32\n- task:\n description: Installing Jason's Freelancer Patch for widescreen support\n executable: jflp\n name: wineexec\n prefix: $GAMEDIR\n- execute:\n command: \"echo \\\"Setting in game resolution to $RESOLUTION_WIDTH x $RESOLUTION_HEIGHT...\\\"\\\n \\n\\nsed \\\"s/size\\\\s*=.*/size=$RESOLUTION_WIDTH, $RESOLUTION_HEIGHT /\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n \\ Games/Freelancer/PerfOptions.ini\\\" -i \\nsed \\\"s/color_bpp\\\\s*=.*/color_bpp=32/\\\"\\\n \\ \\\"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\\\"\\\n \\ -i\\nsed \\\"s/depth_bpp\\\\s*=.*/depth_bpp=32/\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n \\ Games/Freelancer/PerfOptions.ini\\\" -i \\necho \\\"...done\\\"\\n\\nif [ $RESOLUTION_HEIGHT\\\n \\ -gt 1500 ]\\nthen\\n echo \\\"Your resolution's height is larger than 1500 pixels,\\\n \\ this causes Freelancer to render fonts incorrectly on both windows and linux\\\"\\\n \\n echo \\\"Applying font patch...\\\"\\n cp $CACHE/hidpi_fonts.ini \\\"$GAMEDIR/drive_c/Program\\\n \\ Files/Microsoft Games/Freelancer/DATA/FONTS/fonts.ini\\\"\\n echo \\\"...done\\\"\\\n \\nfi\\n# Symlink steamuser to the main user directory so Proton uses the same\\\n \\ PerfOptions.ini\\nln -sf \\\"$GAMEDIR/drive_c/users/$USER\\\" \\\"$GAMEDIR/drive_c/users/steamuser\\\"\\\n \\necho \\\"Complete!\\\"\\n\"\n description: Setting game resolution your screen's native resolution\n- input_menu:\n description: Increase draw distances?\n id: DRAWDISTANCE\n options:\n - y: 'Yes'\n - n: 'No'\n preselect: y\n- execute:\n command: \"if [ $INPUT = 'n' ]\\nthen\\n echo \\\"...skipping\\\"\\nfi\\nif [ $INPUT =\\\n \\ 'y' ]\\nthen\\n echo \\\"Increasing game draw distance...\\\"\\n sed \\\"s/LODranges.*/LODranges\\\n \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/SHIPS/shiparch.ini\\\"\\\n \\ -i\\n sed \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program\\\n \\ Files/Microsoft Games/Freelancer/DATA/SHIPS/rtc_shiparch.ini\\\" -i\\n sed \\\"\\\n s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft\\\n \\ Games/Freelancer/DATA/SOLAR/solararch.ini\\\" -i\\n sed \\\"s/LODranges.*/LODranges\\\n \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/select_equip.ini\\\"\\\n \\ -i\\n sed \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program\\\n \\ Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/weapon_equip.ini\\\" -i\\n sed\\\n \\ \\\"s/LODranges.*/LODranges = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft\\\n \\ Games/Freelancer/DATA/EQUIPMENT/misc_equip.ini\\\" -i\\n sed \\\"s/LODranges.*/LODranges\\\n \\ = 0, 99999/\\\" \\\"$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/DATA/EQUIPMENT/st_equip.ini\\\"\\\n \\ -i\\n cp $CACHE/Freelancer_IncreasedDrawDistance.exe \\\"$GAMEDIR/drive_c/Program\\\n \\ Files/Microsoft Games/Freelancer/EXE/Freelancer.exe\\\"\\n\\n echo \\\"...done\\\"\\\n \\nfi\\necho \\\"Complete!\\\"\\n\"\n description: Draw distance patch\n- execute:\n command: \"echo \\\"Fixing color depth\\\"\\n\\nsed \\\"s/color_bpp\\\\s*=.*/color_bpp=32/\\\"\\\n \\ \\\"$GAMEDIR/drive_c/users/$USER/Documents/My Games/Freelancer/PerfOptions.ini\\\"\\\n \\ -i\\nsed \\\"s/depth_bpp\\\\s*=.*/depth_bpp=32/\\\" \\\"$GAMEDIR/drive_c/users/$USER/Documents/My\\\n \\ Games/Freelancer/PerfOptions.ini\\\" -i \\necho \\\"...done\\\"\"\n description: Fix color depth\n- task:\n arch: win32\n key: SampleCount\n name: set_regedit\n path: HKEY_CURRENT_USER\\Software\\Wine\\Direct3D\n prefix: $GAMEDIR\n type: REG_DWORD\n value: 00000008\nwine:\n overrides:\n msacm32.dll: n,b\n" } ] }
A copy of the game (CD-ROM or image thereof)
That should do it.
Note: I tried the installation with Bottles first but when trying to run the setup executable nothing happens. I tried various wine runners but eventually had to give up and turned to Lutris.
Installation
Start Lutris and add a new game
Choose “Install from a local install script”
Feed your install script (see above) to the installer
(Optional) Mount the CD-ROM image, if you have one
- Fedora has the necessary utilities preinstalled. You can just choose “Open with Disk Image Mounter” from the context menu of the
.iso
file.
- Fedora has the necessary utilities preinstalled. You can just choose “Open with Disk Image Mounter” from the context menu of the
If it’s not detected automatically, choose the location of the
setup.exe
file in the root directory of your CD/imageChoose “Express Installation”
After the installation close the launcher manually
Proceed with the installation dialogs of the various things popping up
(Optional) Install the HD mod from here (simply run as executable inside the prefix). This includes nicer visuals, fixes for widescreens and a few other things you can choose during installation.
Note: If you do install this, you have to change the executable of the game as the mod installs into its own separate location.
This should set you up for a nice trip down memory lane. You can of course choose one of the other available installation scripts from Lutris and install additional mods. I understand that there are quite a few out there. I, however, quite like the vanilla game and also don’t care about multiplayer but YMMV, as always.
Happy space exploring!