Installer blizzard-battlenet-1
This script is for reference only and can't be directly used to install the game in the Lutris client. To install the game, download the full script.
files: - cache-updater: https://file.winegame.net/games/overwatch/state-cache-update.sh - setup: filename: Battle.net-Setup-CN.exe url: https://www.battlenet.com.cn/download/getInstaller?os=win&installer=Battle.net-Setup-CN.exe - dxvkcache: https://file.winegame.net/games/overwatch/Overwatch.tar.xz - dx-dlls: https://file.winegame.net/games/battlenet/dx-dlls.tar.xz game: arch: win64 exe: drive_c/Program Files (x86)/Battle.net/Battle.net.exe prefix: $GAMEDIR installer: - execute: command: 'fetch() { dir="$HOME/.cache/$(dirname "$1")"; file="$(basename "$1")"; path="$HOME/.cache/$1"; url="https://file.winegame.net/cache/$1"; mkdir -p "$dir"; aria2c --allow-overwrite=true --summary-interval=1 -x 5 -s 5 -c -d "$dir" -o "$file" "$url" || wget -c -O "$path" "$url"; }; fetch wine/wine-mono-5.1.0-x86.msi; fetch wine/wine-gecko-2.47.1-x86_64.msi; fetch wine/wine-gecko-2.47.1-x86.msi; fetch winetricks/corefonts/arial32.exe; fetch winetricks/corefonts/arialb32.exe; fetch winetricks/sourcehansans/SourceHanSans.ttc; fetch winetricks/unifont/unifont-12.1.02.ttf; fetch wine/fonts/MicrosoftYaHeiMono.tar.gz; ' 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" - execute: command: cd "$GAMEDIR/drive_c" && tar -Jvxf "$dx-dlls" description: "\u89E3\u538B DX DLL" - extract: description: "\u89E3\u538BDXVK\u7740\u8272\u5668\u7F13\u5B58" dst: $GAMEDIR file: dxvkcache - write_file: content: '#!/bin/bash date="$(wget --server-response --spider https://file.winegame.net/games/overwatch/Overwatch.tar.xz 2>&1 | sed -n "s/ Last-Modified: //p")" date="$(date -d "$date" +%s)" echo "$date" > ./state-cache-merge/.state-cache-timestamp' file: $GAMEDIR/timestamp.sh - write_file: content: 'dxgi.nvapiHack = False [Overwatch.exe] dxvk.hud = compiler' file: $GAMEDIR/dxvk.conf - merge: dst: $GAMEDIR/state-cache-merge src: cache-updater - chmodx: $GAMEDIR/state-cache-merge/state-cache-update.sh - chmodx: $GAMEDIR/timestamp.sh - execute: file: $GAMEDIR/timestamp.sh - move: dst: $CACHE src: $GAMEDIR/timestamp.sh - task: app: arial cjkfonts arch: win64 description: "\u5B89\u88C5\u5B57\u4F53..." name: winetricks prefix: $GAMEDIR silent: true - task: name: winekill prefix: $GAMEDIR - write_json: data: Client: GameLaunchWindowBehavior: '0' GameSearch: BackgroundSearch: 'true' HardwareAcceleration: 'false' HideOnClose: 'false' Sound: Enabled: 'false' Streaming: StreamingEnabled: 'false' description: "\u5199\u5165 Battle.Net \u914D\u7F6E\u6587\u4EF6" file: $GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config - write_config: description: "\u4E3A\u5B88\u671B\u5148\u950B\u542F\u7528\u65E0\u8FB9\u6846\u7A97\ \u53E3\u6A21\u5F0F" file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini key: WindowMode section: Render.13 value: '"1"' - write_config: description: "\u4F7F\u7528WEBM\u683C\u5F0F\u4FDD\u5B58\u5B88\u671B\u5148\u950B\ \u4EAE\u773C\u8868\u73B0" file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini key: Type section: MovieExport.1 value: '"1"' - write_config: description: "\u7981\u7528\u5B88\u671B\u5148\u950B\u4FDD\u5B58\u4EAE\u773C\u8868\ \u73B0\u65F6\u7684\u786C\u4EF6\u52A0\u901F" file: $GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini key: UseHardware section: MovieExport.1 value: '"0"' - write_file: content: hasseennewcinematic=True description: "\u4FEE\u590D\u7089\u77F3\u4F20\u8BF4\u542F\u52A8\u95EE\u9898" file: $GAMEDIR/drive_c/users/$USER/Local Settings/Application Data/Blizzard/Hearthstone/options.txt - task: arch: win64 description: "Wine Staging: \u542F\u7528 DXVA2" key: backend name: set_regedit path: HKEY_CURRENT_USER\Software\Wine\DXVA2 prefix: $GAMEDIR value: va - task: name: winekill prefix: $GAMEDIR - task: arch: win64 description: "\u6218\u7F51\u5B89\u88C5\u7A0B\u5E8F\u5373\u5C06\u6253\u5F00\u3002\ \n------------------------------\n\u8BF7\u5728\u5B89\u88C5\u7A0B\u5E8F\u4E2D\ \u5B8C\u6210\u6218\u7F51\u5B89\u88C5\u3002\n\u6CE8\u610F\uFF0C\u4E00\u5B9A\u8981\ \u5B89\u88C5\u5230\u9ED8\u8BA4\u8DEF\u5F84\uFF0C\u4E0D\u8981\u5B89\u88C5\u5230\ \u4EFB\u4F55\u5176\u4ED6\u4F4D\u7F6E\uFF0C\u5426\u5219\u7A0B\u5E8F\u4F1A\u8BA4\ \u4E3A\u5B89\u88C5\u5931\u8D25\uFF01\n\u4E0D\u5FC5\u767B\u5F55\u5BA2\u6237\u7AEF\ \uFF0C\u5B89\u88C5\u5B8C\u6210\u540E\u5173\u95ED\u5B89\u88C5\u7A0B\u5E8F\u5373\ \u53EF\u3002" exclude_processes: Battle.net.exe Agent.exe "Battle.net Helper.exe" wineconsole explorer.exe executable: setup name: wineexec - task: name: winekill prefix: $GAMEDIR system: env: DXVK_CONFIG_FILE: $GAMEDIR/dxvk.conf DXVK_STATE_CACHE_PATH: $GAMEDIR STAGING_SHARED_MEMORY: 1 __GL_SHADER_DISK_CACHE: 1 __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR exclude_processes: Agent.exe "Battle.net Helper.exe" manual_command: $GAMEDIR/state-cache-merge/state-cache-update.sh wine: dxvk: true esync: true overrides: api-ms-win-core-privateprofile-l1-1-0: n,b d3dcompiler_47: n,b d3dcsx_47: n,b d3dx11_42: n,b d3dx9_42: n,b ddraw: n,b nvapi: disabled nvapi64: disabled winedbg.exe: disabled vkd3d: true
{ "files": [ { "cache-updater": "https://file.winegame.net/games/overwatch/state-cache-update.sh" }, { "setup": { "filename": "Battle.net-Setup-CN.exe", "url": "https://www.battlenet.com.cn/download/getInstaller?os=win&installer=Battle.net-Setup-CN.exe" } }, { "dxvkcache": "https://file.winegame.net/games/overwatch/Overwatch.tar.xz" }, { "dx-dlls": "https://file.winegame.net/games/battlenet/dx-dlls.tar.xz" } ], "game": { "arch": "win64", "exe": "drive_c/Program Files (x86)/Battle.net/Battle.net.exe", "prefix": "$GAMEDIR" }, "installer": [ { "execute": { "command": "fetch() { dir=\"$HOME/.cache/$(dirname \"$1\")\"; file=\"$(basename \"$1\")\"; path=\"$HOME/.cache/$1\"; url=\"https://file.winegame.net/cache/$1\"; mkdir -p \"$dir\"; aria2c --allow-overwrite=true --summary-interval=1 -x 5 -s 5 -c -d \"$dir\" -o \"$file\" \"$url\" || wget -c -O \"$path\" \"$url\"; }; fetch wine/wine-mono-5.1.0-x86.msi;\nfetch wine/wine-gecko-2.47.1-x86_64.msi;\nfetch wine/wine-gecko-2.47.1-x86.msi;\nfetch winetricks/corefonts/arial32.exe;\nfetch winetricks/corefonts/arialb32.exe;\nfetch winetricks/sourcehansans/SourceHanSans.ttc;\nfetch winetricks/unifont/unifont-12.1.02.ttf;\nfetch wine/fonts/MicrosoftYaHeiMono.tar.gz;\n", "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" } }, { "execute": { "command": "cd \"$GAMEDIR/drive_c\" && tar -Jvxf \"$dx-dlls\"", "description": "\u89e3\u538b DX DLL" } }, { "extract": { "description": "\u89e3\u538bDXVK\u7740\u8272\u5668\u7f13\u5b58", "dst": "$GAMEDIR", "file": "dxvkcache" } }, { "write_file": { "content": "#!/bin/bash\ndate=\"$(wget --server-response --spider https://file.winegame.net/games/overwatch/Overwatch.tar.xz 2>&1 | sed -n \"s/ Last-Modified: //p\")\"\ndate=\"$(date -d \"$date\" +%s)\"\necho \"$date\" > ./state-cache-merge/.state-cache-timestamp", "file": "$GAMEDIR/timestamp.sh" } }, { "write_file": { "content": "dxgi.nvapiHack = False\n[Overwatch.exe]\ndxvk.hud = compiler", "file": "$GAMEDIR/dxvk.conf" } }, { "merge": { "dst": "$GAMEDIR/state-cache-merge", "src": "cache-updater" } }, { "chmodx": "$GAMEDIR/state-cache-merge/state-cache-update.sh" }, { "chmodx": "$GAMEDIR/timestamp.sh" }, { "execute": { "file": "$GAMEDIR/timestamp.sh" } }, { "move": { "dst": "$CACHE", "src": "$GAMEDIR/timestamp.sh" } }, { "task": { "app": "arial cjkfonts", "arch": "win64", "description": "\u5b89\u88c5\u5b57\u4f53...", "name": "winetricks", "prefix": "$GAMEDIR", "silent": true } }, { "task": { "name": "winekill", "prefix": "$GAMEDIR" } }, { "write_json": { "data": { "Client": { "GameLaunchWindowBehavior": "0", "GameSearch": { "BackgroundSearch": "true" }, "HardwareAcceleration": "false", "HideOnClose": "false", "Sound": { "Enabled": "false" }, "Streaming": { "StreamingEnabled": "false" } } }, "description": "\u5199\u5165 Battle.Net \u914d\u7f6e\u6587\u4ef6", "file": "$GAMEDIR/drive_c/users/$USER/Application Data/Battle.net/Battle.net.config" } }, { "write_config": { "description": "\u4e3a\u5b88\u671b\u5148\u950b\u542f\u7528\u65e0\u8fb9\u6846\u7a97\u53e3\u6a21\u5f0f", "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini", "key": "WindowMode", "section": "Render.13", "value": "\"1\"" } }, { "write_config": { "description": "\u4f7f\u7528WEBM\u683c\u5f0f\u4fdd\u5b58\u5b88\u671b\u5148\u950b\u4eae\u773c\u8868\u73b0", "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini", "key": "Type", "section": "MovieExport.1", "value": "\"1\"" } }, { "write_config": { "description": "\u7981\u7528\u5b88\u671b\u5148\u950b\u4fdd\u5b58\u4eae\u773c\u8868\u73b0\u65f6\u7684\u786c\u4ef6\u52a0\u901f", "file": "$GAMEDIR/drive_c/users/$USER/My Documents/Overwatch/Settings/Settings_v0.ini", "key": "UseHardware", "section": "MovieExport.1", "value": "\"0\"" } }, { "write_file": { "content": "hasseennewcinematic=True", "description": "\u4fee\u590d\u7089\u77f3\u4f20\u8bf4\u542f\u52a8\u95ee\u9898", "file": "$GAMEDIR/drive_c/users/$USER/Local Settings/Application Data/Blizzard/Hearthstone/options.txt" } }, { "task": { "arch": "win64", "description": "Wine Staging: \u542f\u7528 DXVA2", "key": "backend", "name": "set_regedit", "path": "HKEY_CURRENT_USER\\Software\\Wine\\DXVA2", "prefix": "$GAMEDIR", "value": "va" } }, { "task": { "name": "winekill", "prefix": "$GAMEDIR" } }, { "task": { "arch": "win64", "description": "\u6218\u7f51\u5b89\u88c5\u7a0b\u5e8f\u5373\u5c06\u6253\u5f00\u3002\n------------------------------\n\u8bf7\u5728\u5b89\u88c5\u7a0b\u5e8f\u4e2d\u5b8c\u6210\u6218\u7f51\u5b89\u88c5\u3002\n\u6ce8\u610f\uff0c\u4e00\u5b9a\u8981\u5b89\u88c5\u5230\u9ed8\u8ba4\u8def\u5f84\uff0c\u4e0d\u8981\u5b89\u88c5\u5230\u4efb\u4f55\u5176\u4ed6\u4f4d\u7f6e\uff0c\u5426\u5219\u7a0b\u5e8f\u4f1a\u8ba4\u4e3a\u5b89\u88c5\u5931\u8d25\uff01\n\u4e0d\u5fc5\u767b\u5f55\u5ba2\u6237\u7aef\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\u5173\u95ed\u5b89\u88c5\u7a0b\u5e8f\u5373\u53ef\u3002", "exclude_processes": "Battle.net.exe Agent.exe \"Battle.net Helper.exe\" wineconsole explorer.exe", "executable": "setup", "name": "wineexec" } }, { "task": { "name": "winekill", "prefix": "$GAMEDIR" } } ], "system": { "env": { "DXVK_CONFIG_FILE": "$GAMEDIR/dxvk.conf", "DXVK_STATE_CACHE_PATH": "$GAMEDIR", "STAGING_SHARED_MEMORY": 1, "__GL_SHADER_DISK_CACHE": 1, "__GL_SHADER_DISK_CACHE_PATH": "$GAMEDIR" }, "exclude_processes": "Agent.exe \"Battle.net Helper.exe\"", "manual_command": "$GAMEDIR/state-cache-merge/state-cache-update.sh" }, "wine": { "dxvk": true, "esync": true, "overrides": { "api-ms-win-core-privateprofile-l1-1-0": "n,b", "d3dcompiler_47": "n,b", "d3dcsx_47": "n,b", "d3dx11_42": "n,b", "d3dx9_42": "n,b", "ddraw": "n,b", "nvapi": "disabled", "nvapi64": "disabled", "winedbg.exe": "disabled" }, "vkd3d": true } }