{
    "version": "3.6.0.4074",
    "description": "A flexible virtual private network (VPN) solution to secure data communications.",
    "homepage": "https://openvpn.net",
    "license": "GPL-2.0-only",
    "architecture": {
        "64bit": {
            "url": "https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.6.0.4074_signed.msi",
            "hash": "4969b48b8c04477980fc59180802c17f04cf21e1e52083456555417fc83076df"
        },
        "32bit": {
            "url": "https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.6.0.4074_signed_x86.msi",
            "hash": "a615148b348d4ff881e636ea320c5d5a44f411f3ee0ac898c4f0f74504408665"
        }
    },
    "extract_dir": "OpenVPN Connect",
    "pre_install": [
        "# OpenVPN Connect cannot work under junctions ('current'), therefore we need to manually create the shortcut",
        "$scoop_startmenu_folder = Join-Path $([Environment]::GetFolderPath($(if ($global) {'commonstartmenu'} else {'startmenu'}))) 'Programs\\Scoop Apps'",
        "$exe_dir = versiondir 'openvpn-connect' $version",
        "$wsShell = New-Object -ComObject WScript.Shell",
        "$wsShell = $wsShell.CreateShortcut(\"$scoop_startmenu_folder\\OpenVPN Connect.lnk\")",
        "$wsShell.TargetPath = \"$exe_dir\\OpenVPNConnect.exe\"",
        "$wsShell.WorkingDirectory = \"$exe_dir\"",
        "$wsShell.Save()"
    ],
    "uninstaller": {
        "script": [
            "$scoop_startmenu_folder = Join-Path $([Environment]::GetFolderPath($(if ($global) {'commonstartmenu'} else {'startmenu'}))) 'Programs\\Scoop Apps'",
            "Remove-Item \"$scoop_startmenu_folder\\OpenVPN Connect.lnk\" -Force"
        ]
    },
    "bin": "ovpnconnector.exe",
    "checkver": {
        "url": "https://openvpn.net/connect-docs/windows-release-notes.html",
        "regex": "openvpn-connect-([\\d.]+)_signed.msi"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://swupdate.openvpn.net/downloads/connect/openvpn-connect-$version_signed.msi"
            },
            "32bit": {
                "url": "https://swupdate.openvpn.net/downloads/connect/openvpn-connect-$version_signed_x86.msi"
            }
        },
        "hash": {
            "url": "https://openvpn.net/connect-docs/windows-release-notes.html",
            "regex": "$basename[^(</span>)]$sha256</span>"
        }
    }
}
