{
    "version": "1.1.1",
    "description": "A free and open-source multi-platform parametric 3D modeler.",
    "homepage": "https://www.freecad.org",
    "license": {
        "identifier": "LGPL-2.1-or-later",
        "url": "https://github.com/FreeCAD/FreeCAD/blob/HEAD/LICENSE"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/FreeCAD/FreeCAD/releases/download/1.1.1/FreeCAD_1.1.1-Windows-x86_64-py311.7z",
            "hash": "aef51acb6725d5667bbae73494d04794a1e1725e17c6589650b044c15808144f"
        }
    },
    "pre_install": "pushd $dir ; mv */* . ; rm FreeCAD_* ; popd",
    "post_install": [
        "# FreeCAD may behave unexpectedly when launched from a symlinked directory. See: https://github.com/ScoopInstaller/Extras/issues/17759",
        "startmenu_shortcut \"$original_dir\\bin\\FreeCAD.exe\" 'FreeCAD' $null $null $global",
        "shim \"$original_dir\\bin\\FreeCADCmd.exe\" $global 'FreeCADCmd'"
    ],
    "post_uninstall": [
        "# Remove shortcut and shim",
        "rm_shim 'FreeCADCmd' \"$(shimdir $global)\"",
        "Write-Host \"Removing shortcut $(friendly_path \"$(shortcut_folder $global)\\FreeCAD.lnk\")\"",
        "Remove-Item \"$(shortcut_folder $global)\\FreeCAD.lnk\" -Force -ErrorAction SilentlyContinue"
    ],
    "checkver": {
        "github": "https://api.github.com/repos/FreeCAD/FreeCAD/releases/latest",
        "jsonpath": "$.assets[?(@.name =~ /Win.+\\.7z$/i)].browser_download_url",
        "regex": "(?i)download/(?<tag>[^/]+)/(?<name>FreeCAD[^\\d]([0-9a-f.-]+)(?:-conda)?-Win.+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/FreeCAD/FreeCAD/releases/download/$matchTag/$matchName"
            }
        },
        "hash": {
            "url": "$url-SHA256.txt",
            "regex": "(?s)$basename.*?$sha256"
        }
    }
}
