Installer vortex-mod-manager-1-vortex-174

该脚本仅供阅读,不能直接用来在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.7.4.exe
- cmdfonts: https://file.winegame.net/cache/wine/fonts/MicrosoftYaHeiMono-20221213.tar.xz
- dotnet6: https://file.winegame.net/games/dotnet/dotnet-sdk-6.0.405-win-x64.exe
- masterlist: https://file.winegame.net/games/vortex-mod-manager/masterlist.yaml
game:
  args: -d
  exe: drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe
install_complete_text: |
  Vortex安装完成。
  注意:请仅用Vortex安装Mod,不要使用Vortex启动游戏。
  这个Vortex不能用于启动游戏!
  就算游戏可以运行,也一定会很卡!
installer:
- execute:
    command: bash "$wineinit" win64 7.20
    description: 下载字体和运行库
- task:
    arch: win64
    description: 创建64位Wine前缀
    name: create_prefix
    prefix: $GAMEDIR
- extract:
    description: 解压中文字体
    dst: $GAMEDIR/drive_c/windows/Fonts
    file: cmdfonts
- task:
    description: 安装中文字体
    filename: $GAMEDIR/drive_c/windows/Fonts/MicrosoftYaHeiMono.reg
    name: set_regedit_file
- execute:
    command: rm -f "$GAMEDIR/dosdevices/m::"; ln -sf "$HOME" "$GAMEDIR/dosdevices/m:"
    description: 添加主目录($HOME)为M盘
- task:
    app: dotnet48
    description: 静默安装 .NET 4.8(请耐心等待)
    name: winetricks
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    app: win10
    description: 切换到Win10模式
    name: winetricks
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    args: /install /quiet /norestart
    description: 静默安装 .NET 6.0(请耐心等待)
    executable: dotnet6
    name: wineexec
    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:
    description: |
      安装Vortex……
      请在Vortex安装完成、弹出主界面后点关闭,否则安装不会自动结束。
    exclude_processes: Vortex.exe mscorsvw.exe plugplay.exe rpcss.exe services.exe
      winedevice.exe svchost.exe conhost.exe
    executable: setup
    name: wineexec
    prefix: $GAMEDIR
- execute:
    command: |
      dir="$GAMEDIR/drive_c/users/$USER/AppData/Roaming/Vortex/skyrimse/masterlist";
      mkdir -p "$dir";
      mv "$masterlist" "$dir/masterlist.yaml";
    description: 放置SkyrimSE主列表(masterlist.yaml)
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.7.4
wine:
  dxvk: false
  esync: false
  fsync: false
  version: winehq-staging-7.22-x86_64
  vkd3d: false
{
  "files": [
    {
      "setup": "https://file.winegame.net/games/vortex-mod-manager/vortex-setup-1.7.4.exe"
    },
    {
      "cmdfonts": "https://file.winegame.net/cache/wine/fonts/MicrosoftYaHeiMono-20221213.tar.xz"
    },
    {
      "dotnet6": "https://file.winegame.net/games/dotnet/dotnet-sdk-6.0.405-win-x64.exe"
    },
    {
      "masterlist": "https://file.winegame.net/games/vortex-mod-manager/masterlist.yaml"
    }
  ],
  "game": {
    "args": "-d",
    "exe": "drive_c/Program Files/Black Tree Gaming Ltd/Vortex/Vortex.exe"
  },
  "install_complete_text": "Vortex\u5b89\u88c5\u5b8c\u6210\u3002\n\u6ce8\u610f\uff1a\u8bf7\u4ec5\u7528Vortex\u5b89\u88c5Mod\uff0c\u4e0d\u8981\u4f7f\u7528Vortex\u542f\u52a8\u6e38\u620f\u3002\n\u8fd9\u4e2aVortex\u4e0d\u80fd\u7528\u4e8e\u542f\u52a8\u6e38\u620f\uff01\n\u5c31\u7b97\u6e38\u620f\u53ef\u4ee5\u8fd0\u884c\uff0c\u4e5f\u4e00\u5b9a\u4f1a\u5f88\u5361\uff01\n",
  "installer": [
    {
      "execute": {
        "command": "bash \"$wineinit\" win64 7.20",
        "description": "\u4e0b\u8f7d\u5b57\u4f53\u548c\u8fd0\u884c\u5e93"
      }
    },
    {
      "task": {
        "arch": "win64",
        "description": "\u521b\u5efa64\u4f4dWine\u524d\u7f00",
        "name": "create_prefix",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "extract": {
        "description": "\u89e3\u538b\u4e2d\u6587\u5b57\u4f53",
        "dst": "$GAMEDIR/drive_c/windows/Fonts",
        "file": "cmdfonts"
      }
    },
    {
      "task": {
        "description": "\u5b89\u88c5\u4e2d\u6587\u5b57\u4f53",
        "filename": "$GAMEDIR/drive_c/windows/Fonts/MicrosoftYaHeiMono.reg",
        "name": "set_regedit_file"
      }
    },
    {
      "execute": {
        "command": "rm -f \"$GAMEDIR/dosdevices/m::\"; ln -sf \"$HOME\" \"$GAMEDIR/dosdevices/m:\"",
        "description": "\u6dfb\u52a0\u4e3b\u76ee\u5f55($HOME)\u4e3aM\u76d8"
      }
    },
    {
      "task": {
        "app": "dotnet48",
        "description": "\u9759\u9ed8\u5b89\u88c5 .NET 4.8\uff08\u8bf7\u8010\u5fc3\u7b49\u5f85\uff09",
        "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": {
        "args": "/install /quiet /norestart",
        "description": "\u9759\u9ed8\u5b89\u88c5 .NET 6.0\uff08\u8bf7\u8010\u5fc3\u7b49\u5f85\uff09",
        "executable": "dotnet6",
        "name": "wineexec",
        "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": {
        "description": "\u5b89\u88c5Vortex\u2026\u2026\n\u8bf7\u5728Vortex\u5b89\u88c5\u5b8c\u6210\u3001\u5f39\u51fa\u4e3b\u754c\u9762\u540e\u70b9\u5173\u95ed\uff0c\u5426\u5219\u5b89\u88c5\u4e0d\u4f1a\u81ea\u52a8\u7ed3\u675f\u3002\n",
        "exclude_processes": "Vortex.exe mscorsvw.exe plugplay.exe rpcss.exe services.exe winedevice.exe svchost.exe conhost.exe",
        "executable": "setup",
        "name": "wineexec",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "execute": {
        "command": "dir=\"$GAMEDIR/drive_c/users/$USER/AppData/Roaming/Vortex/skyrimse/masterlist\";\nmkdir -p \"$dir\";\nmv \"$masterlist\" \"$dir/masterlist.yaml\";\n",
        "description": "\u653e\u7f6eSkyrimSE\u4e3b\u5217\u8868\uff08masterlist.yaml\uff09"
      }
    }
  ],
  "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.7.4"
  },
  "wine": {
    "dxvk": false,
    "esync": false,
    "fsync": false,
    "version": "winehq-staging-7.22-x86_64",
    "vkd3d": false
  }
}
返回游戏