[
    {
        "UpdateStageName": "Titanfall 2 Download",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "SteamCMD",
        "UpdateSourceData": "1237970",
        "UpdateSourceArgs": "1237970",
        "ForceDownloadPlatform": "Windows",
        "UpdateSourceConditionSetting": "DisableClientDownload",
        "UpdateSourceConditionValue": "false",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Remove Excess Files",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"cd titanfall2/1237970 && rm -rf vpk/client_sp_* vpk/englishclient_sp_* r2/cfg/*.ekv bin/x64_retail/client.dll bin/x64_retail/auditionwin64.dll bin/dxsupport.cfg Titanfall2.exe r2/maps r2/media r2/screenshots platform Core Support __Installer >/dev/null 2>&1 && find r2/paks/Win64 -maxdepth 1 -type f ! \\( -name \\\"patch_master.rpak\\\" -o -name \\\"common.rpak\\\" -o -name \\\"common_mp.rpak\\\" -o -name \\\"common(*).rpak\\\" -o -name \\\"common_mp(*).rpak\\\" -o -name \\\"ui*\\\" \\) -delete >/dev/null 2>&1 && find r2/sound -maxdepth 1 -type f ! -name \\\"titanfall_2.mprj\\\" -delete >/dev/null 2>&1\"",
        "UpdateSourceConditionSetting": "RemoveExcessFiles",
        "UpdateSourceConditionValue": "true",
        "SkipOnFailure": true
    },
    {
        "UpdateStageName": "Remove Excess Files",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "Executable",
        "UpdateSourceData": "powershell.exe",
        "UpdateSourceArgs": "-NoProfile -Command \"Set-Location -Path 'titanfall2\\1237970'; $ErrorActionPreference='SilentlyContinue'; Remove-Item -Recurse -Force vpk\\client_sp_*,vpk\\englishclient_sp_*,r2\\cfg\\*.ekv,bin\\x64_retail\\client.dll,bin\\x64_retail\\auditionwin64.dll,bin\\dxsupport.cfg,Titanfall2.exe,r2\\maps,r2\\media,r2\\screenshots,platform,Core,Support,__Installer; Get-ChildItem r2\\paks\\Win64 -File | Where-Object { $_.Name -notmatch '^patch_master\\.rpak$' -and $_.Name -notmatch '^common(_mp)?(\\(.*\\))?\\.rpak$' -and $_.Name -notlike 'ui*' } | Remove-Item -Force; Get-ChildItem r2\\sound -File | Where-Object { $_.Name -ne 'titanfall_2.mprj' } | Remove-Item -Force\"",
        "UpdateSourceConditionSetting": "RemoveExcessFiles",
        "UpdateSourceConditionValue": "true",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Northstar Download",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "GithubRelease",
        "UpdateSourceArgs": "R2Northstar/Northstar",
        "UpdateSourceTarget": "{{$FullBaseDir}}",
        "UnzipUpdateSource": true,
        "OverwriteExistingFiles": true,
        "DeleteAfterExtract": true,
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Northstar Stubs Download",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "GithubRelease",
        "UpdateSourceArgs": "R2Northstar/NorthstarStubs",
        "UpdateSourceData": "NorthstarStubs.zip",
        "UpdateSourceTarget": "{{$FullBaseDir}}bin/x64_retail",
        "UnzipUpdateSource": true,
        "OverwriteExistingFiles": true,
        "DeleteAfterExtract": true,
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Northstar Stubs Download",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "GithubRelease",
        "UpdateSourceArgs": "R2Northstar/NorthstarStubs",
        "UpdateSourceData": "NorthstarStubs.zip",
        "UpdateSourceTarget": "{{$FullBaseDir}}",
        "UnzipUpdateSource": true,
        "OverwriteExistingFiles": true,
        "DeleteAfterExtract": true,
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Build NSWrap Wrapper",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"mkdir -p titanfall2/1237970/nswrap && cd titanfall2/1237970/nswrap && [[ -f nswrap.c ]] && rm -rf nswrap.c; wget -q https://raw.githubusercontent.com/pg9182/nsdockerwine2/c412fb15ef20ebb6ba674796ac527a558942772a/nswrap/nswrap.c && gcc -Wall -Wextra nswrap.c -o nswrap >/dev/null\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Initialise Wine",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"unset DISPLAY WAYLAND_DISPLAY; export WINEARCH=win64 WINEDEBUG=-all WINEDLLOVERRIDES=\\\"mscoree,mshtml,winemenubuilder.exe=\\\"; export WINEPREFIX=\\\"{{$FullRootDir}}.wine\\\"; rm -rf $WINEPREFIX; /usr/bin/wineboot --init; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\\" /v \\\"Version\\\" /t REG_SZ /d \\\"win10\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\Drivers\\\" /v \\\"Audio\\\" /t REG_SZ /d \\\"\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\WineDbg\\\" /v \\\"ShowCrashDialog\\\" /t REG_DWORD /d 0 /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\Drivers\\\" /v \\\"Graphics\\\" /t REG_SZ /d \\\"null\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\DllOverrides\\\" /v \\\"mscoree\\\" /t REG_SZ /d \\\"\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\DllOverrides\\\" /v \\\"mshtml\\\" /t REG_SZ /d \\\"\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\DllOverrides\\\" /v \\\"winemenubuilder\\\" /t REG_SZ /d \\\"\\\" /f >/dev/null; /usr/bin/wine reg add \\\"HKCU\\Software\\Wine\\DllOverrides\\\" /v \\\"d3d11\\\" /t REG_SZ /d \\\"native\\\" /f >/dev/null; /usr/bin/wineboot --shutdown --force; /usr/bin/wineboot --kill --force\"",
        "SkipOnFailure": false
    }
]