Installer vortex-mod-manager-3-wine-version

该脚本仅供阅读,不能直接用来在Wine游戏助手中安装游戏。
要通过命令安装游戏,请下载完整脚本
安装命令:/opt/apps/net.winegame.client/files/bin/winegame -i ./xxx.json

files:
- setup: https://file.winegame.net/games/vortex-mod-manager/vortex-setup-1.5.13.exe
game:
  args: -d
  exe: drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe
install_complete_text: "Vortex was installed successfully!\nRECOMMENDED:\n\nUse the\
  \ \"Execute script\" context menu option to remove unnecessary files added by wine\
  \ during setup.\n\nOPTIONAL:\n\nClose Vortex, then Move/Copy your %APPDATA%/Vortex\
  \ folder from a previous install into the appropriate location.\nThis will launch\
  \ Vortex with your previous preferences including your nexus account, game extensions,\
  \ themes, and storage locations.\nOnly attempt this if Vortex launches and closes\
  \ correctly during installation, you know the correct location, and you want to\
  \ get adventurous with your file manager.\n\nQUESTIONS & ANSWERS:\n\nQ: Can I use\
  \ the Lutris or Steam shortcuts provided by Lutris?\nA: Yes! Steam will track when\
  \ Lutris closes. Launching using these methods also appears to track Vortex processes\
  \ for playtime/up-time more accurately too.\n\nQ: How do I add new Steam games to\
  \ Vortex?\nA: This installer includes three bash scripts.\nThey can be triggered\
  \ from within Lutris via the \"Execute script\" context menu option.\nvortex-prefix-updater.sh\
  \ launches the next two scripts and writes their output to the install.log file.\n\
  vortex-steam-symlinker.sh will update your games list. Newly added steam games will\
  \ be linked to Vortex.\nvortex-entry-writer.sh will update your link handler and\
  \ set it as the default for nxm: links.\nAll scripts can be run outside of Lutris\
  \ safely by launching them from your file manager or on the command line.\n\nQ:\
  \ Can I move Vortex via its game directory configuration in Lutris?\nA: Yes, though\
  \ you should use the updater script immediately after the move to fix the download\
  \ handler.\n\nQ: Where are my files when browsing within Vortex?\nA: The \"Z:\"\
  \ drive points to \"/\", the root of your filesystem.\n\nQ: Can I make changes to\
  \ the Vortex Lutris configuration?\nA: DO NOT CHANGE \"Prefix Command\" or \"Manual\
  \ Script\" in the advanced options of the Lutris configuration for Vortex.\nGamemode\
  \ has been tested and does work with Vortex, though is likely unnecessary.\nAll\
  \ other options are untested and may have no affect on Vortex due to the Prefix\
  \ Command completely overriding normal command execution.\n\nQ: Can I use Symlink\
  \ Deployment or Move Deployment?\nA: Only Hardlink Deployment has been tested.\n\
  Some untested game extensions may automatically select other deployment strategies.\n\
  See this issue comment for more information: https://github.com/Nexus-Mods/Vortex/issues/9629#issuecomment-1013658187\n\
  \nQ: Vortex is running but Lutris thinks it has stopped?\nA: Lutris detects the\
  \ restart of a monitored process as Vortex stopping when a Vortex download link\
  \ is handled while Vortex is already running.\n\nQ: How does the url get to Vortex?\n\
  A: This installer creates a hidden launcher to handle nxm links for Lutris.\n\n\
  Q: Why is the url so slow to open in Vortex?\nA: The hidden launcher has to open\
  \ the Lutris sqlite game database twice and write the url to a file before even\
  \ launching Lutris.\nUnless Lutris is enhanced to allow passing arguments directly\
  \ to the executable from the command line instead of only from its configuration\
  \ file, this will remain the fastest method which integrates with Lutris and Steam.\n\
  The link handler may speed up when opening subsequent links (as in after the first\
  \ link).\n\nQ: Why not make the scripts strictly sh POSIX compliant?\nA: I wanted\
  \ to, and nearly did. However, Bash is provided by the Lutris runtime and required\
  \ by Steam. Arrays also greatly simplify the symlinker script.\n\nQ: Hello I represent\
  \ the desktop entry escape character parser.\nA: sed -E -n \"122635s/(.*)/\\u\\\
  1/;122635p;122635x;122635s/^([^\\n]+)\\n([^\\n]+)/\\2\\n\\1/p;72676x;72676H;108137x;108137H;66763x;66763H;2608s/(.*)/\\\
  1!/;2608h;\" /usr/share/dict/american-english "
installer:
- task:
    arch: win64
    description: 创建64位Wine前缀
    name: create_prefix
    prefix: $GAMEDIR
- execute:
    command: |
      export LANG=en_US.UTF-8
      export LANGUAGE=en_US
      export WINEPREFIX="$GAMEDIR"
      if [ "$WINE" = "" ]; then
          export WINE="$WINEBIN"
      fi
      if [ "$WINE" = "" ]; then
          export WINE="$HOME/.local/share/net.winegame.client/runners/wine/lutris-7.2-2-x86_64/bin/wine"
      fi
      if [ "$WINETRICKS" = "" ]; then
          export WINETRICKS="$HOME/.local/share/net.winegame.client/runtime/winetricks/winetricks"
      fi
      "$WINETRICKS" --unattended dotnet48
    description: 静默安装 .NET 4.8(请耐心等待)
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    app: corefonts cjkfonts
    description: 安装字体
    name: winetricks
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    app: win10
    description: 切换到Win10模式
    name: winetricks
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    description: Adding Steam to the Wine Prefix Registry 1/2
    key: SteamPath
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Valve\Steam
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam
- task:
    description: Adding Steam to the Wine Prefix Registry 2/2
    key: SteamExe
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Valve\Steam
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\Steam.exe
- task:
    description: Adding DARK SOULS to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\NAMCO BANDAI GAMES\DARK SOULS
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Dark Souls Prepare to
      Die Edition
- task:
    description: Adding DARK SOULS to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\211420
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Dark Souls Prepare to
      Die Edition
- task:
    description: Adding DARK SOULS REMASTERED to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\570940
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\DARK SOULS REMASTERED
- task:
    description: Adding DARK SOULS II to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\236430
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Dark Souls II
- task:
    description: Adding DARK SOULS II Scholar of the First Sin to the Wine Prefix
      Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\335300
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Dark Souls II Scholar
      of the First Sin
- task:
    description: Adding DARK SOULS III to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\374320
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\DARK SOULS III
- task:
    description: Adding ELDEN RING to the Wine Prefix Registry 1/2
    key: InstallLocation
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ELDEN
      RING_is1
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\ELDEN RING
- task:
    description: Adding ELDEN RING to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\1245620
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\ELDEN RING
- task:
    description: Adding Fallout 3 to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Fallout 3
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 3
- task:
    description: Adding Fallout 3 to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\22300
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 3
- task:
    description: Adding Fallout 3 Game of the Year Edition to the Wine Prefix Registry
      1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Fallout 3 goty
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 3 goty
- task:
    description: Adding Fallout 3 Game of the Year Edition to the Wine Prefix Registry
      2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\22370
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 3 goty
- task:
    description: Adding Fallout 4 to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Fallout4
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 4
- task:
    description: Adding Fallout 4 to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\377160
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 4
- task:
    description: Adding Fallout 4 VR to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Fallout 4 VR
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 4 VR
- task:
    description: Adding Fallout 4 VR to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\611660
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout 4 VR
- task:
    description: Adding Fallout 76 to the Wine Prefix Registry 1/2
    key: Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Fallout
      76
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout76
- task:
    description: Adding Fallout 76 to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\1151340
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout76
- task:
    description: Adding Fallout New Vegas to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\FalloutNV
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout New Vegas
- task:
    description: Adding Fallout New Vegas to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\22380
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Fallout New Vegas
- task:
    description: Adding Kerbal Space Program to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\220200
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Kerbal Space Program
- task:
    description: 'Adding MechWarrior 5: Mercenaries to the Wine Prefix Registry 1/1'
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\784080
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\MechWarrior 5 Mercenaries
- task:
    description: 'Adding Middle Earth: Shadow of War to the Wine Prefix Registry 1/1'
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\356190
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\ShadowOfWar
- task:
    description: 'Adding Monster Hunter: World to the Wine Prefix Registry 1/2'
    key: InstallLocation
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam
      App 582010
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Monster Hunter World
- task:
    description: 'Adding Monster Hunter: World to the Wine Prefix Registry 2/2'
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\582010
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Monster Hunter World
- task:
    description: Adding Morrowind to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Morrowind
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Morrowind
- task:
    description: Adding Morrowind to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\22320
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Morrowind
- task:
    description: Adding Oblivion to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\oblivion
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Oblivion
- task:
    description: Adding Oblivion to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\22330
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Oblivion
- task:
    description: 'Adding Sekiro: Shadows Die Twice to the Wine Prefix Registry 1/1'
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\814380
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Sekiro
- task:
    description: Adding Skyrim to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Skyrim
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Skyrim
- task:
    description: Adding Skyrim to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\72850
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Skyrim
- task:
    description: Adding Skyrim Special Edition to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Skyrim Special
      Edition
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Skyrim Special Edition
- task:
    description: Adding Skyrim Special Edition to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\489830
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Skyrim Special Edition
- task:
    description: Adding Skyrim VR to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Bethesda Softworks\Skyrim VR
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\SkyrimVR
- task:
    description: Adding Skyrim VR to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\611670
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\SkyrimVR
- task:
    description: Adding Stardew Valley to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\413150
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Stardew Valley
- task:
    description: Adding The Witcher to the Wine Prefix Registry 1/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\CD Project Red\Witcher
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher Enhanced
      Edition
- task:
    description: Adding The Witcher to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\20900
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher Enhanced
      Edition
- task:
    description: Adding The Witcher 2 to the Wine Prefix Registry 1/1
    key: InstallFolder
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\CD Project Red\The Witcher 2
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\the witcher 2
- task:
    description: Adding The Witcher 3 to the Wine Prefix Registry 1/2
    key: InstallFolder
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\CD Project Red\The Witcher 3
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher 3
- task:
    description: Adding The Witcher 3 to the Wine Prefix Registry 2/2
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\209230
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\The Witcher 3
- task:
    description: Adding Valheim to the Wine Prefix Registry 1/1
    key: Installed Path
    name: set_regedit
    path: HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\892970
    prefix: $GAMEDIR
    type: REG_SZ
    value: C:\\Program Files (x86)\\Steam\\steamapps\\common\\Valheim
- write_file:
    content: |
      #!/usr/bin/bash
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$PWD";
      fi;
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$(realpath "$(dirname "$0";)";)";
      fi;
      if [ -d "$VORTEX_PREFIX" ]; then
      printf "%s\n" "INFO: Using Vortex prefix at \"$VORTEX_PREFIX\"";
      else
      printf "%s\n" "EROR: Invalid Vortex prefix at \"$VORTEX_PREFIX\"";
      exit 1;
      fi;
      DESKTOP=~/Desktop;
      DESKTOP_FNAME="vortex-downloads-handler.desktop";
      DESKTOP_APPLS=~/.local/share/applications/;
      DESKTOP_FPATH="$DESKTOP_APPLS$DESKTOP_FNAME";
      LUTRIS_DB_PATH=~/.local/share/lutris/pga.db;
      LUTRIS_CONFIGS=~/.config/lutris/games/;
      if [ -f "$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd/Vortex.desktop" ]; then
      rm -f "$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd/Vortex.desktop";
      rmdir --ignore-fail-on-non-empty -p "$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd";
      fi;
      if [ -f "$DESKTOP_FPATH" ]; then
      rm -f "$DESKTOP_FPATH";
      fi;
      printf "%s\n" "INFO: Updating nxm link handling for Vortex!";
      printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n" \
      "[Desktop Entry]" \
      "Categories=Game;Network;" \
      "Comment[en_US]=NXM Protocol Download Handler" \
      "Comment=NXM Protocol Download Handler" \
      "Exec=sh -c \"CONFIGPATH=\$(sqlite3 \\\\\"$LUTRIS_DB_PATH\\\\\" \\\\\"select configpath from games where installer_slug = \\\\\\\\\\\\\"vortex-mod-manager-wine\\\\\\\\\\\\\" order by id asc limit 1;\\\\\");sed -i \\\\\"s/^  args:.*$/  args: -d \$(printf \\\\\"%%s\\\\\\\\\\\\\\\\n\\\\\" \\\\\"%u\\\\\" | sed \\\\\"s/^'//;s/'$//;s/\\\\//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//g;s/\\\\\\\\\\\\\\\\&/\\\\\\\\\\\\\\\\\\\\&/g\\\\\")/\\\\\" \\\\\"$LUTRIS_CONFIGS\$CONFIGPATH.yml\\\\\";env LUTRIS_SKIP_INIT=1 lutris lutris:rungameid/\$(sqlite3 \\\\\"$LUTRIS_DB_PATH\\\\\" \\\\\"select id from games where installer_slug = \\\\\\\\\\\\\"vortex-mod-manager-wine\\\\\\\\\\\\\" order by id asc limit 1;\\\\\")\"" \
      "GenericName[en_US]=Writes the provided nxm url as an argument to Vortex by editing the Lutris game config for Vortex twice before launching." \
      "GenericName=Writes the provided nxm url as an argument to Vortex by editing the Lutris game config for Vortex twice before launching." \
      "Icon=lutris_vortex-mod-manager" \
      "MimeType=x-scheme-handler/nxm-protocol;x-scheme-handler/nxm;" \
      "Name[en_US]=Vortex" \
      "Name=Vortex" \
      "NoDisplay=true" \
      "Path=$VORTEX_PREFIX" \
      "StartupNotify=true" \
      "Terminal=false" \
      "Type=Application" \
      > "$DESKTOP_FPATH";
      xdg-mime default "$DESKTOP_FPATH" x-scheme-handler/nxm x-scheme-handler/nxm-protocol;
      fix_mimetypes(){
      if [ -f "$1" ]; then
      printf "%s\n" "INFO: Fixing mimetype association of nxm: links in \"$1\"";
      sed -E -i "s/x-scheme-handler\/nxm=[^[=$=]]\+/x-scheme-handler\/nxm=$DESKTOP_FNAME;/" "$1";
      check="$(grep -a -o -e "x-scheme-handler/nxm=$DESKTOP_FNAME;" "$1")";
      if [ -z "$check" ]; then
      printf "%s\n" "x-scheme-handler/nxm=$DESKTOP_FNAME;" >> "$1";
      fi;
      sed -E -i "s/x-scheme-handler\/nxm-protocol=[^[=$=]]\+/x-scheme-handler\/nxm-protocol=$DESKTOP_FNAME;/" "$1";
      check="$(grep -a -o -e "x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;" "$1")"
      if [ -z "$check" ]; then
      printf "%s\n" "x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;" >> "$1";
      fi;
      else
      printf "%s\n%s\n%s\n\n" "$2" "x-scheme-handler/nxm=$DESKTOP_FNAME;" "x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;" > "$1";
      fi;
      };
      fix_mimetypes "$DESKTOP_APPLS"mimeinfo.cache "[MIME Cache]";
      fix_mimetypes "$DESKTOP_APPLS"defaults.list "[Default Applications]";
      printf "%s\n" "DONE: Made a desktop entry for Vortex at \"$DESKTOP_FPATH\"";
    description: Writing vortex-entry-writer.sh to the Vortex Prefix 1/3
    file: $GAMEDIR/vortex-entry-writer.sh
- chmodx: $GAMEDIR/vortex-entry-writer.sh
- write_file:
    content: |
      #!/usr/bin/bash
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$PWD";
      fi;
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$(realpath "$(dirname "$0";)";)";
      fi;
      if [ -d "$VORTEX_PREFIX" ]; then
      printf "%s\n" \
      "INFO: Using Vortex prefix at \"$VORTEX_PREFIX\"";
      else
      printf "%s\n" \
      "EROR: Invalid Vortex prefix at \"$VORTEX_PREFIX\"";
      exit 1;
      fi;
      rmlink(){
      if [ -h "$1" ];
      then unlink "$1";
      fi;
      }
      mklink(){
      rmlink "$2";
      ln -s -T "$1" "$2";
      }
      manifest_attribute(){
      grep -a -o -e "\"$2\"[[:space:]]*\".*\"$" "$1" \
      | sed "s/\"$2\"[[:space:]]*\"//;s/\"$//";
      };
      manifest_userconfig_attribute(){
      manifest_attribute \
      <(grep \
      -a -o -P -z \
      "\"UserConfig\"\s*{(\s*[^}]*\s*)*}" \
      "$1"\
      ) "$2";
      };
      manifest_mountedconfig_attribute(){
      manifest_attribute \
      <(grep \
      -a -o -P -z \
      "\"MountedConfig\"\s*{(\s*[^}]*\s*)*}" \
      "$1"\
      ) "$2";
      };
      link_sub_targets(){
      TARGET="";
      DIR_LS=("$2"/*);
      for TARGET in "${DIR_LS[@]}"; do
      foldername="$(basename "$TARGET")";
      checklink="$1/$foldername";
      rmlink "$checklink";
      if [ "$foldername" != "Vortex" ] && \
      [ "$foldername" != "openvr" ] && \
      [ "$foldername" != "Microsoft" ] && \
      [ -d "$TARGET" ]; then
      ln -s "$TARGET" "$1/";
      fi;
      done;
      };
      mkdir -p \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming" \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local" \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/LocalLow" \
      "$VORTEX_PREFIX/drive_c/users/$USER/Documents/My Games" \
      "$VORTEX_PREFIX/drive_c/users/$USER/Local Settings" \
      "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common" \
      "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/config";
      mklink \
      "$VORTEX_PREFIX/drive_c/users/$USER/Documents" \
      "$VORTEX_PREFIX/drive_c/users/$USER/My Documents";
      mklink \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming" \
      "$VORTEX_PREFIX/drive_c/users/$USER/Application Data";
      mklink \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local" \
      "$VORTEX_PREFIX/drive_c/users/$USER/Local Settings/Application Data";
      sed "s/\"\/.*\"$/\"C:\\\\\\\\Program Files \(x86\)\\\\\\\\Steam\"/g" < \
      ~/.steam/steam/steamapps/libraryfolders.vdf |& tee \
      "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/libraryfolders.vdf" \
      "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/config/libraryfolders.vdf" \
      1>/dev/null;
      STEAM_LIBRARY_PATHS=();
      while read -r library; do
      rmdir --ignore-fail-on-non-empty "$library"/steamapps/common/* 2>/dev/null;
      if [ -d "$library" ] && [ -d "$library/steamapps/common" ]; then
      if [ -d "$library/steamapps/compatdata/" ]; then
      STEAM_COMPATDATA=("$(find "$library/steamapps/compatdata/" -type d -name "pfx")");
      for compatdata in "${STEAM_COMPATDATA[@]}"; do
      rmdir --ignore-fail-on-non-empty "$compatdata" 2>/dev/null;
      done;
      fi;
      STEAM_LIBRARY_PATHS+=("$library");
      fi;
      done < <(grep -a -o -e "/[^\"]*" ~/.steam/steam/steamapps/libraryfolders.vdf);
      for library in "${STEAM_LIBRARY_PATHS[@]}"; do
      printf "%s\n" "INFO: Found Steam Library at \"$library\"! Linking all games in the library:";
      MANIFESTS=();
      readarray -t MANIFESTS < <(find "$library/steamapps" -mindepth 1 -maxdepth 1 -type f -name "appmanifest_*\.acf");
      for CURRENT_APPMANIFEST in "${MANIFESTS[@]}"; do
      CURRENT_APPID="$(manifest_attribute "$CURRENT_APPMANIFEST" "appid")";
      CURRENT_GAME="$(manifest_attribute "$CURRENT_APPMANIFEST" "name")";
      CURRENT_INSTALLDIR="$(manifest_attribute "$CURRENT_APPMANIFEST" "installdir")";
      printf "%s\n" \
      "INFO: \
      CURRENT_APPID=\"$CURRENT_APPID\" \
      CURRENT_GAME=\"$CURRENT_GAME\" \
      CURRENT_INSTALLDIR=\"$CURRENT_INSTALLDIR\"\
      ";
      checkdir="$(\
      printf "%s" "$CURRENT_APPMANIFEST" | \
      sed "s/\/steamapps\/.\+/\/steamapps\/common\//"\
      )$CURRENT_INSTALLDIR";
      if [ -d "$checkdir" ]; then
      CURRENT_INSTALL_PATH="$checkdir";
      checkdir="$(\
      printf "%s" "$CURRENT_APPMANIFEST" | \
      sed "s/\/steamapps\/.\+/\/steamapps\/compatdata\/$CURRENT_APPID\/pfx/"\
      )";
      printf "%s\n" \
      "GOOD: Found $CURRENT_GAME installation at \"$CURRENT_INSTALL_PATH\"";
      if [ "$(manifest_userconfig_attribute \
      "$CURRENT_APPMANIFEST" \
      "platform_override_dest"\
      )" == "linux" ] && \
      [ "$(manifest_userconfig_attribute \
      "$CURRENT_APPMANIFEST" \
      "platform_override_source"\
      )" == "windows" ];
      then
      printf "%s\n" \
      "INFO: platform_override_dest: \
      \"$(manifest_userconfig_attribute \
      "$CURRENT_APPMANIFEST" \
      "platform_override_dest"\
      )\" platform_override_source: \
      \"$(manifest_userconfig_attribute \
      "$CURRENT_APPMANIFEST" \
      "platform_override_source"\
      )\"\
      ";
      if [ -d "$checkdir" ]; then
      CURRENT_PREFIX_PATH="$checkdir";
      printf "%s\n" \
      "GOOD: Found $CURRENT_GAME \
      Proton Prefix at \
      \"$CURRENT_PREFIX_PATH\"\
      ";
      else
      checkdir="${STEAM_LIBRARY_PATHS[0]}/steamapps/compatdata/$CURRENT_APPID/pfx/";
      printf "%s\n%s\n" \
      "INFO: Proton Prefix for \
      $CURRENT_GAME not found at \"$checkdir\"." \
      "INFO: Trying \"$checkdir\" instead!";
      if [ -d "$checkdir" ]; then
      CURRENT_PREFIX_PATH="$checkdir";
      printf "%s\n%s\n" \
      "GOOD: Found $CURRENT_GAME Proton Prefix \
      in default Steam Library at \
      \"$CURRENT_PREFIX_PATH\"" \
      "WARN: This feature should only be \
      automatically used on a Steam Deck!";
      else
      CURRENT_PREFIX_PATH="";
      printf "%s\n%s\n%s\n" \
      "WARN: $CURRENT_GAME is configured for Proton but no Prefix was found!" \
      "WARN: Its Proton Prefix is missing or has not been run yet!" \
      "WARN: Launch the game with Proton via Steam before modding!";
      fi;
      fi;
      elif [ -d "$checkdir" ]; then
      CURRENT_PREFIX_PATH="$checkdir";
      printf "%s\n%s\n" \
      "WARN: $CURRENT_GAME isn't configured for Proton but a Prefix was found!" \
      "GOOD: Found $CURRENT_GAME Proton Prefix at \"$CURRENT_PREFIX_PATH\"";
      else
      CURRENT_PREFIX_PATH="";
      printf "%s\n" "INFO: No Proton Prefix for $CURRENT_GAME found!";
      fi;
      else
      CURRENT_INSTALL_PATH="";
      CURRENT_PREFIX_PATH="";
      checkdir="$CURRENT_INSTALL_PATH/steamapps/compatdata/$CURRENT_APPID/pfx";
      if [ -d "$checkdir" ]; then
      printf "%s\n%s\n" \
      "WARN: A Proton Prefix for $CURRENT_GAME exists at \"$checkdir\" but no installation was detected!" \
      "WARN: If $CURRENT_GAME was uninstalled, Steam may have left behind files, like save data it syncs with the Steam Cloud.";
      else
      printf "%s\n" "INFO: No installation or Proton Prefix of $CURRENT_GAME found!";
      fi;
      fi;
      if [ -d "$CURRENT_INSTALL_PATH" ]; then
      checkdir="$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common/$CURRENT_INSTALLDIR";
      rmlink "$checkdir";
      checkdir="$CURRENT_INSTALL_PATH";
      if [ -d "$checkdir" ]; then
      ln -s "$checkdir" "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common/";
      fi;
      checkdir="$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/appmanifest_$CURRENT_APPID.acf";
      rmlink "$checkdir";
      checkdir="$CURRENT_APPMANIFEST";
      if [ -f "$checkdir" ]; then
      ln -s "$checkdir" "$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/";
      fi;
      fi;
      if [ -d "$CURRENT_PREFIX_PATH" ]; then
      link_sub_targets \
      "$VORTEX_PREFIX/drive_c/users/$USER/My Documents/My Games" \
      "$CURRENT_PREFIX_PATH/drive_c/users/steamuser/My Documents/My Games";
      link_sub_targets \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming" \
      "$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/Roaming";
      link_sub_targets \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local" \
      "$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/Local";
      link_sub_targets \
      "$VORTEX_PREFIX/drive_c/users/$USER/AppData/LocalLow" \
      "$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/LocalLow";
      fi;
      done;
      done;
      printf "%s\n" "DONE: Finished linking all detected Steam Library folders!";
    description: Writing vortex-steam-symlinker.sh to the Vortex Prefix 2/3
    file: $GAMEDIR/vortex-steam-symlinker.sh
- chmodx: $GAMEDIR/vortex-steam-symlinker.sh
- write_file:
    content: |
      #!/usr/bin/sh
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$PWD";
      fi;
      if [ ! -d "$VORTEX_PREFIX" ]; then
      VORTEX_PREFIX="$(realpath "$(dirname "$0";)";)";
      fi;
      if [ -d "$VORTEX_PREFIX" ]; then
      printf "%s\n" \
      "INFO: Using Vortex prefix at \"$VORTEX_PREFIX\"" \
      | tee install.log;
      else
      printf "%s\n" \
      "EROR: Invalid Vortex prefix at \"$VORTEX_PREFIX\"" \
      | tee install.log;
      exit 1;
      fi;
      "$VORTEX_PREFIX"/vortex-steam-symlinker.sh 2>&1 | tee -a install.log;
      "$VORTEX_PREFIX"/vortex-entry-writer.sh 2>&1 | tee -a install.log;
    description: Writing vortex-prefix-updater.sh to the Vortex Prefix 3/3
    file: $GAMEDIR/vortex-prefix-updater.sh
- chmodx: $GAMEDIR/vortex-prefix-updater.sh
- execute:
    command: ./vortex-prefix-updater.sh
    description: |-
      Updating the Vortex Download Handler
      Updating Symbolic Links Targeting Known Game Locations
    working_dir: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    executable: setup
    name: wineexec
    prefix: $GAMEDIR
require-binaries: bash, dirname, find, grep, ln, mkdir, printf, realpath, sed, sh,
  sqlite3, unlink
system:
  manual_command: $GAMEDIR/vortex-prefix-updater.sh
  prefix_command: sh -c "\"$WINE\" \"$1\" $(CONFIGPATH=$(sqlite3 \"$HOME/.local/share/lutris/pga.db\"
    \"select configpath from games where installer_slug = \\\"vortex-mod-manager-wine\\\"
    order by id asc limit 1;\");sed -n \"/args:.*$/s/^  args://;T;p;Q\" \"$HOME/.config/lutris/games/$CONFIGPATH.yml\";NOYAML=\"
    -d\";sed -i \"s/^  args:.*$/  args:$NOYAML/\" \"$HOME/.config/lutris/games/$CONFIGPATH.yml\";)
    >/dev/null 2>&1;"
variables:
  HOME: $HOME
  USER: $USER
  VERSION: 1.5.13
{
  "files": [
    {
      "setup": "https://file.winegame.net/games/vortex-mod-manager/vortex-setup-1.5.13.exe"
    }
  ],
  "game": {
    "args": "-d",
    "exe": "drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe"
  },
  "install_complete_text": "Vortex was installed successfully!\nRECOMMENDED:\n\nUse the \"Execute script\" context menu option to remove unnecessary files added by wine during setup.\n\nOPTIONAL:\n\nClose Vortex, then Move/Copy your %APPDATA%/Vortex folder from a previous install into the appropriate location.\nThis will launch Vortex with your previous preferences including your nexus account, game extensions, themes, and storage locations.\nOnly attempt this if Vortex launches and closes correctly during installation, you know the correct location, and you want to get adventurous with your file manager.\n\nQUESTIONS & ANSWERS:\n\nQ: Can I use the Lutris or Steam shortcuts provided by Lutris?\nA: Yes! Steam will track when Lutris closes. Launching using these methods also appears to track Vortex processes for playtime/up-time more accurately too.\n\nQ: How do I add new Steam games to Vortex?\nA: This installer includes three bash scripts.\nThey can be triggered from within Lutris via the \"Execute script\" context menu option.\nvortex-prefix-updater.sh launches the next two scripts and writes their output to the install.log file.\nvortex-steam-symlinker.sh will update your games list. Newly added steam games will be linked to Vortex.\nvortex-entry-writer.sh will update your link handler and set it as the default for nxm: links.\nAll scripts can be run outside of Lutris safely by launching them from your file manager or on the command line.\n\nQ: Can I move Vortex via its game directory configuration in Lutris?\nA: Yes, though you should use the updater script immediately after the move to fix the download handler.\n\nQ: Where are my files when browsing within Vortex?\nA: The \"Z:\" drive points to \"/\", the root of your filesystem.\n\nQ: Can I make changes to the Vortex Lutris configuration?\nA: DO NOT CHANGE \"Prefix Command\" or \"Manual Script\" in the advanced options of the Lutris configuration for Vortex.\nGamemode has been tested and does work with Vortex, though is likely unnecessary.\nAll other options are untested and may have no affect on Vortex due to the Prefix Command completely overriding normal command execution.\n\nQ: Can I use Symlink Deployment or Move Deployment?\nA: Only Hardlink Deployment has been tested.\nSome untested game extensions may automatically select other deployment strategies.\nSee this issue comment for more information: https://github.com/Nexus-Mods/Vortex/issues/9629#issuecomment-1013658187\n\nQ: Vortex is running but Lutris thinks it has stopped?\nA: Lutris detects the restart of a monitored process as Vortex stopping when a Vortex download link is handled while Vortex is already running.\n\nQ: How does the url get to Vortex?\nA: This installer creates a hidden launcher to handle nxm links for Lutris.\n\nQ: Why is the url so slow to open in Vortex?\nA: The hidden launcher has to open the Lutris sqlite game database twice and write the url to a file before even launching Lutris.\nUnless Lutris is enhanced to allow passing arguments directly to the executable from the command line instead of only from its configuration file, this will remain the fastest method which integrates with Lutris and Steam.\nThe link handler may speed up when opening subsequent links (as in after the first link).\n\nQ: Why not make the scripts strictly sh POSIX compliant?\nA: I wanted to, and nearly did. However, Bash is provided by the Lutris runtime and required by Steam. Arrays also greatly simplify the symlinker script.\n\nQ: Hello I represent the desktop entry escape character parser.\nA: sed -E -n \"122635s/(.*)/\\u\\1/;122635p;122635x;122635s/^([^\\n]+)\\n([^\\n]+)/\\2\\n\\1/p;72676x;72676H;108137x;108137H;66763x;66763H;2608s/(.*)/\\1!/;2608h;\" /usr/share/dict/american-english ",
  "installer": [
    {
      "task": {
        "arch": "win64",
        "description": "\u521b\u5efa64\u4f4dWine\u524d\u7f00",
        "name": "create_prefix",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "execute": {
        "command": "export LANG=en_US.UTF-8\nexport LANGUAGE=en_US\nexport WINEPREFIX=\"$GAMEDIR\"\nif [ \"$WINE\" = \"\" ]; then\n    export WINE=\"$WINEBIN\"\nfi\nif [ \"$WINE\" = \"\" ]; then\n    export WINE=\"$HOME/.local/share/net.winegame.client/runners/wine/lutris-7.2-2-x86_64/bin/wine\"\nfi\nif [ \"$WINETRICKS\" = \"\" ]; then\n    export WINETRICKS=\"$HOME/.local/share/net.winegame.client/runtime/winetricks/winetricks\"\nfi\n\"$WINETRICKS\" --unattended dotnet48\n",
        "description": "\u9759\u9ed8\u5b89\u88c5 .NET 4.8\uff08\u8bf7\u8010\u5fc3\u7b49\u5f85\uff09"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "app": "corefonts cjkfonts",
        "description": "\u5b89\u88c5\u5b57\u4f53",
        "name": "winetricks",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "app": "win10",
        "description": "\u5207\u6362\u5230Win10\u6a21\u5f0f",
        "name": "winetricks",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "description": "Adding Steam to the Wine Prefix Registry 1/2",
        "key": "SteamPath",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Valve\\Steam",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam"
      }
    },
    {
      "task": {
        "description": "Adding Steam to the Wine Prefix Registry 2/2",
        "key": "SteamExe",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Valve\\Steam",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\Steam.exe"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\NAMCO BANDAI GAMES\\DARK SOULS",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Dark Souls Prepare to Die Edition"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\211420",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Dark Souls Prepare to Die Edition"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS REMASTERED to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\570940",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\DARK SOULS REMASTERED"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS II to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\236430",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Dark Souls II"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS II Scholar of the First Sin to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\335300",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Dark Souls II Scholar of the First Sin"
      }
    },
    {
      "task": {
        "description": "Adding DARK SOULS III to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\374320",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\DARK SOULS III"
      }
    },
    {
      "task": {
        "description": "Adding ELDEN RING to the Wine Prefix Registry 1/2",
        "key": "InstallLocation",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ELDEN RING_is1",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\ELDEN RING"
      }
    },
    {
      "task": {
        "description": "Adding ELDEN RING to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\1245620",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\ELDEN RING"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 3 to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Fallout 3",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 3"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 3 to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\22300",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 3"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 3 Game of the Year Edition to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Fallout 3 goty",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 3 goty"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 3 Game of the Year Edition to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\22370",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 3 goty"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 4 to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Fallout4",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 4"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 4 to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\377160",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 4"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 4 VR to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Fallout 4 VR",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 4 VR"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 4 VR to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\611660",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout 4 VR"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 76 to the Wine Prefix Registry 1/2",
        "key": "Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Fallout 76",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout76"
      }
    },
    {
      "task": {
        "description": "Adding Fallout 76 to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\1151340",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout76"
      }
    },
    {
      "task": {
        "description": "Adding Fallout New Vegas to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\FalloutNV",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout New Vegas"
      }
    },
    {
      "task": {
        "description": "Adding Fallout New Vegas to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\22380",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Fallout New Vegas"
      }
    },
    {
      "task": {
        "description": "Adding Kerbal Space Program to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\220200",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Kerbal Space Program"
      }
    },
    {
      "task": {
        "description": "Adding MechWarrior 5: Mercenaries to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\784080",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\MechWarrior 5 Mercenaries"
      }
    },
    {
      "task": {
        "description": "Adding Middle Earth: Shadow of War to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\356190",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\ShadowOfWar"
      }
    },
    {
      "task": {
        "description": "Adding Monster Hunter: World to the Wine Prefix Registry 1/2",
        "key": "InstallLocation",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App 582010",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Monster Hunter World"
      }
    },
    {
      "task": {
        "description": "Adding Monster Hunter: World to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\582010",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Monster Hunter World"
      }
    },
    {
      "task": {
        "description": "Adding Morrowind to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Morrowind",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Morrowind"
      }
    },
    {
      "task": {
        "description": "Adding Morrowind to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\22320",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Morrowind"
      }
    },
    {
      "task": {
        "description": "Adding Oblivion to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\oblivion",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Oblivion"
      }
    },
    {
      "task": {
        "description": "Adding Oblivion to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\22330",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Oblivion"
      }
    },
    {
      "task": {
        "description": "Adding Sekiro: Shadows Die Twice to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\814380",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Sekiro"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Skyrim",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Skyrim"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\72850",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Skyrim"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim Special Edition to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Skyrim Special Edition",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Skyrim Special Edition"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim Special Edition to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\489830",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Skyrim Special Edition"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim VR to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Bethesda Softworks\\Skyrim VR",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\SkyrimVR"
      }
    },
    {
      "task": {
        "description": "Adding Skyrim VR to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\611670",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\SkyrimVR"
      }
    },
    {
      "task": {
        "description": "Adding Stardew Valley to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\413150",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Stardew Valley"
      }
    },
    {
      "task": {
        "description": "Adding The Witcher to the Wine Prefix Registry 1/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\CD Project Red\\Witcher",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\The Witcher Enhanced Edition"
      }
    },
    {
      "task": {
        "description": "Adding The Witcher to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\20900",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\The Witcher Enhanced Edition"
      }
    },
    {
      "task": {
        "description": "Adding The Witcher 2 to the Wine Prefix Registry 1/1",
        "key": "InstallFolder",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\CD Project Red\\The Witcher 2",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\the witcher 2"
      }
    },
    {
      "task": {
        "description": "Adding The Witcher 3 to the Wine Prefix Registry 1/2",
        "key": "InstallFolder",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\CD Project Red\\The Witcher 3",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\The Witcher 3"
      }
    },
    {
      "task": {
        "description": "Adding The Witcher 3 to the Wine Prefix Registry 2/2",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\209230",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\The Witcher 3"
      }
    },
    {
      "task": {
        "description": "Adding Valheim to the Wine Prefix Registry 1/1",
        "key": "Installed Path",
        "name": "set_regedit",
        "path": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Valve\\Steam\\Apps\\892970",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "C:\\\\Program Files (x86)\\\\Steam\\\\steamapps\\\\common\\\\Valheim"
      }
    },
    {
      "write_file": {
        "content": "#!/usr/bin/bash\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$PWD\";\nfi;\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$(realpath \"$(dirname \"$0\";)\";)\";\nfi;\nif [ -d \"$VORTEX_PREFIX\" ]; then\nprintf \"%s\\n\" \"INFO: Using Vortex prefix at \\\"$VORTEX_PREFIX\\\"\";\nelse\nprintf \"%s\\n\" \"EROR: Invalid Vortex prefix at \\\"$VORTEX_PREFIX\\\"\";\nexit 1;\nfi;\nDESKTOP=~/Desktop;\nDESKTOP_FNAME=\"vortex-downloads-handler.desktop\";\nDESKTOP_APPLS=~/.local/share/applications/;\nDESKTOP_FPATH=\"$DESKTOP_APPLS$DESKTOP_FNAME\";\nLUTRIS_DB_PATH=~/.local/share/lutris/pga.db;\nLUTRIS_CONFIGS=~/.config/lutris/games/;\nif [ -f \"$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd/Vortex.desktop\" ]; then\nrm -f \"$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd/Vortex.desktop\";\nrmdir --ignore-fail-on-non-empty -p \"$DESKTOP_APPLS/wine/Programs/Black Tree Gaming Ltd\";\nfi;\nif [ -f \"$DESKTOP_FPATH\" ]; then\nrm -f \"$DESKTOP_FPATH\";\nfi;\nprintf \"%s\\n\" \"INFO: Updating nxm link handling for Vortex!\";\nprintf \"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n\\n\" \\\n\"[Desktop Entry]\" \\\n\"Categories=Game;Network;\" \\\n\"Comment[en_US]=NXM Protocol Download Handler\" \\\n\"Comment=NXM Protocol Download Handler\" \\\n\"Exec=sh -c \\\"CONFIGPATH=\\$(sqlite3 \\\\\\\\\\\"$LUTRIS_DB_PATH\\\\\\\\\\\" \\\\\\\\\\\"select configpath from games where installer_slug = \\\\\\\\\\\\\\\\\\\\\\\\\\\"vortex-mod-manager-wine\\\\\\\\\\\\\\\\\\\\\\\\\\\" order by id asc limit 1;\\\\\\\\\\\");sed -i \\\\\\\\\\\"s/^  args:.*$/  args: -d \\$(printf \\\\\\\\\\\"%%s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n\\\\\\\\\\\" \\\\\\\\\\\"%u\\\\\\\\\\\" | sed \\\\\\\\\\\"s/^'//;s/'$//;s/\\\\\\\\//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//g;s/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\&/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\&/g\\\\\\\\\\\")/\\\\\\\\\\\" \\\\\\\\\\\"$LUTRIS_CONFIGS\\$CONFIGPATH.yml\\\\\\\\\\\";env LUTRIS_SKIP_INIT=1 lutris lutris:rungameid/\\$(sqlite3 \\\\\\\\\\\"$LUTRIS_DB_PATH\\\\\\\\\\\" \\\\\\\\\\\"select id from games where installer_slug = \\\\\\\\\\\\\\\\\\\\\\\\\\\"vortex-mod-manager-wine\\\\\\\\\\\\\\\\\\\\\\\\\\\" order by id asc limit 1;\\\\\\\\\\\")\\\"\" \\\n\"GenericName[en_US]=Writes the provided nxm url as an argument to Vortex by editing the Lutris game config for Vortex twice before launching.\" \\\n\"GenericName=Writes the provided nxm url as an argument to Vortex by editing the Lutris game config for Vortex twice before launching.\" \\\n\"Icon=lutris_vortex-mod-manager\" \\\n\"MimeType=x-scheme-handler/nxm-protocol;x-scheme-handler/nxm;\" \\\n\"Name[en_US]=Vortex\" \\\n\"Name=Vortex\" \\\n\"NoDisplay=true\" \\\n\"Path=$VORTEX_PREFIX\" \\\n\"StartupNotify=true\" \\\n\"Terminal=false\" \\\n\"Type=Application\" \\\n> \"$DESKTOP_FPATH\";\nxdg-mime default \"$DESKTOP_FPATH\" x-scheme-handler/nxm x-scheme-handler/nxm-protocol;\nfix_mimetypes(){\nif [ -f \"$1\" ]; then\nprintf \"%s\\n\" \"INFO: Fixing mimetype association of nxm: links in \\\"$1\\\"\";\nsed -E -i \"s/x-scheme-handler\\/nxm=[^[=$=]]\\+/x-scheme-handler\\/nxm=$DESKTOP_FNAME;/\" \"$1\";\ncheck=\"$(grep -a -o -e \"x-scheme-handler/nxm=$DESKTOP_FNAME;\" \"$1\")\";\nif [ -z \"$check\" ]; then\nprintf \"%s\\n\" \"x-scheme-handler/nxm=$DESKTOP_FNAME;\" >> \"$1\";\nfi;\nsed -E -i \"s/x-scheme-handler\\/nxm-protocol=[^[=$=]]\\+/x-scheme-handler\\/nxm-protocol=$DESKTOP_FNAME;/\" \"$1\";\ncheck=\"$(grep -a -o -e \"x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;\" \"$1\")\"\nif [ -z \"$check\" ]; then\nprintf \"%s\\n\" \"x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;\" >> \"$1\";\nfi;\nelse\nprintf \"%s\\n%s\\n%s\\n\\n\" \"$2\" \"x-scheme-handler/nxm=$DESKTOP_FNAME;\" \"x-scheme-handler/nxm-protocol=$DESKTOP_FNAME;\" > \"$1\";\nfi;\n};\nfix_mimetypes \"$DESKTOP_APPLS\"mimeinfo.cache \"[MIME Cache]\";\nfix_mimetypes \"$DESKTOP_APPLS\"defaults.list \"[Default Applications]\";\nprintf \"%s\\n\" \"DONE: Made a desktop entry for Vortex at \\\"$DESKTOP_FPATH\\\"\";\n",
        "description": "Writing vortex-entry-writer.sh to the Vortex Prefix 1/3",
        "file": "$GAMEDIR/vortex-entry-writer.sh"
      }
    },
    {
      "chmodx": "$GAMEDIR/vortex-entry-writer.sh"
    },
    {
      "write_file": {
        "content": "#!/usr/bin/bash\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$PWD\";\nfi;\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$(realpath \"$(dirname \"$0\";)\";)\";\nfi;\nif [ -d \"$VORTEX_PREFIX\" ]; then\nprintf \"%s\\n\" \\\n\"INFO: Using Vortex prefix at \\\"$VORTEX_PREFIX\\\"\";\nelse\nprintf \"%s\\n\" \\\n\"EROR: Invalid Vortex prefix at \\\"$VORTEX_PREFIX\\\"\";\nexit 1;\nfi;\nrmlink(){\nif [ -h \"$1\" ];\nthen unlink \"$1\";\nfi;\n}\nmklink(){\nrmlink \"$2\";\nln -s -T \"$1\" \"$2\";\n}\nmanifest_attribute(){\ngrep -a -o -e \"\\\"$2\\\"[[:space:]]*\\\".*\\\"$\" \"$1\" \\\n| sed \"s/\\\"$2\\\"[[:space:]]*\\\"//;s/\\\"$//\";\n};\nmanifest_userconfig_attribute(){\nmanifest_attribute \\\n<(grep \\\n-a -o -P -z \\\n\"\\\"UserConfig\\\"\\s*{(\\s*[^}]*\\s*)*}\" \\\n\"$1\"\\\n) \"$2\";\n};\nmanifest_mountedconfig_attribute(){\nmanifest_attribute \\\n<(grep \\\n-a -o -P -z \\\n\"\\\"MountedConfig\\\"\\s*{(\\s*[^}]*\\s*)*}\" \\\n\"$1\"\\\n) \"$2\";\n};\nlink_sub_targets(){\nTARGET=\"\";\nDIR_LS=(\"$2\"/*);\nfor TARGET in \"${DIR_LS[@]}\"; do\nfoldername=\"$(basename \"$TARGET\")\";\nchecklink=\"$1/$foldername\";\nrmlink \"$checklink\";\nif [ \"$foldername\" != \"Vortex\" ] && \\\n[ \"$foldername\" != \"openvr\" ] && \\\n[ \"$foldername\" != \"Microsoft\" ] && \\\n[ -d \"$TARGET\" ]; then\nln -s \"$TARGET\" \"$1/\";\nfi;\ndone;\n};\nmkdir -p \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/LocalLow\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/Documents/My Games\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/Local Settings\" \\\n\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common\" \\\n\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/config\";\nmklink \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/Documents\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/My Documents\";\nmklink \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/Application Data\";\nmklink \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local\" \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/Local Settings/Application Data\";\nsed \"s/\\\"\\/.*\\\"$/\\\"C:\\\\\\\\\\\\\\\\Program Files \\(x86\\)\\\\\\\\\\\\\\\\Steam\\\"/g\" < \\\n~/.steam/steam/steamapps/libraryfolders.vdf |& tee \\\n\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/libraryfolders.vdf\" \\\n\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/config/libraryfolders.vdf\" \\\n1>/dev/null;\nSTEAM_LIBRARY_PATHS=();\nwhile read -r library; do\nrmdir --ignore-fail-on-non-empty \"$library\"/steamapps/common/* 2>/dev/null;\nif [ -d \"$library\" ] && [ -d \"$library/steamapps/common\" ]; then\nif [ -d \"$library/steamapps/compatdata/\" ]; then\nSTEAM_COMPATDATA=(\"$(find \"$library/steamapps/compatdata/\" -type d -name \"pfx\")\");\nfor compatdata in \"${STEAM_COMPATDATA[@]}\"; do\nrmdir --ignore-fail-on-non-empty \"$compatdata\" 2>/dev/null;\ndone;\nfi;\nSTEAM_LIBRARY_PATHS+=(\"$library\");\nfi;\ndone < <(grep -a -o -e \"/[^\\\"]*\" ~/.steam/steam/steamapps/libraryfolders.vdf);\nfor library in \"${STEAM_LIBRARY_PATHS[@]}\"; do\nprintf \"%s\\n\" \"INFO: Found Steam Library at \\\"$library\\\"! Linking all games in the library:\";\nMANIFESTS=();\nreadarray -t MANIFESTS < <(find \"$library/steamapps\" -mindepth 1 -maxdepth 1 -type f -name \"appmanifest_*\\.acf\");\nfor CURRENT_APPMANIFEST in \"${MANIFESTS[@]}\"; do\nCURRENT_APPID=\"$(manifest_attribute \"$CURRENT_APPMANIFEST\" \"appid\")\";\nCURRENT_GAME=\"$(manifest_attribute \"$CURRENT_APPMANIFEST\" \"name\")\";\nCURRENT_INSTALLDIR=\"$(manifest_attribute \"$CURRENT_APPMANIFEST\" \"installdir\")\";\nprintf \"%s\\n\" \\\n\"INFO: \\\nCURRENT_APPID=\\\"$CURRENT_APPID\\\" \\\nCURRENT_GAME=\\\"$CURRENT_GAME\\\" \\\nCURRENT_INSTALLDIR=\\\"$CURRENT_INSTALLDIR\\\"\\\n\";\ncheckdir=\"$(\\\nprintf \"%s\" \"$CURRENT_APPMANIFEST\" | \\\nsed \"s/\\/steamapps\\/.\\+/\\/steamapps\\/common\\//\"\\\n)$CURRENT_INSTALLDIR\";\nif [ -d \"$checkdir\" ]; then\nCURRENT_INSTALL_PATH=\"$checkdir\";\ncheckdir=\"$(\\\nprintf \"%s\" \"$CURRENT_APPMANIFEST\" | \\\nsed \"s/\\/steamapps\\/.\\+/\\/steamapps\\/compatdata\\/$CURRENT_APPID\\/pfx/\"\\\n)\";\nprintf \"%s\\n\" \\\n\"GOOD: Found $CURRENT_GAME installation at \\\"$CURRENT_INSTALL_PATH\\\"\";\nif [ \"$(manifest_userconfig_attribute \\\n\"$CURRENT_APPMANIFEST\" \\\n\"platform_override_dest\"\\\n)\" == \"linux\" ] && \\\n[ \"$(manifest_userconfig_attribute \\\n\"$CURRENT_APPMANIFEST\" \\\n\"platform_override_source\"\\\n)\" == \"windows\" ];\nthen\nprintf \"%s\\n\" \\\n\"INFO: platform_override_dest: \\\n\\\"$(manifest_userconfig_attribute \\\n\"$CURRENT_APPMANIFEST\" \\\n\"platform_override_dest\"\\\n)\\\" platform_override_source: \\\n\\\"$(manifest_userconfig_attribute \\\n\"$CURRENT_APPMANIFEST\" \\\n\"platform_override_source\"\\\n)\\\"\\\n\";\nif [ -d \"$checkdir\" ]; then\nCURRENT_PREFIX_PATH=\"$checkdir\";\nprintf \"%s\\n\" \\\n\"GOOD: Found $CURRENT_GAME \\\nProton Prefix at \\\n\\\"$CURRENT_PREFIX_PATH\\\"\\\n\";\nelse\ncheckdir=\"${STEAM_LIBRARY_PATHS[0]}/steamapps/compatdata/$CURRENT_APPID/pfx/\";\nprintf \"%s\\n%s\\n\" \\\n\"INFO: Proton Prefix for \\\n$CURRENT_GAME not found at \\\"$checkdir\\\".\" \\\n\"INFO: Trying \\\"$checkdir\\\" instead!\";\nif [ -d \"$checkdir\" ]; then\nCURRENT_PREFIX_PATH=\"$checkdir\";\nprintf \"%s\\n%s\\n\" \\\n\"GOOD: Found $CURRENT_GAME Proton Prefix \\\nin default Steam Library at \\\n\\\"$CURRENT_PREFIX_PATH\\\"\" \\\n\"WARN: This feature should only be \\\nautomatically used on a Steam Deck!\";\nelse\nCURRENT_PREFIX_PATH=\"\";\nprintf \"%s\\n%s\\n%s\\n\" \\\n\"WARN: $CURRENT_GAME is configured for Proton but no Prefix was found!\" \\\n\"WARN: Its Proton Prefix is missing or has not been run yet!\" \\\n\"WARN: Launch the game with Proton via Steam before modding!\";\nfi;\nfi;\nelif [ -d \"$checkdir\" ]; then\nCURRENT_PREFIX_PATH=\"$checkdir\";\nprintf \"%s\\n%s\\n\" \\\n\"WARN: $CURRENT_GAME isn't configured for Proton but a Prefix was found!\" \\\n\"GOOD: Found $CURRENT_GAME Proton Prefix at \\\"$CURRENT_PREFIX_PATH\\\"\";\nelse\nCURRENT_PREFIX_PATH=\"\";\nprintf \"%s\\n\" \"INFO: No Proton Prefix for $CURRENT_GAME found!\";\nfi;\nelse\nCURRENT_INSTALL_PATH=\"\";\nCURRENT_PREFIX_PATH=\"\";\ncheckdir=\"$CURRENT_INSTALL_PATH/steamapps/compatdata/$CURRENT_APPID/pfx\";\nif [ -d \"$checkdir\" ]; then\nprintf \"%s\\n%s\\n\" \\\n\"WARN: A Proton Prefix for $CURRENT_GAME exists at \\\"$checkdir\\\" but no installation was detected!\" \\\n\"WARN: If $CURRENT_GAME was uninstalled, Steam may have left behind files, like save data it syncs with the Steam Cloud.\";\nelse\nprintf \"%s\\n\" \"INFO: No installation or Proton Prefix of $CURRENT_GAME found!\";\nfi;\nfi;\nif [ -d \"$CURRENT_INSTALL_PATH\" ]; then\ncheckdir=\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common/$CURRENT_INSTALLDIR\";\nrmlink \"$checkdir\";\ncheckdir=\"$CURRENT_INSTALL_PATH\";\nif [ -d \"$checkdir\" ]; then\nln -s \"$checkdir\" \"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/common/\";\nfi;\ncheckdir=\"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/appmanifest_$CURRENT_APPID.acf\";\nrmlink \"$checkdir\";\ncheckdir=\"$CURRENT_APPMANIFEST\";\nif [ -f \"$checkdir\" ]; then\nln -s \"$checkdir\" \"$VORTEX_PREFIX/drive_c/Program Files (x86)/Steam/steamapps/\";\nfi;\nfi;\nif [ -d \"$CURRENT_PREFIX_PATH\" ]; then\nlink_sub_targets \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/My Documents/My Games\" \\\n\"$CURRENT_PREFIX_PATH/drive_c/users/steamuser/My Documents/My Games\";\nlink_sub_targets \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Roaming\" \\\n\"$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/Roaming\";\nlink_sub_targets \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/Local\" \\\n\"$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/Local\";\nlink_sub_targets \\\n\"$VORTEX_PREFIX/drive_c/users/$USER/AppData/LocalLow\" \\\n\"$CURRENT_PREFIX_PATH/drive_c/users/steamuser/AppData/LocalLow\";\nfi;\ndone;\ndone;\nprintf \"%s\\n\" \"DONE: Finished linking all detected Steam Library folders!\";\n",
        "description": "Writing vortex-steam-symlinker.sh to the Vortex Prefix 2/3",
        "file": "$GAMEDIR/vortex-steam-symlinker.sh"
      }
    },
    {
      "chmodx": "$GAMEDIR/vortex-steam-symlinker.sh"
    },
    {
      "write_file": {
        "content": "#!/usr/bin/sh\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$PWD\";\nfi;\nif [ ! -d \"$VORTEX_PREFIX\" ]; then\nVORTEX_PREFIX=\"$(realpath \"$(dirname \"$0\";)\";)\";\nfi;\nif [ -d \"$VORTEX_PREFIX\" ]; then\nprintf \"%s\\n\" \\\n\"INFO: Using Vortex prefix at \\\"$VORTEX_PREFIX\\\"\" \\\n| tee install.log;\nelse\nprintf \"%s\\n\" \\\n\"EROR: Invalid Vortex prefix at \\\"$VORTEX_PREFIX\\\"\" \\\n| tee install.log;\nexit 1;\nfi;\n\"$VORTEX_PREFIX\"/vortex-steam-symlinker.sh 2>&1 | tee -a install.log;\n\"$VORTEX_PREFIX\"/vortex-entry-writer.sh 2>&1 | tee -a install.log;\n",
        "description": "Writing vortex-prefix-updater.sh to the Vortex Prefix 3/3",
        "file": "$GAMEDIR/vortex-prefix-updater.sh"
      }
    },
    {
      "chmodx": "$GAMEDIR/vortex-prefix-updater.sh"
    },
    {
      "execute": {
        "command": "./vortex-prefix-updater.sh",
        "description": "Updating the Vortex Download Handler\nUpdating Symbolic Links Targeting Known Game Locations",
        "working_dir": "$GAMEDIR"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "executable": "setup",
        "name": "wineexec",
        "prefix": "$GAMEDIR"
      }
    }
  ],
  "require-binaries": "bash, dirname, find, grep, ln, mkdir, printf, realpath, sed, sh, sqlite3, unlink",
  "system": {
    "manual_command": "$GAMEDIR/vortex-prefix-updater.sh",
    "prefix_command": "sh -c \"\\\"$WINE\\\" \\\"$1\\\" $(CONFIGPATH=$(sqlite3 \\\"$HOME/.local/share/lutris/pga.db\\\" \\\"select configpath from games where installer_slug = \\\\\\\"vortex-mod-manager-wine\\\\\\\" order by id asc limit 1;\\\");sed -n \\\"/args:.*$/s/^  args://;T;p;Q\\\" \\\"$HOME/.config/lutris/games/$CONFIGPATH.yml\\\";NOYAML=\\\" -d\\\";sed -i \\\"s/^  args:.*$/  args:$NOYAML/\\\" \\\"$HOME/.config/lutris/games/$CONFIGPATH.yml\\\";) >/dev/null 2>&1;\""
  },
  "variables": {
    "HOME": "$HOME",
    "USER": "$USER",
    "VERSION": "1.5.13"
  }
}
返回游戏