[
    {
        "UpdateStageName": "SteamCMD Download",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "SteamCMD",
        "UpdateSourceData": "3246670",
        "UpdateSourceArgs": "1898300",
        "ForceDownloadPlatform": "Windows",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Initialise Wine",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"WINEPREFIX=\\\"{{$FullRootDir}}.wine\\\" WINEARCH=win64 WINEDEBUG=-all /usr/bin/wineboot --init --update\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Disable Prefix Sound",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"cd aska && [[ -f winetricks ]] && rm -f winetricks; wget -q https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/20260125/src/winetricks && chmod +x winetricks; export WINEPREFIX=\\\"{{$FullRootDir}}.wine\\\"; export WINEARCH=win64; ./winetricks sound=disabled > winescript_log.txt 2>&1\"",
        "SkipOnFailure": true
    },
    {
        "UpdateStageName": "Saves Directory Creation",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "Executable",
        "UpdateSourceData": "cmd.exe",
        "UpdateSourceArgs": "/C mkdir \"%UserProfile%\\AppData\\LocalLow\\Sand Sailor Studio\\Aska\\data\\server\" > NUL 2>&1 & rd /S /Q \"{{$FullBaseDir}}server\" > NUL 2>&1 & mklink /J \"{{$FullBaseDir}}server\" \"%UserProfile%\\AppData\\LocalLow\\Sand Sailor Studio\\Aska\\data\\server\" > NUL 2>&1",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Saves Directory Creation",
        "UpdateSourcePlatform": "Linux",
        "UpdateSource": "Executable",
        "UpdateSourceData": "/bin/bash",
        "UpdateSourceArgs": "-c \"mkdir -p \\\"{{$FullRootDir}}.wine/drive_c/users/amp/AppData/LocalLow/Sand Sailor Studio/Aska/data/server\\\" >/dev/null 2>&1; cd aska/3246670 && ln -sf \\\"../.wine/drive_c/users/amp/AppData/LocalLow/Sand Sailor Studio/Aska/data/server\\\" ./ >/dev/null 2>&1\"",
        "SkipOnFailure": false
    },
    {
        "UpdateStageName": "Create Readme File",
        "UpdateSourcePlatform": "Windows",
        "UpdateSource": "CreateFile",
        "UpdateSourceArgs": "{{$FullBaseDir}}server/README.txt",
        "UpdateSourceData": "WARNING: This directory will include the savegames of multiple ASKA servers\nrun on this system.\n\nTake care when managing files in this directory!",
        "OverwriteExistingFiles": true
    },
    {
        "UpdateStageName": "Create SteamAppID File",
        "UpdateSourcePlatform": "All",
        "UpdateSource": "CreateFile",
        "UpdateSourceData": "1898300",
        "UpdateSourceArgs": "{{$FullBaseDir}}steam_appid.txt",
        "OverwriteExistingFiles": false,
        "SkipOnFailure": false
    }
]