Skip to content

Commit

Permalink
GIMP: Using installer.script instead of original installer
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven committed May 20, 2019
1 parent 58730c7 commit 424ae72
Showing 1 changed file with 53 additions and 11 deletions.
64 changes: 53 additions & 11 deletions bucket/gimp.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,74 @@
{
"homepage": "https://www.gimp.org/",
"license": "GPL-3.0-only",
"description": "GNU Image Manipulation Program",
"version": "2.10.10",
"url": "https://download.gimp.org/mirror/pub/gimp/v2.10/windows/gimp-2.10.10-setup.exe",
"hash": "c20024cce6a04005c1a515cf189339e30dc4b0115eaec37ba4b639b2f0d06fca",
"innosetup": true,
"installer": {
"args": [
"/VERYSILENT",
"/NORESTART",
"/DIR=\"$dir\""
"script": [
"Push-Location \"$dir\"",
"Get-ChildItem -Filter '*.debug' -Recurse | Remove-Item -Recurse",
"$defenv = Get-Content 'lib\\gimp\\2.0\\environ\\default.env' -Raw",
"$pyenv = Get-Content 'lib\\gimp\\2.0\\environ\\pygimp.env' -Raw",
"$pyint = Get-Content 'lib\\gimp\\2.0\\interpreters\\pygimp.interp' -Raw",
"if ($architecture -eq '64bit') {",
" Rename-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,1.exe' 'twain.exe'",
" Remove-Item 'lib\\gimp\\2.0\\plug-ins\\twain\\twain,2.exe'",
" Get-ChildItem -Filter '*,1*' -Recurse | Remove-Item",
" Get-ChildItem -Filter '*,*' -Recurse | Rename-Item -NewName { $_.name -Replace ',\\d','' }",
" New-Item '32\\etc', '32\\share', 'share\\gimp\\2.0\\fonts' -ItemType 'Directory' | Out-Null",
" Copy-Item 'etc\\fonts', 'etc\\gtk-2.0' '32\\etc' -Recurse",
" Copy-Item 'share\\themes' '32\\share' -Recurse",
" Move-Item 'bin\\python*' '32\\bin'",
" Move-Item 'lib\\python2.7' '32\\lib'",
" Remove-Item 'lib\\gimp\\2.0\\python'",
" $defenv += \"`nPATH=`${gimp_installation_dir}\\bin;`${gimp_installation_dir}\\32\\bin`nPYTHONPATH=`${gimp_installation_dir}\\32\\lib\\gimp\\2.0\\python;`${gimp_plug_in_dir}\\plug-ins\\python-console\"",
" $pyint = ($pyint -Replace '/mingw32', \"$dir\\32\\bin\") -Replace 'py::python2', 'py::python'",
"} else {",
" Get-ChildItem -Filter '*,1*' -Recurse | Rename-Item -NewName { $_.name -Replace ',1','' }",
" Get-ChildItem -Filter '*,*' -Recurse | Remove-Item",
" movedir \"$dir\\32\" \"$dir\" | Out-Null",
" $defenv += \"`nPATH=`${gimp_installation_dir}\\bin`nPYTHONPATH=`${gimp_installation_dir}\\lib\\gimp\\2.0\\python;`${gimp_plug_in_dir}\\plug-ins\\python-console\"",
" $pyint = ($pyint -Replace '/mingw32', \"$dir\\bin\") -Replace 'py::python2', 'py::python'",
"}",
"$defenv | Set-Content 'lib\\gimp\\2.0\\environ\\default.env'",
"$pyenv + '__COMPAT_LAYER=HIGHDPIAWARE' | Set-Content 'lib\\gimp\\2.0\\environ\\pygimp.env'",
"$pyint | Set-Content 'lib\\gimp\\2.0\\interpreters\\pygimp.interp'",
"Pop-Location"
]
},
"uninstaller": {
"file": "uninst\\unins000.exe",
"args": "/VERYSILENT"
},
"bin": [
"bin\\gimp-console-2.10.exe",
[
"bin\\gimp-2.10.exe",
"bin\\gimp-console-2.10.exe",
"gimp"
],
"bin\\gimptool-2.0.exe",
[
"bin\\gimptool-2.0.exe",
"gimptool"
]
],
"shortcuts": [
[
"bin\\gimp-2.10.exe",
"GIMP"
]
],
"persist": [
"etc\\gimp",
"lib\\gimp\\2.0\\plug-ins",
"share\\gimp"
],
"checkver": {
"url": "https://www.gimp.org/downloads/",
"re": "gimp-(?<version>[\\d.]+)-setup(?<build>-\\d)?.exe"
"regex": "gimp-(?<version>[\\d.]+)-setup(?<build>-\\d)?.exe",
"replace": "${1}${2}"
},
"autoupdate": {
"url": "https://download.gimp.org/mirror/pub/gimp/v$majorVersion.$minorVersion/windows/gimp-$version-setup$matchBuild.exe",
"url": "https://download.gimp.org/mirror/pub/gimp/v$majorVersion.$minorVersion/windows/gimp-$matchVersion-setup$matchBuild.exe",
"hash": {
"url": "$baseurl/SHA256SUMS"
}
Expand Down

0 comments on commit 424ae72

Please sign in to comment.