ghostscript: Add installation of registry (#4703)

This commit is contained in:
HUMORCE 2023-04-21 20:25:15 +08:00 committed by GitHub
parent 9080272a7f
commit 86398b44e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,25 @@
]
}
},
"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\\$version\"",
"$reg_lib = \"HKCU:\\SOFTWARE\\GPL Ghostscript\\$version\"",
"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": {
"github": "https://github.com/ArtifexSoftware/ghostpdl-downloads/",
"regex": "Ghostscript/GhostPDL ([\\d.]+)"