{
    "version": "2026.1-261.23567.135",
    "description": "Cross-Platform IDE for C and C++ by JetBrains. (Latest)",
    "homepage": "https://www.jetbrains.com/clion/",
    "license": {
        "identifier": "Proprietary",
        "url": "https://www.jetbrains.com/legal/docs/toolbox/license/"
    },
    "architecture": {
        "64bit": {
            "url": "https://download.jetbrains.com/cpp/CLion-2026.1.1.exe#/dl.7z",
            "hash": "44f783af99aca323860c0a2ac127c5f36deb244c87d5fb5307687e3f0f866ef3",
            "bin": [
                [
                    "IDE\\bin\\clion64.exe",
                    "clion"
                ]
            ],
            "shortcuts": [
                [
                    "IDE\\bin\\clion64.exe",
                    "JetBrains\\CLion (Latest)"
                ]
            ]
        },
        "arm64": {
            "url": "https://download.jetbrains.com/cpp/CLion-2026.1.1-aarch64.exe#/dl.7z",
            "hash": "8da4c0a1bfb6f30ba39d68188d23ec3a84f7d9b2406555aadf03ecda97b7a950",
            "bin": [
                [
                    "IDE\\bin\\clion64.exe",
                    "clion"
                ]
            ],
            "shortcuts": [
                [
                    "IDE\\bin\\clion64.exe",
                    "JetBrains\\CLion (Latest)"
                ]
            ]
        }
    },
    "extract_to": "IDE",
    "installer": {
        "script": [
            "& \"$bucketsdir\\versions\\scripts\\jetbrains\\portable.ps1\" \"$dir\" \"$persist_dir\"",
            "Remove-Item \"$dir\\IDE\\`$*\" -Force -Recurse"
        ]
    },
    "persist": [
        "IDE\\bin\\idea.properties",
        "IDE\\bin\\clion64.exe.vmoptions",
        "profile"
    ],
    "checkver": {
        "script": [
            "$productCode = 'CL'",
            "$releaseURL = 'https://data.services.jetbrains.com/products/releases?code={0}&latest=true&platform=zip&type={1}'",
            "$latestRelease = @('eap', 'rc', 'release') | ForEach-Object {",
            "    $releaseType = $_",
            "    $url = $releaseURL -f $productCode, $releaseType",
            "    $response = Invoke-RestMethod -Uri $url -UseBasicParsing",
            "    [PSCustomObject]@{",
            "        version = ($response.$productCode)[0].majorVersion",
            "        build = ($response.$productCode)[0].build",
            "        urlx64 = ($response.$productCode)[0].downloads.windows.link",
            "        urlArm64 = ($response.$productCode)[0].downloads.windowsARM64.link",
            "    }",
            "} | Sort-Object {[version]$_.build} -Descending | Select-Object -First 1",
            "Write-Output \"$($latestRelease.version)-$($latestRelease.build),$($latestRelease.urlx64),$($latestRelease.urlArm64)\""
        ],
        "regex": "(?<ver>[\\d.]+)-(?<build>[\\d.]+),https://download\\.jetbrains\\.com/(?<urlx64>[^,]+),https://download\\.jetbrains\\.com/(?<urlarm64>.+)",
        "replace": "${ver}-${build}"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://download.jetbrains.com/$matchUrlx64#/dl.7z"
            },
            "arm64": {
                "url": "https://download.jetbrains.com/$matchUrlarm64#/dl.7z"
            }
        },
        "hash": {
            "url": "$url.sha256"
        }
    }
}
