Skip to content

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Jul 31, 2025

PR Type

Enhancement


Description

  • Update Ghostscript to version 10.05.1

  • Add new configuration files for version 10.05.1

  • Update bundle release date to 2025.7.31

  • Add new release entry in releases.properties


Diagram Walkthrough

flowchart LR
  A["Ghostscript 10.05.0"] --> B["Ghostscript 10.05.1"]
  B --> C["New Config Files"]
  B --> D["Updated Release Info"]
  C --> E["bearsampp.conf"]
  C --> F["update_cidfmap.bat"]
  D --> G["build.properties"]
  D --> H["releases.properties"]
Loading

File Walkthrough

Relevant files
Configuration changes
update_cidfmap.bat
Add CID font mapping update script                                             

bin/ghostscript10.05.1/update_cidfmap.bat

  • Add batch script for updating CID font mapping
  • Configure Ghostscript to use Windows fonts directory
  • Execute mkcidfm.ps script with proper parameters
+4/-0     
bearsampp.conf
Add Bearsampp configuration for 10.05.1                                   

bin/ghostscript10.05.1/bearsampp.conf

  • Define Ghostscript version as 10.05.1
  • Set executable paths for console and GUI versions
  • Configure bundle release version placeholder
+5/-0     
build.properties
Update bundle release date                                                             

build.properties

  • Update bundle release date from 2025.4.26 to 2025.7.31
+1/-1     
releases.properties
Add 10.05.1 release entry                                                               

releases.properties

  • Add new release entry for Ghostscript 10.05.1
  • Point to 2025.7.31 release download URL
+1/-0     

@N6REJ N6REJ added bug 🐛 For known bugs enhancement ✨ Improve program labels Jul 31, 2025
@qodo-code-review
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Path Hardcoding

The batch script hardcodes the Windows fonts directory path as 'c:/windows/fonts' which may not work on all systems or Windows installations with different drive letters or custom font directories.

bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
URL Validation

The new release URL should be verified to ensure it points to a valid and accessible download location before the release is published.

10.05.1 = https://github.com/Bearsampp/module-ghostscript/releases/download/2025.7.31/bearsampp-ghostscript-10.05.1-2025.7.31.7z

@qodo-code-review
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Add error handling for command

The script lacks error handling for the Ghostscript execution. If the command
fails, the batch script will continue silently without indicating the failure to
the user.

bin/ghostscript10.05.1/update_cidfmap.bat [4]

 bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
+if %ERRORLEVEL% neq 0 (
+    echo Error: Failed to update CID font mapping
+    exit /b %ERRORLEVEL%
+)
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: Adding error handling by checking %ERRORLEVEL% is crucial for robustness, as it prevents the script from failing silently and provides clear feedback to the user.

Medium
Use dynamic Windows path reference

The hardcoded path c:/windows/fonts may fail on systems with different Windows
installations or drive letters. Use the %WINDIR% environment variable to
dynamically reference the Windows directory.

bin/ghostscript10.05.1/update_cidfmap.bat [4]

-bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
+bin\gswin64c.exe -q -dBATCH -sFONTDIR=%WINDIR%/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: Using the %WINDIR% environment variable instead of a hardcoded path improves the script's portability and reliability across different Windows installations.

Medium
  • More

@jwaisner jwaisner merged commit 99cf54f into main Aug 1, 2025
@jwaisner jwaisner deleted the 10.05.1 branch August 1, 2025 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 For known bugs enhancement ✨ Improve program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants