Installer lol-2b

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

custom-name: 英雄联盟国际服
files:
- lol_installer: N/A:请选择LOL国际服安装包
- script2: https://file.winegame.net/games/league-of-legends/syscall_check.sh
- wineinit: https://file.winegame.net/games/common/wineinit.sh
game:
  args: --locale=$INPUT_LOCALE
  exe: $GAMEDIR/launcher.bat
  prefix: $GAMEDIR
installer:
- input_menu:
    description: 选择游戏语言:
    id: LOCALE
    options:
    - cs_CZ: Čeština
    - en_AU: English AUS
    - en_GB: English U.K.
    - en_US: English U.S.
    - fr_FR: Français
    - de_DE: Deutsch
    - es_ES: Español
    - es_MX: Español Mexicano
    - it_IT: Italiano
    - ja_JP: 日本語
    - hu_HU: Magyar
    - pl_PL: Polski
    - pt_BR: Português do Brasil
    - ro_RO: Romanian
    - ru_RU: русский
    - tr_TR: Türkçe
    - zh_TW: 繁體中文
    - zh_CN: 简体中文
    preselect: zh_CN
- execute:
    command: bash "$wineinit" win64 6.22
    description: 下载字体和运行库
- task:
    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:";
      rm -f "$GAMEDIR/dosdevices/l::"; ln -sf "$GAMEDIR/drive_c" "$GAMEDIR/dosdevices/l:";
    description: 添加主目录($HOME)为M盘
- task:
    app: win10
    arch: win64
    description: 切换到Win10模式
    name: winetricks
    prefix: $GAMEDIR
- task:
    description: 禁止窗口管理器装饰窗口
    key: Decorated
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\X11 Driver
    prefix: $GAMEDIR
    type: REG_SZ
    value: N
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    args: --locale=$INPUT_LOCALE
    description: |-
      安装中……请不要登陆你的LOL账号,更不要启动游戏(安装阶段不可能顺利进入游戏)!
      请在下载完成(进度到达100%)后手动关掉启动器,否则安装无法自行完成。
      注意:安装时界面是英文的,这是正常现象,安装完成后再打开才会变成你刚刚选的语言。
      如果你登陆账号后变成其他语言,请关闭启动器然后重新打开,又会变成你刚刚选的语言。
    executable: lol_installer
    name: wineexec
- task:
    name: winekill
    prefix: $GAMEDIR
- task:
    key: GrabFullScreen
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\X11 Driver
    prefix: $GAMEDIR
    value: Y
- task:
    key: UseXVidMode
    name: set_regedit
    path: HKEY_CURRENT_USER\Software\Wine\X11 Driver
    prefix: $GAMEDIR
    value: N
- chmodx: script2
- copy:
    dst: $GAMEDIR
    src: script2
- task:
    key: background
    name: set_regedit
    path: HKEY_CURRENT_USER\Control Panel\Colors\
    prefix: $GAMEDIR
    type: REG_SZ
    value: 40 40 40
- write_file:
    content: |
      install:
          globals:
              locale: "$INPUT_LOCALE"
    file: $GAMEDIR/drive_c/users/$USER/AppData/Local/Riot Games/Riot Client/Config/RiotClientSettings.yaml
- write_file:
    content: |
      install:
          globals:
              locale: "$INPUT_LOCALE"
    file: $GAMEDIR/drive_c/Riot Games/League of Legends/Config/LeagueClientSettings.yaml
- write_file:
    content: |
      explorer "C:\Riot Games\Riot Client\RiotClientServices.exe"
      .\chlang.sh %*
    file: $GAMEDIR/launcher.bat
- write_file:
    content: |
      #!/bin/bash
      sleep 5
      while pidof -q RiotClientUx.exe RiotClientServices.exe 'C:\Riot Games\Riot Client\RiotClientServices.exe'; do
          sleep 0.1
          pidof LeagueClient.exe | while read pid; do
              strings /proc/$pid/cmdline | grep -- "$1" && {
                  strings /proc/$pid/cmdline
                  tail --pid=$pid -f /dev/null
              } || {
                  echo "'$WINE' \\" > ./LeagueClient.sh
                  strings /proc/$pid/cmdline | sed "s/--locale=[^ ]*/$1/g" | sed '/^ *$/d;s/.*/"&" \\/' >> ./LeagueClient.sh
                  echo '#end' >> ./LeagueClient.sh
                  kill -9 $pid
                  cat ./LeagueClient.sh
                  /bin/bash ./LeagueClient.sh
              }
          done
      done
      echo "chlang.sh exited"
    file: $GAMEDIR/chlang.sh
- chmodx: $GAMEDIR/chlang.sh
require-binaries: zenity, openssl, pidof, strings
system:
  disable_compositor: true
  env:
    DXVK_LOG_LEVEL: none
    DXVK_STATE_CACHE_PATH: $GAMEDIR
    STAGING_SHARED_MEMORY: 1
    WINE_LARGE_ADDRESS_AWARE: 1
    __GL_SHADER_DISK_CACHE: 1
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR
  prelaunch_command: $GAMEDIR/syscall_check.sh
  prelaunch_wait: true
wine:
  MouseWarpOverride: enable
  version: lutris-ge-lol-7.0-5-x86_64
{
  "custom-name": "\u82f1\u96c4\u8054\u76df\u56fd\u9645\u670d",
  "files": [
    {
      "lol_installer": "N/A:\u8bf7\u9009\u62e9LOL\u56fd\u9645\u670d\u5b89\u88c5\u5305"
    },
    {
      "script2": "https://file.winegame.net/games/league-of-legends/syscall_check.sh"
    },
    {
      "wineinit": "https://file.winegame.net/games/common/wineinit.sh"
    }
  ],
  "game": {
    "args": "--locale=$INPUT_LOCALE",
    "exe": "$GAMEDIR/launcher.bat",
    "prefix": "$GAMEDIR"
  },
  "installer": [
    {
      "input_menu": {
        "description": "\u9009\u62e9\u6e38\u620f\u8bed\u8a00\uff1a",
        "id": "LOCALE",
        "options": [
          {
            "cs_CZ": "\u010ce\u0161tina"
          },
          {
            "en_AU": "English AUS"
          },
          {
            "en_GB": "English U.K."
          },
          {
            "en_US": "English U.S."
          },
          {
            "fr_FR": "Fran\u00e7ais"
          },
          {
            "de_DE": "Deutsch"
          },
          {
            "es_ES": "Espa\u00f1ol"
          },
          {
            "es_MX": "Espa\u00f1ol Mexicano"
          },
          {
            "it_IT": "Italiano"
          },
          {
            "ja_JP": "\u65e5\u672c\u8a9e"
          },
          {
            "hu_HU": "Magyar"
          },
          {
            "pl_PL": "Polski"
          },
          {
            "pt_BR": "Portugu\u00eas do Brasil"
          },
          {
            "ro_RO": "Romanian"
          },
          {
            "ru_RU": "\u0440\u0443\u0441\u0441\u043a\u0438\u0439"
          },
          {
            "tr_TR": "T\u00fcrk\u00e7e"
          },
          {
            "zh_TW": "\u7e41\u9ad4\u4e2d\u6587"
          },
          {
            "zh_CN": "\u7b80\u4f53\u4e2d\u6587"
          }
        ],
        "preselect": "zh_CN"
      }
    },
    {
      "execute": {
        "command": "bash \"$wineinit\" win64 6.22",
        "description": "\u4e0b\u8f7d\u5b57\u4f53\u548c\u8fd0\u884c\u5e93"
      }
    },
    {
      "task": {
        "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:\"; rm -f \"$GAMEDIR/dosdevices/l::\"; ln -sf \"$GAMEDIR/drive_c\" \"$GAMEDIR/dosdevices/l:\";",
        "description": "\u6dfb\u52a0\u4e3b\u76ee\u5f55($HOME)\u4e3aM\u76d8"
      }
    },
    {
      "task": {
        "app": "win10",
        "arch": "win64",
        "description": "\u5207\u6362\u5230Win10\u6a21\u5f0f",
        "name": "winetricks",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "description": "\u7981\u6b62\u7a97\u53e3\u7ba1\u7406\u5668\u88c5\u9970\u7a97\u53e3",
        "key": "Decorated",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "N"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "args": "--locale=$INPUT_LOCALE",
        "description": "\u5b89\u88c5\u4e2d\u2026\u2026\u8bf7\u4e0d\u8981\u767b\u9646\u4f60\u7684LOL\u8d26\u53f7\uff0c\u66f4\u4e0d\u8981\u542f\u52a8\u6e38\u620f\uff08\u5b89\u88c5\u9636\u6bb5\u4e0d\u53ef\u80fd\u987a\u5229\u8fdb\u5165\u6e38\u620f\uff09\uff01\n\u8bf7\u5728\u4e0b\u8f7d\u5b8c\u6210\uff08\u8fdb\u5ea6\u5230\u8fbe100%\uff09\u540e\u624b\u52a8\u5173\u6389\u542f\u52a8\u5668\uff0c\u5426\u5219\u5b89\u88c5\u65e0\u6cd5\u81ea\u884c\u5b8c\u6210\u3002\n\u6ce8\u610f\uff1a\u5b89\u88c5\u65f6\u754c\u9762\u662f\u82f1\u6587\u7684\uff0c\u8fd9\u662f\u6b63\u5e38\u73b0\u8c61\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\u518d\u6253\u5f00\u624d\u4f1a\u53d8\u6210\u4f60\u521a\u521a\u9009\u7684\u8bed\u8a00\u3002\n\u5982\u679c\u4f60\u767b\u9646\u8d26\u53f7\u540e\u53d8\u6210\u5176\u4ed6\u8bed\u8a00\uff0c\u8bf7\u5173\u95ed\u542f\u52a8\u5668\u7136\u540e\u91cd\u65b0\u6253\u5f00\uff0c\u53c8\u4f1a\u53d8\u6210\u4f60\u521a\u521a\u9009\u7684\u8bed\u8a00\u3002",
        "executable": "lol_installer",
        "name": "wineexec"
      }
    },
    {
      "task": {
        "name": "winekill",
        "prefix": "$GAMEDIR"
      }
    },
    {
      "task": {
        "key": "GrabFullScreen",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver",
        "prefix": "$GAMEDIR",
        "value": "Y"
      }
    },
    {
      "task": {
        "key": "UseXVidMode",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver",
        "prefix": "$GAMEDIR",
        "value": "N"
      }
    },
    {
      "chmodx": "script2"
    },
    {
      "copy": {
        "dst": "$GAMEDIR",
        "src": "script2"
      }
    },
    {
      "task": {
        "key": "background",
        "name": "set_regedit",
        "path": "HKEY_CURRENT_USER\\Control Panel\\Colors\\",
        "prefix": "$GAMEDIR",
        "type": "REG_SZ",
        "value": "40 40 40"
      }
    },
    {
      "write_file": {
        "content": "install:\n    globals:\n        locale: \"$INPUT_LOCALE\"\n",
        "file": "$GAMEDIR/drive_c/users/$USER/AppData/Local/Riot Games/Riot Client/Config/RiotClientSettings.yaml"
      }
    },
    {
      "write_file": {
        "content": "install:\n    globals:\n        locale: \"$INPUT_LOCALE\"\n",
        "file": "$GAMEDIR/drive_c/Riot Games/League of Legends/Config/LeagueClientSettings.yaml"
      }
    },
    {
      "write_file": {
        "content": "explorer \"C:\\Riot Games\\Riot Client\\RiotClientServices.exe\"\n.\\chlang.sh %*\n",
        "file": "$GAMEDIR/launcher.bat"
      }
    },
    {
      "write_file": {
        "content": "#!/bin/bash\nsleep 5\nwhile pidof -q RiotClientUx.exe RiotClientServices.exe 'C:\\Riot Games\\Riot Client\\RiotClientServices.exe'; do\n    sleep 0.1\n    pidof LeagueClient.exe | while read pid; do\n        strings /proc/$pid/cmdline | grep -- \"$1\" && {\n            strings /proc/$pid/cmdline\n            tail --pid=$pid -f /dev/null\n        } || {\n            echo \"'$WINE' \\\\\" > ./LeagueClient.sh\n            strings /proc/$pid/cmdline | sed \"s/--locale=[^ ]*/$1/g\" | sed '/^ *$/d;s/.*/\"&\" \\\\/' >> ./LeagueClient.sh\n            echo '#end' >> ./LeagueClient.sh\n            kill -9 $pid\n            cat ./LeagueClient.sh\n            /bin/bash ./LeagueClient.sh\n        }\n    done\ndone\necho \"chlang.sh exited\"\n",
        "file": "$GAMEDIR/chlang.sh"
      }
    },
    {
      "chmodx": "$GAMEDIR/chlang.sh"
    }
  ],
  "require-binaries": "zenity, openssl, pidof, strings",
  "system": {
    "disable_compositor": true,
    "env": {
      "DXVK_LOG_LEVEL": "none",
      "DXVK_STATE_CACHE_PATH": "$GAMEDIR",
      "STAGING_SHARED_MEMORY": 1,
      "WINE_LARGE_ADDRESS_AWARE": 1,
      "__GL_SHADER_DISK_CACHE": 1,
      "__GL_SHADER_DISK_CACHE_PATH": "$GAMEDIR"
    },
    "prelaunch_command": "$GAMEDIR/syscall_check.sh",
    "prelaunch_wait": true
  },
  "wine": {
    "MouseWarpOverride": "enable",
    "version": "lutris-ge-lol-7.0-5-x86_64"
  }
}
返回游戏