Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bin/ghostscript10.07.1/bearsampp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ghostscriptVersion = "10.07.1"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Missing 10.07.1 release url 🐞 Bug ≡ Correctness

Adding bin/ghostscript10.07.1 makes Gradle discover version 10.07.1 via getAvailableVersions() and
attempt to build it, but downloadAndExtractGhostscript() throws when the version is not present in
releases.properties (and modules-untouched is absent). This makes builds for 10.07.1 (and
potentially releaseAll) fail with "Version 10.07.1 not found".
Agent Prompt
### Issue description
The build discovers `10.07.1` from `bin/ghostscript10.07.1/`, but the Gradle build can only download binaries for versions present in `releases.properties` (when `modules-untouched` isn’t available). Since `releases.properties` has no `10.07.1` key, `gradle release -PbundleVersion=10.07.1` and `gradle releaseAll` will fail.

### Issue Context
- `getAvailableVersions()` enumerates `bin/ghostscript{version}` directories.
- `downloadAndExtractGhostscript()` requires a `releases.properties` entry for the version (or a local `modules-untouched` checkout).

### Fix Focus Areas
- releases.properties[1-11]
- build.gradle[247-272]
- build.gradle[895-906]

### Suggested fix
1. Add a `10.07.1 = <url-to-10.07.1-archive>` entry to `releases.properties`.
2. If the 10.07.1 archive URL is not known yet, either:
   - temporarily omit the `bin/ghostscript10.07.1/` directory until the URL is available, or
   - adjust the build to skip versions that lack both local binaries and a `releases.properties` entry (so `releaseAll` doesn’t hard-fail).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

ghostscriptExe = "bin/gswin64.exe"
ghostscriptExeConsole = "bin/gswin64c.exe"

bundleRelease = "@RELEASE_VERSION@"
11 changes: 11 additions & 0 deletions bin/ghostscript10.07.1/update_cidfmap.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@ECHO OFF

pushd "%~dp0"
if not exist "%~dp0bin\gswin64c.exe" (
echo ERROR: gswin64c.exe not found in "%~dp0bin"
exit /b 1
)
"%~dp0bin\gswin64c.exe" -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
set EXITCODE=%ERRORLEVEL%
popd
exit /b %EXITCODE%
36 changes: 26 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -914,8 +914,21 @@ def getAvailableVersions() {
versions.addAll(archivedVersions)
}

// Remove duplicates and sort
return versions.unique().sort()
// Remove duplicates and sort semantically
return versions.unique().sort { a, b ->
def aParts = a.tokenize('.').collect { it.isInteger() ? it.toInteger() : it }
def bParts = b.tokenize('.').collect { it.isInteger() ? it.toInteger() : it }
for (int i = 0; i < Math.max(aParts.size(), bParts.size()); i++) {
def aVal = i < aParts.size() ? aParts[i] : 0
def bVal = i < bParts.size() ? bParts[i] : 0
if (aVal.getClass() != bVal.getClass()) {
aVal = aVal.toString()
bVal = bVal.toString()
}
if (aVal != bVal) return aVal <=> bVal
}
return 0
}
}

// Task: Build all available versions
Expand Down Expand Up @@ -1333,15 +1346,18 @@ tasks.register('checkModulesUntouched') {
println "=".multiply(70)

def sortedVersions = untouchedProps.sort { a, b ->
// Simple version comparison
def aParts = a.key.tokenize('.')
def bParts = b.key.tokenize('.')
for (int i = 0; i < Math.min(aParts.size(), bParts.size()); i++) {
def aNum = aParts[i].toInteger()
def bNum = bParts[i].toInteger()
if (aNum != bNum) return aNum <=> bNum
def aParts = a.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it }
def bParts = b.key.tokenize('.').collect { it.isInteger() ? it.toInteger() : it }
for (int i = 0; i < Math.max(aParts.size(), bParts.size()); i++) {
def aVal = i < aParts.size() ? aParts[i] : 0
def bVal = i < bParts.size() ? bParts[i] : 0
if (aVal.getClass() != bVal.getClass()) {
aVal = aVal.toString()
bVal = bVal.toString()
}
if (aVal != bVal) return aVal <=> bVal
}
return aParts.size() <=> bParts.size()
return 0
}

sortedVersions.each { version, url ->
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bundle.name = ghostscript
bundle.release = 2026.4.12
bundle.release = 2026.5.31
bundle.type = tools
bundle.format = 7z

Expand Down
Loading