Installer freelancer-change-me

This script is for reference only and can't be directly used to install the game in the Lutris client. To install the game, download the full 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
- execute:
    command: mkdir -p '$GAMEDIR/drive_c/users/$USER/My Documents/My Games/Freelancer/'
    description: Creating configuration directory
- move:
    description: Creating confiugration file
    dst: $GAMEDIR/drive_c/users/$USER/My 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/My\
      \ Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/color_bpp\\s*=.*/color_bpp=32/\"\
      \ \"$GAMEDIR/drive_c/users/$USER/My Documents/My Games/Freelancer/PerfOptions.ini\"\
      \ -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/My\
      \ 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
- task:
    arch: win64
    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
{
  "installer": [
    {
      "task": {
        "description": "Creating Wine prefix",
        "name": "create_prefix",
        "prefix": "$GAMEDIR",
        "arch": "win32"
      }
    },
    {
      "insert-disc": {
        "requires": "setup.exe"
      }
    },
    {
      "task": {
        "description": "Installing Freelancer. Please choose \"Express install\".",
        "name": "wineexec",
        "executable": "$DISC/setup.exe",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "execute": {
        "command": "mkdir -p '$GAMEDIR/drive_c/users/$USER/My Documents/My Games/Freelancer/'",
        "description": "Creating configuration directory"
      }
    },
    {
      "move": {
        "description": "Creating confiugration file",
        "src": "perfoptions",
        "dst": "$GAMEDIR/drive_c/users/$USER/My Documents/My Games/Freelancer/PerfOptions.ini"
      }
    },
    {
      "task": {
        "description": "Installing 1.1 patch...",
        "name": "wineexec",
        "executable": "officialpatch",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "description": "Installing required audio codecs (prevents in-game stuttering)",
        "name": "wineexec",
        "executable": "wmfdist",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "move": {
        "description": "Installing no-cd",
        "src": "nocd",
        "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe"
      }
    },
    {
      "move": {
        "description": "Adding msacm32.dll (saves downloading a 300mb file from winetricks)",
        "src": "msacm32",
        "dst": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/msacm32.dll"
      }
    },
    {
      "task": {
        "description": "Installing Jason's Freelancer Patch for widescreen support...",
        "name": "wineexec",
        "executable": "jflp",
        "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/My Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/color_bpp\\s*=.*/color_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/My Documents/My Games/Freelancer/PerfOptions.ini\" -i\nsed \"s/depth_bpp\\s*=.*/depth_bpp=32/\" \"$GAMEDIR/drive_c/users/$USER/My 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?",
        "preselect": "y",
        "options": [
          {
            "y": "Yes"
          },
          {
            "n": "No"
          }
        ],
        "id": "DRAWDISTANCE"
      }
    },
    {
      "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"
      }
    },
    {
      "task": {
        "type": "REG_DWORD",
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\Direct3D",
        "arch": "win64",
        "value": "00000008",
        "key": "SampleCount",
        "prefix": "$GAMEDIR",
        "name": "set_regedit"
      }
    }
  ],
  "game": {
    "arch": "win32",
    "prefix": "$GAMEDIR",
    "exe": "$GAMEDIR/drive_c/Program Files/Microsoft Games/Freelancer/EXE/Freelancer.exe"
  },
  "wine": {
    "overrides": {
      "msacm32.dll": "n,b"
    }
  },
  "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"
    }
  ]
}
Back to game