lightsystemdarkgreen
@ 261119.65 · fetching
current
{
    "version": "10.08.0",
    "description": "An interpreter for the PostScript language and for PDF",
    "homepage": "https://www.ghostscript.com",
    "license": {
        "identifier": "AGPL-3.0-or-later|Freeware",
        "url": "https://www.ghostscript.com/license.html"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10080/gs10080w64.exe#/dl.7z",
            "hash": "sha512:cb3ecc798508851ba28b05e3fb914ddefe78168190726376d8581546ce61d5b216ffa3359e6f829072786bc12350501c7b6f99110d578696b87213d157774269",
            "bin": [
                "bin\\gswin64.exe",
                "bin\\gswin64c.exe",
                [
                    "bin\\gswin64c.exe",
                    "gs"
                ]
            ]
        },
        "32bit": {
            "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs10080/gs10080w32.exe#/dl.7z",
            "hash": "sha512:49cbc498a40f5b354b443d563d176bbf33fb094a12680bcaca36cceefa82e049c79180a3f3092495fa43a07724639c9fd5809bcfd9fd14963f6bc7d8f4391ab6",
            "bin": [
                "bin\\gswin32.exe",
                "bin\\gswin32c.exe",
                [
                    "bin\\gswin32c.exe",
                    "gs"
                ]
            ]
        }
    },
    "post_install": [
        "$reg_app = \"HKCU:\\SOFTWARE\\Artifex\\GPL Ghostscript\\$version\"",
        "$reg_lib = \"HKCU:\\SOFTWARE\\GPL Ghostscript\\$version\"",
        "if ($global) { $reg_app = $reg_app.Replace('HKCU:','HKLM:'); $reg_lib = $reg_lib.Replace('HKCU:','HKLM:') }",
        "$reg_gs_dll = \"$dir\\bin\\gsdll$($architecture.Replace('bit', '')).dll\".Replace('\\','\\\\')",
        "$reg_gs_lib = \"$dir\\bin;$dir\\lib;$dir\\fonts\".Replace('\\','\\\\')",
        "New-Item -Path $reg_app -Value $dir.Replace('\\','\\\\') -Force | Out-Null",
        "New-Item -Path $reg_lib -Value $dir.Replace('\\','\\\\') -Force | Out-Null",
        "New-ItemProperty -Path $reg_lib -Name 'GS_DLL' -Value $reg_gs_dll -PropertyType String | Out-Null",
        "New-ItemProperty -Path $reg_lib -Name 'GS_LIB' -Value $reg_gs_lib -PropertyType String | Out-Null"
    ],
    "env_add_path": "lib",
    "post_uninstall": [
        "$reg_app = \"HKCU:\\SOFTWARE\\Artifex\\GPL Ghostscript\"",
        "$reg_lib = \"HKCU:\\SOFTWARE\\GPL Ghostscript\"",
        "if ($global) { $reg_app = $reg_app.Replace('HKCU:','HKLM:'); $reg_lib = $reg_lib.Replace('HKCU:','HKLM:') }",
        "Remove-Item -Path $reg_app -Force -Recurse",
        "Remove-Item -Path $reg_lib -Force -Recurse"
    ],
    "checkver": {
        "url": "https://www.ghostscript.com/releases/index.html",
        "regex": "latest release is Ghostscript ([\\d.]+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$cleanVersion/gs$cleanVersionw64.exe#/dl.7z"
            },
            "32bit": {
                "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$cleanVersion/gs$cleanVersionw32.exe#/dl.7z"
            }
        },
        "hash": {
            "url": "$baseurl/SHA512SUMS"
        }
    }
}