Installer world-of-tanks-1

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

files:
- setup:
    filename: 360_Wargaming_Game_Center_Install_WoT_CN.exe
    url: https://redirect.wggames.cn/WGC/360_Wargaming_Game_Center_Install_WoT_CN.exe
- wineinit: https://file.winegame.net/games/common/wineinit.sh
game:
  exe: drive_c/ProgramData/360 Wargaming/GameCenter/wgc.exe
  prefix: $GAMEDIR
installer:
- execute:
    command: bash "$wineinit" win64
    description: 下载字体和运行库
- task:
    arch: win64
    description: 创建64位Wine前缀
    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
    silent: true
- 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: setup
    include_processes: explorer.exe
    name: wineexec
    prefix: $GAMEDIR
- task:
    name: winekill
    prefix: $GAMEDIR
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:
    ucrtbase: builtin,native
  vkd3d: true
{
  "files": [
    {
      "setup": {
        "filename": "360_Wargaming_Game_Center_Install_WoT_CN.exe",
        "url": "https://redirect.wggames.cn/WGC/360_Wargaming_Game_Center_Install_WoT_CN.exe"
      }
    },
    {
      "wineinit": "https://file.winegame.net/games/common/wineinit.sh"
    }
  ],
  "game": {
    "exe": "drive_c/ProgramData/360 Wargaming/GameCenter/wgc.exe",
    "prefix": "$GAMEDIR"
  },
  "installer": [
    {
      "execute": {
        "command": "bash \"$wineinit\" win64",
        "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\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",
        "silent": true
      }
    },
    {
      "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\u2026\u2026\n\u6ce8\u610f\uff1a\u4e0d\u8981\u5728\u5b89\u88c5\u9636\u6bb5\u767b\u5f55\u8d26\u53f7\uff0c\u6b64\u65f6\u6d4f\u89c8\u5668\u6253\u4e0d\u5f00\u3002\n\u8bf7\u76f4\u63a5\u5173\u95ed\u767b\u5f55\u5668\uff0c\u518d\u53f3\u51fb\u53f3\u4e0b\u89d2\u767b\u5f55\u5668\u56fe\u6807\u9009\u62e9\u9000\u51fa\u3002\n\u7b49\u6e38\u620f\u52a9\u624b\u663e\u793a\u5b89\u88c5\u5b8c\u6210\uff0c\u518d\u70b9\u542f\u52a8\uff0c\u518d\u767b\u5f55\u8d26\u53f7\uff0c\u5c31\u80fd\u6253\u5f00\u6d4f\u89c8\u5668\u4e86\u3002\n\u5176\u5b9e\u5728\u5b89\u88c5\u9636\u6bb5\u4e0d\u4e0b\u8f7d\u6e38\u620f\u76f4\u63a5\u5173\u95ed\u4e5f\u662f\u53ef\u4ee5\u7684\uff0c\u7b49\u663e\u793a\u5b89\u88c5\u5b8c\u6210\u518d\u4e0b\u8f7d\u3002\n",
        "executable": "setup",
        "include_processes": "explorer.exe",
        "name": "wineexec",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    }
  ],
  "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": {
      "ucrtbase": "builtin,native"
    },
    "vkd3d": true
  }
}
返回游戏