Installer world-of-tanks-2

该脚本仅供参考,不能直接用来在Wine游戏助手中安装游戏。 要安装游戏,请下载完整脚本

files:
- wineinit: https://file.winegame.net/games/common/wineinit.sh
game:
  arch: win64
  exe: drive_c/ProgramData/Wargaming.net/GameCenter/wgc.exe
  prefix: $GAMEDIR
installer:
- input_menu:
    description: 选择地区
    id: LOCAL
    options:
    - EU: 欧洲
    - NA: 北美
    - ASIA: 亚洲
    - RU: 俄罗斯
    preselect: ASIA
- execute:
    command: cd "$CACHE"; aria2c --allow-overwrite=true --summary-interval=1 -x 5
      -s 5 -c -o "WorldOfTanks.exe" "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_$INPUT_LOCAL.exe"
      || wget -c -O "WorldOfTanks.exe" "https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_$INPUT_LOCAL.exe";
    description: 下载游戏安装程序
- execute:
    command: bash "$wineinit" win64
    description: 下载字体和运行库
- task:
    arch: win64
    description: 创建64位Wine前缀
    install_gecko: false
    install_mono: false
    name: create_prefix
    prefix: $GAMEDIR
- extract:
    description: 解压CMD字体
    dst: $GAMEDIR/drive_c/windows/Fonts
    file: $HOME/.cache/wine/fonts/MicrosoftYaHeiMono.tar.gz
- task:
    description: 安装CMD字体
    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: arial cjkfonts
    arch: win64
    description: 安装中文字体
    name: winetricks
    prefix: $GAMEDIR
    silent: true
- task:
    app: win7
    arch: win64
    description: 切换到Win7模式
    name: winetricks
    prefix: $GAMEDIR
- task:
    arch: win64
    description: 修改注册表
    key: background
    name: set_regedit
    path: HKEY_CURRENT_USER\Control Panel\Colors\
    prefix: $GAMEDIR
    type: REG_SZ
    value: 0 0 0
- task:
    args: /SP- /SILENT
    description: 启动游戏安装程序
    executable: $CACHE/WorldOfTanks.exe
    include_processes: explorer.exe
    name: wineexec
- task:
    arch: win64
    name: winekill
    prefix: $GAMEDIR
- input_menu:
    description: 选择语言
    id: LANG
    options:
    - zh_sg: 简体中文
    - zh_tw: 繁體中文
    - en: 英语
    - fr: 法语
    - de: 德语
    - sp: 西班牙语
    - it: 意大利语
    - ru: 俄语
    preselect: zh_sg
- write_file:
    content: '<?xml version="1.0" encoding="utf-8"?>

      <protocol version="3.19" name="preferences">

      <application>

      <localization_manager>

      <current_localization>$INPUT_LANG</current_localization>

      </localization_manager>

      </application>

      </protocol>'
    file: $GAMEDIR/drive_c/ProgramData/Wargaming.net/GameCenter/preferences.xml
system:
  env:
    DXVK_HUD: compiler
    DXVK_STATE_CACHE_PATH: $GAMEDIR
    MESA_GL_VERSION_OVERRIDE: 4.4COMPAT
    STAGING_SHARED_MEMORY: 1
    __GL_SHADER_DISK_CACHE: 1
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR
wine:
  dxvk: true
  esync: true
  overrides:
    nvapi,nvapi64: disabled
    ucrtbase: b,n
  vkd3d: true
{
  "files": [
    {
      "wineinit": "https://file.winegame.net/games/common/wineinit.sh"
    }
  ],
  "game": {
    "arch": "win64",
    "exe": "drive_c/ProgramData/Wargaming.net/GameCenter/wgc.exe",
    "prefix": "$GAMEDIR"
  },
  "installer": [
    {
      "input_menu": {
        "description": "\u9009\u62e9\u5730\u533a",
        "id": "LOCAL",
        "options": [
          {
            "EU": "\u6b27\u6d32"
          },
          {
            "NA": "\u5317\u7f8e"
          },
          {
            "ASIA": "\u4e9a\u6d32"
          },
          {
            "RU": "\u4fc4\u7f57\u65af"
          }
        ],
        "preselect": "ASIA"
      }
    },
    {
      "execute": {
        "command": "cd \"$CACHE\"; aria2c --allow-overwrite=true --summary-interval=1 -x 5 -s 5 -c -o \"WorldOfTanks.exe\" \"https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_$INPUT_LOCAL.exe\" || wget -c -O \"WorldOfTanks.exe\" \"https://redirect.wargaming.net/WGC/Wargaming_Game_Center_Install_WoT_$INPUT_LOCAL.exe\";",
        "description": "\u4e0b\u8f7d\u6e38\u620f\u5b89\u88c5\u7a0b\u5e8f"
      }
    },
    {
      "execute": {
        "command": "bash \"$wineinit\" win64",
        "description": "\u4e0b\u8f7d\u5b57\u4f53\u548c\u8fd0\u884c\u5e93"
      }
    },
    {
      "task": {
        "arch": "win64",
        "description": "\u521b\u5efa64\u4f4dWine\u524d\u7f00",
        "install_gecko": false,
        "install_mono": false,
        "name": "create_prefix",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "extract": {
        "description": "\u89e3\u538bCMD\u5b57\u4f53",
        "dst": "$GAMEDIR/drive_c/windows/Fonts",
        "file": "$HOME/.cache/wine/fonts/MicrosoftYaHeiMono.tar.gz"
      }
    },
    {
      "task": {
        "description": "\u5b89\u88c5CMD\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": "arial cjkfonts",
        "arch": "win64",
        "description": "\u5b89\u88c5\u4e2d\u6587\u5b57\u4f53",
        "name": "winetricks",
        "prefix": "$GAMEDIR",
        "silent": true
      }
    },
    {
      "task": {
        "app": "win7",
        "arch": "win64",
        "description": "\u5207\u6362\u5230Win7\u6a21\u5f0f",
        "name": "winetricks",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "arch": "win64",
        "description": "\u4fee\u6539\u6ce8\u518c\u8868",
        "key": "background",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Control Panel\\Colors\\",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "0 0 0"
      }
    },
    {
      "task": {
        "args": "/SP- /SILENT",
        "description": "\u542f\u52a8\u6e38\u620f\u5b89\u88c5\u7a0b\u5e8f",
        "executable": "$CACHE/WorldOfTanks.exe",
        "include_processes": "explorer.exe",
        "name": "wineexec"
      }
    },
    {
      "task": {
        "arch": "win64",
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "input_menu": {
        "description": "\u9009\u62e9\u8bed\u8a00",
        "id": "LANG",
        "options": [
          {
            "zh_sg": "\u7b80\u4f53\u4e2d\u6587"
          },
          {
            "zh_tw": "\u7e41\u9ad4\u4e2d\u6587"
          },
          {
            "en": "\u82f1\u8bed"
          },
          {
            "fr": "\u6cd5\u8bed"
          },
          {
            "de": "\u5fb7\u8bed"
          },
          {
            "sp": "\u897f\u73ed\u7259\u8bed"
          },
          {
            "it": "\u610f\u5927\u5229\u8bed"
          },
          {
            "ru": "\u4fc4\u8bed"
          }
        ],
        "preselect": "zh_sg"
      }
    },
    {
      "write_file": {
        "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<protocol version=\"3.19\" name=\"preferences\">\n<application>\n<localization_manager>\n<current_localization>$INPUT_LANG</current_localization>\n</localization_manager>\n</application>\n</protocol>",
        "file": "$GAMEDIR/drive_c/ProgramData/Wargaming.net/GameCenter/preferences.xml"
      }
    }
  ],
  "system": {
    "env": {
      "DXVK_HUD": "compiler",
      "DXVK_STATE_CACHE_PATH": "$GAMEDIR",
      "MESA_GL_VERSION_OVERRIDE": "4.4COMPAT",
      "STAGING_SHARED_MEMORY": 1,
      "__GL_SHADER_DISK_CACHE": 1,
      "__GL_SHADER_DISK_CACHE_PATH": "$GAMEDIR"
    }
  },
  "wine": {
    "dxvk": true,
    "esync": true,
    "overrides": {
      "nvapi,nvapi64": "disabled",
      "ucrtbase": "b,n"
    },
    "vkd3d": true
  }
}
返回游戏