{
    "version": "2.1.2",
    "description": "An advanced freeware audio player for the Windows platform.",
    "homepage": "https://www.foobar2000.org/",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.foobar2000.org/license"
    },
    "suggest": {
        "Encoders": "extras/foobar2000-encoders"
    },
    "architecture": {
        "64bit": {
            "url": "https://www.foobar2000.org/files/foobar2000-x64_v2.1.2.exe#/dl.7z",
            "hash": "96ad482ff29a8a9999de69425f33303c7058c687ce1a6af08e727188a05be358"
        },
        "32bit": {
            "url": "https://www.foobar2000.org/files/foobar2000_v2.1.2.exe#/dl.7z",
            "hash": "2d745bde8e594d5c3e7875893265ad42b80c13e5f1d1b6012c8a5977642f0f48"
        },
        "arm64": {
            "url": "https://www.foobar2000.org/files/foobar2000-arm64ec_v2.1.2.exe#/dl.7z",
            "hash": "9ac8b46a2d59ff31d84c18cbee68cab561562b4164d8e204a70ba78274576b82"
        }
    },
    "installer": {
        "script": [
            "Remove-Item \"$dir\\`$*\", \"$dir\\uninstall.exe\" -Force -Recurse",
            "New-Item \"$dir\\portable_mode_enabled\" -Force | Out-Null",
            "$EncodersDir = $(appdir foobar2000-encoders $global)",
            "if (Test-Path \"$EncodersDir\") {",
            "    New-Item \"$dir\\encoders\" -ItemType Junction -Target \"$EncodersDir\\current\" | Out-Null",
            "}"
        ]
    },
    "post_install": [
        "if (!(Test-Path \"$persist_dir\\profile\\*\")) {",
        "    Get-ChildItem -Path \"$persist_dir\" -Exclude \"profile\" | Move-Item -Destination \"$persist_dir\\profile\" -Force",
        "}",
        "if (!(Test-Path \"$persist_dir\\profile\\*\") -and (Test-Path \"$env:AppData\\foobar2000\")) {",
        "    info '[Portable Mode]: Copying user data...'",
        "    Copy-Item \"$env:AppData\\foobar2000\\*\" -Destination \"$persist_dir\\profile\" -Force -Recurse",
        "}",
        "if (!(Test-Path \"$persist_dir\\profile\\playlists-v1.4\")) {",
        "    Get-ChildItem -Path \"$persist_dir\\profile\" -Filter \"playlists\" -Directory | Rename-Item -NewName \"playlists-v1.4\" -Force",
        "}",
        "Get-ChildItem -Path \"$persist_dir\\profile\" -Filter \"playlists\" | Remove-Item -Force -Recurse"
    ],
    "bin": "foobar2000.exe",
    "shortcuts": [
        [
            "foobar2000.exe",
            "Foobar2000"
        ]
    ],
    "persist": "profile",
    "checkver": {
        "url": "https://www.foobar2000.org/download",
        "regex": "foobar2000_v([\\d.]+)\\."
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://www.foobar2000.org/files/foobar2000-x64_v$version.exe#/dl.7z"
            },
            "32bit": {
                "url": "https://www.foobar2000.org/files/foobar2000_v$version.exe#/dl.7z"
            },
            "arm64": {
                "url": "https://www.foobar2000.org/files/foobar2000-arm64ec_v$version.exe#/dl.7z"
            }
        }
    }
}
