Skip to content

Conversation

@N6REJ
Copy link
Collaborator

@N6REJ N6REJ commented Nov 26, 2025

User description

provides ability for prerequisites to use gradle


PR Type

Enhancement, Documentation


Description

  • Gradle integration for prerequisites: Added Gradle wrapper configuration (version 8.14) and updated gradle.properties with tool download URLs for Composer, InnoExtract, InnoSetup, and HashMyFiles, enabling automated prerequisite management via gradle loadLibs

  • Inno Setup library updates: Downgraded Inno Setup from version 6.4.0 to 6.1.0 across all language files and core files, with copyright year updates to 2023

  • Language support expansion: Added new Turkish and Polish language translation files; added Ukrainian language support; removed several language files (Tamil, Swedish, Arabic, Korean)

  • Example script improvements: Refactored link label components to static text with manual styling, simplified timer management, updated hash validation methods, and added new three-architecture installer example

  • Documentation additions: Added comprehensive Prerequisites Module README with setup instructions and build commands; added Inno Setup revision history documentation (whatsnew.htm)

  • Code cleanup: Removed extraction wizard page messages from multiple language files, simplified download page configuration, and removed unnecessary query parameters

  • File reorganization: Moved Inno Setup files from bin/lib/innosetup/app/ to bin/lib/innosetup/ directory structure


Diagram Walkthrough

flowchart LR
  gradle["Gradle Configuration<br/>gradle.properties<br/>gradle-wrapper.properties"]
  tools["Tool Downloads<br/>Composer 2.9.2<br/>InnoSetup 6.2.2<br/>InnoExtract<br/>HashMyFiles"]
  inno["Inno Setup 6.1.0<br/>Examples & Languages"]
  docs["Documentation<br/>Prerequisites README<br/>whatsnew.htm"]
  gradle -- "defines URLs & versions" --> tools
  tools -- "downloads & configures" --> inno
  inno -- "documents" --> docs
Loading

File Walkthrough

Relevant files
Enhancement
6 files
CodeClasses.iss
Refactor link label to static text with manual styling     

bin/lib/innosetup/Examples/CodeClasses.iss

  • Removed LinkLabelOnLinkClick procedure and related link label
    functionality
  • Removed StaticText2 and LinkLabel variable declarations and their
    initialization code
  • Replaced TNewLinkLabel with TNewStaticText for URL display with manual
    styling
  • Changed progress bar anchor settings from akTop to akBottom for better
    layout
  • Added AutoSize := True to static text controls
+25/-49 
CodeDll.iss
Simplify timer management by removing cleanup logic           

bin/lib/innosetup/Examples/CodeDll.iss

  • Removed KillTimer function declaration and TimerID variable
  • Simplified MyTimerProc by removing null check for WizardForm
  • Removed DeinitializeSetup procedure that was cleaning up the timer
  • Simplified InitializeWizard to not store timer ID
+5/-16   
CodeDownloadFiles.iss
Simplify download page configuration and URLs                       

bin/lib/innosetup/Examples/CodeDownloadFiles.iss

  • Removed ShowBaseNameInsteadOfUrl property assignment from DownloadPage
  • Removed query parameters ?dontcount=1 from download URLs
+2/-3     
Example3.iss
Add application supported file types registry configuration

bin/lib/innosetup/Examples/Example3.iss

  • Added new registry entry for SupportedTypes under
    Applications\MyProg.exe
+1/-0     
Polish.isl
Add Polish language support for Inno Setup installer         

bin/lib/innosetup/Languages/Polish.isl

  • Added new Polish language translation file for Inno Setup version
    6.1.0+
  • Contains 377 lines of Polish UI messages for installer dialogs and
    operations
  • Includes translations for setup wizard pages, error messages, and user
    prompts
+377/-0 
Ukrainian.isl
Add Ukrainian language support for Inno Setup installer   

bin/lib/innosetup/Languages/Ukrainian.isl

  • Added new Ukrainian language translation file for Inno Setup version
    6.1.0+
  • Contains 385 lines of Ukrainian UI messages with Cyrillic characters
  • Includes complete translations for all installer dialogs and system
    messages
+385/-0 
Miscellaneous
9 files
CodeAutomation.iss
Update XML download URL and message text                                 

bin/lib/innosetup/Examples/CodeAutomation.iss

  • Changed XMLURL constant from HTTPS to HTTP protocol
  • Updated user-facing message text from "source folder" to "disk"
+2/-44   
CodeDlg.iss
Update hash validation and input directory page configuration

bin/lib/innosetup/Examples/CodeDlg.iss

  • Changed CreateInputDirPage parameter from
    SetupMessage(msgNewFolderName) to empty string
  • Replaced SHA256 hash validation with SHA1 hash validation and updated
    hash value
+2/-2     
ISPPBuiltins.iss
Update copyright years to 2023                                                     

bin/lib/innosetup/ISPPBuiltins.iss

  • Updated copyright year from 2025 to 2023 for Jordan Russell
  • Updated copyright year from 2025 to 2023 for Martijn Laan
+2/-2     
ISPP.chm
Update compiled help file                                                               

bin/lib/innosetup/ISPP.chm

  • Binary file update with internal content changes
[link]   
Russian.isl
Downgrade Russian translation to 6.1.0 and remove extraction messages

bin/lib/innosetup/Languages/Russian.isl

  • Updated version reference from 6.4.0+ to 6.1.0+
  • Removed extraction wizard page messages (ExtractionLabel,
    ButtonStopExtraction, etc.)
  • Removed font configuration comments from [LangOptions] section
  • Removed translator email and simplified contact information
  • Removed some explanatory comments from uninstall display name markings
+3/-23   
Italian.isl
Downgrade Italian translation to 6.1.0 and update metadata

bin/lib/innosetup/Languages/Italian.isl

  • Added UTF-8 BOM to file beginning
  • Updated version reference from 6.4.0+ to 6.1.0+
  • Updated last modification date from 25.11.2024 to 25.07.2020
  • Removed HelpTextNote message entry
  • Updated translator note with older date
+4/-12   
Czech.isl
Downgrade Czech translation to 6.1.0 and update dialog text

bin/lib/innosetup/Languages/Czech.isl

  • Updated version reference from 6.4.0+ to 6.1.0+
  • Changed BrowseDialogTitle text from "Zvolte slo�ku" to "Vyhledat
    slo�ku"
+2/-9     
Catalan.isl
Downgrade Catalan translation to 6.1.0 and update contact info

bin/lib/innosetup/Languages/Catalan.isl

  • Updated version reference from 6.4.0+ to 6.1.0+
  • Updated translator email from carles24@carlesmillan.cat to
    carles@carlesmillan.cat
  • Removed note about periods in translated messages
+2/-11   
Bulgarian.isl
Downgrade Bulgarian translation to 6.1.0                                 

bin/lib/innosetup/Languages/Bulgarian.isl

  • Updated version reference from 6.4.0+ to 6.1.0+
+1/-8     
Documentation
6 files
64BitThreeArch.iss
Add new three-architecture installer example script           

bin/lib/innosetup/Examples/64BitThreeArch.iss

  • New example script demonstrating installation for three architectures
    (x86, x64, ARM64)
  • Includes architecture detection functions InstallX64, InstallARM64,
    and InstallOtherArch
  • Shows proper file placement and solid compression break markers for
    multi-architecture builds
+53/-0   
64BitTwoArch.iss
Remove ARM64 references and simplify architecture configuration

bin/lib/innosetup/Examples/64BitTwoArch.iss

  • Removed references to "Windows 11 on Arm" from comments and
    documentation
  • Changed ArchitecturesInstallIn64BitMode from x64compatible to x64
  • Updated comments to clarify x64-specific behavior instead of ARM
    compatibility
  • Changed ArchitecturesAllowed comment reference from
    ArchitecturesAllowed to ProcessorsAllowed
+10/-10 
64Bit.iss
Remove ARM64 compatibility references and simplify configuration

bin/lib/innosetup/Examples/64Bit.iss

  • Removed "Windows 11 on Arm" references from documentation comments
  • Changed ArchitecturesAllowed from x64compatible to x64
  • Changed ArchitecturesInstallIn64BitMode from x64compatible to x64
  • Updated comments to reflect x64-only architecture support
+8/-9     
whatsnew.htm
Add comprehensive revision history documentation                 

bin/lib/innosetup/whatsnew.htm

  • New HTML file documenting Inno Setup 6 revision history
  • Includes detailed changelog for versions 6.2.2, 6.2.1, and 6.2.0
  • Documents graphics modernization, feature additions, and bug fixes
+109/-0 
Turkish.isl
Add complete Turkish language translation file                     

bin/lib/innosetup/Languages/Turkish.isl

  • New Turkish language translation file for Inno Setup 6.1.0+
  • Comprehensive translation of all setup messages, dialogs, and user
    interface text
  • Includes language options, buttons, wizard pages, and error messages
+384/-0 
README.md
Add Prerequisites Module documentation and setup guide     

modules/prerequisites/README.md

  • Added new README documentation for Prerequisites Module
  • Documents setup instructions for downloading tools via gradle loadLibs
  • Provides build commands and task descriptions for prerequisite
    packages
  • Lists available tool paths and instructions for adding new
    prerequisites
+59/-0   
Formatting
2 files
UnicodeExample1.iss
Add UTF-8 BOM and remove version check directive                 

bin/lib/innosetup/Examples/UnicodeExample1.iss

  • Added UTF-8 BOM (Byte Order Mark) to file beginning
  • Removed version check preprocessor directive for UTF-8 encoding
    requirement
+1/-5     
CodeAutomation2.iss
Add trailing newlines to file                                                       

bin/lib/innosetup/Examples/CodeAutomation2.iss

  • Added trailing newlines at end of file
+6/-1     
Configuration changes
20 files
Corsican.isl
Downgrade Corsican translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Corsican.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Removed recent changelog entries (2024, 2023 updates)
  • Removed extraction wizard page messages (ExtractionLabel,
    ButtonStopExtraction, etc.)
  • Minor text corrections and standardization of terminology
+47/-56 
Armenian.isl
Downgrade Armenian translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Armenian.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Updated last modification date from 2024-11-26 to 2020-10-06
  • Removed extraction wizard page messages and related error handling
  • Minor text corrections and capitalization adjustments
+27/-33 
Hungarian.isl
Downgrade Hungarian translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Hungarian.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Removed extraction wizard page messages (ExtractionLabel,
    ButtonStopExtraction, etc.)
  • Reverted URL from https to http in translation file reference
  • Minor text corrections and button label adjustments
+18/-25 
Spanish.isl
Downgrade Spanish translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Spanish.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Updated version numbers in file header (1.6.0 to 1.5.2, 6.4.0 to
    6.1.0)
  • Removed extraction wizard page messages and related error handling
  • Minor text corrections in Spanish translations
+5/-12   
Dutch.isl
Downgrade Dutch translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Dutch.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Updated maintainer email from mlaan@innosetup.nl to
    mlaan@jrsoftware.org
  • Removed extraction wizard page messages and related error handling
  • Minor text corrections in Dutch translations
+6/-13   
Finnish.isl
Downgrade Finnish translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Finnish.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Updated last modification date from 2024-11-30 to 2020-08-02
+2/-9     
Slovak.isl
Downgrade Slovak translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Slovak.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Updated modification date from 12.12.2024 to 28.01.2021
+2/-9     
German.isl
Downgrade German translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/German.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
  • Removed extraction wizard page messages and related error handling
  • Minor text correction in AutoStartProgram message
+2/-9     
BrazilianPortuguese.isl
Downgrade Brazilian Portuguese translation to version 6.1.0

bin/lib/innosetup/Languages/BrazilianPortuguese.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
French.isl
Downgrade French translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/French.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-9     
Danish.isl
Downgrade Danish translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Danish.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
Japanese.isl
Downgrade Japanese translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Japanese.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
Slovenian.isl
Downgrade Slovenian translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Slovenian.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
Norwegian.isl
Downgrade Norwegian translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Norwegian.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
Default.isl
Downgrade default English messages to version 6.1.0           

bin/lib/innosetup/Default.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
gradle.properties
Configure Gradle properties and tool download URLs             

gradle.properties

  • Disabled configuration cache by setting
    org.gradle.configuration-cache=false
  • Added tool download URLs for Composer, InnoExtract, InnoSetup, and
    HashMyFiles
  • Configured specific versions for each tool (Composer 2.9.2, InnoSetup
    6.2.2, etc.)
+17/-1   
Hebrew.isl
Downgrade Hebrew translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Hebrew.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
Portuguese.isl
Downgrade Portuguese translation to version 6.1.0 compatibility

bin/lib/innosetup/Languages/Portuguese.isl

  • Downgraded version from 6.4.0+ to 6.1.0+ in header comments
+1/-8     
license.txt
Update Inno Setup license copyright years to 2023               

bin/lib/innosetup/license.txt

  • Updated copyright years from 1997-2025 to 1997-2023 for Jordan Russell
  • Updated copyright years from 2000-2025 to 2000-2023 for Martijn Laan
+2/-2     
gradle-wrapper.properties
Add Gradle wrapper configuration for version 8.14               

gradle/wrapper/gradle-wrapper.properties

  • Added new Gradle wrapper configuration file
  • Configured Gradle version 8.14 with SHA-256 validation
  • Set distribution base and store paths for wrapper management
+7/-0     
Additional files
46 files
composer.phar [link]   
AllPagesExample.iss [link]   
CodeExample1.iss [link]   
CodePrepareToInstall.iss [link]   
Components.iss [link]   
Example1.iss [link]   
Example2.iss [link]   
ISPPExample1.iss [link]   
ISPPExample1License.txt [link]   
Languages.iss [link]   
License.txt [link]   
MyDll.cs [link]   
MyDll.csproj [link]   
MyDll.sln [link]   
AssemblyInfo.cs [link]   
packages.config [link]   
MyDll.c [link]   
MyDll.def [link]   
MyDll.dsp [link]   
MyDll.dpr [link]   
MyProg.chm [link]   
Readme-Dutch.txt [link]   
Readme-German.txt [link]   
Readme.txt [link]   
UninstallCodeExample1.iss [link]   
ISetup.chm [link]   
Icelandic.isl [link]   
Setup.e32 [link]   
SetupLdr.e32 [link]   
64BitThreeArch.iss +0/-64   
PowerShell.iss +0/-87   
ISetup-dark.chm [link]   
ISetup.chm [link]   
Arabic.isl +0/-393 
Korean.isl +0/-398 
Polish.isl +0/-385 
Swedish.isl +0/-398 
Tamil.isl +0/-392 
Turkish.isl +0/-391 
Ukrainian.isl +0/-383 
Setup.e32 [link]   
SetupLdr.e32 [link]   
isfaq.url +0/-2     
whatsnew.htm +0/-156 
lessmsi-gui.exe.config +0/-22   
lessmsi.exe.config +0/-7     

@qodo-code-review
Copy link

qodo-code-review bot commented Nov 26, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No audit logs: Newly added download actions execute external network requests without any accompanying
audit logging of who initiated them, when, or their outcome.

Referred Code
DownloadPage.Add('https://jrsoftware.org/download.php/is.exe', 'innosetup-latest.exe', '');
DownloadPage.Add('https://jrsoftware.org/download.php/iscrypt.dll', 'ISCrypt.dll', '2f6294f9aa09f59a574b5dcd33be54e16b39377984f3d5658cda44950fa0f8fc');
DownloadPage.Show;
try

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Timer cleanup removed: The new timer setup removed previous cleanup (KillTimer) and null checks, which may cause
resource leaks or errors if the wizard form is not available.

Referred Code
  TimerCount: Integer;

procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword);
begin
  Inc(TimerCount);
  WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount) + ' ';
  WizardForm.BeveledLabel.Visible := True;
end;

procedure InitializeWizard;
begin
  SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
end;

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Insecure URL: The XML download source was changed from HTTPS to HTTP, reducing transport security and
potentially enabling MITM tampering.

Referred Code
  XMLURL = 'http://jrsoftware.github.io/issrc/ISHelp/isxfunc.xml';
  XMLFileName = 'isxfunc.xml';
  XMLFileName2 = 'isxfuncmodified.xml';

procedure MSXMLButtonOnClick(Sender: TObject);
var
  XMLHTTP, XMLDoc, NewNode, RootNode: Variant;
  Path: String;
begin
  if MsgBox('Setup will now use MSXML to download XML file ''' + XMLURL + ''' and save it to disk.'#13#13'Setup will then load, modify and save this XML file. Do you want to continue?', mbInformation, mb_YesNo) = idNo then
    Exit;

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

qodo-code-review bot commented Nov 26, 2025

PR Code Suggestions ✨

Latest suggestions up to 536a452

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix missing semicolon

Add a missing semicolon after the URLLabel.Font.Color assignment to fix a
compile-time syntax error.

bin/lib/innosetup/Examples/CodeClasses.iss [399-401]

-URLLabel.Font.Color := clHotLight
+URLLabel.Font.Color := clHotLight;
 URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
 URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a missing semicolon in the Pascal script, which is a syntax error that would prevent compilation, making this a critical fix.

High
  • More

Previous suggestions

Suggestions up to commit feb6864
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix missing semicolon

Add a missing semicolon after the URLLabel.Font.Color assignment to fix a
compilation error.

bin/lib/innosetup/Examples/CodeClasses.iss [392-402]

 URLLabel := TNewStaticText.Create(ParentForm);
 URLLabel.Caption := 'www.innosetup.com';
 URLLabel.Cursor := crHand;
 URLLabel.OnClick := @URLLabelOnClick;
 URLLabel.Parent := ParentForm;
 { Alter Font *after* setting Parent so the correct defaults are inherited first }
 URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
-URLLabel.Font.Color := clHotLight
+URLLabel.Font.Color := clHotLight;
 URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
 URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
 URLLabel.Anchors := [akLeft, akBottom];
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a syntax error (a missing semicolon) that would prevent the script from compiling, making it a critical fix.

High
Properly manage and stop timer

Restore the timer cleanup logic by reintroducing DeinitializeSetup and add a
guard in MyTimerProc to prevent potential access violations when the wizard form
is destroyed.

bin/lib/innosetup/Examples/CodeDll.iss [82-95]

 var
-  TimerCount: Integer;
+  TimerID, TimerCount: Integer;
 
 procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword);
 begin
-  Inc(TimerCount);
-  WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount) + ' ';
-  WizardForm.BeveledLabel.Visible := True;
+  if (WizardForm <> nil) and WizardForm.HandleAllocated then begin
+    Inc(TimerCount);
+    WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount) + ' ';
+    WizardForm.BeveledLabel.Visible := True;
+  end;
 end;
 
 procedure InitializeWizard;
 begin
-  SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
+  TimerID := SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
 end;
 
+procedure DeinitializeSetup;
+begin
+  if TimerID <> 0 then begin
+    KillTimer(0, TimerID);
+    TimerID := 0;
+  end;
+end;
+
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that the PR introduces a potential access violation by removing the timer cleanup logic, which is a significant correctness issue, especially for an example script.

Medium
Suggestions up to commit 8b744ec
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix syntax and sizing

Add a missing semicolon after the URLLabel.Font.Color assignment to fix a
compilation error. Additionally, set AutoSize := True on the label before
calculating its position to ensure its height is accurate.

bin/lib/innosetup/Examples/CodeClasses.iss [392-402]

 URLLabel := TNewStaticText.Create(ParentForm);
 URLLabel.Caption := 'www.innosetup.com';
 URLLabel.Cursor := crHand;
+URLLabel.AutoSize := True;
 URLLabel.OnClick := @URLLabelOnClick;
 URLLabel.Parent := ParentForm;
-{ Alter Font *after* setting Parent so the correct defaults are inherited first }
 URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
-URLLabel.Font.Color := clHotLight
+URLLabel.Font.Color := clHotLight;
 URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
 URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
 URLLabel.Anchors := [akLeft, akBottom];
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a syntax error (a missing semicolon) that would prevent the script from compiling, which is a critical issue. It also provides a valid recommendation to improve layout logic.

Medium
Fix label sizing and anchoring

To prevent potential layout issues, parent the ProgressBarLabel before using its
dimensions to position other controls, and consider changing its anchor from
bottom to top for more stable resizing behavior.

bin/lib/innosetup/Examples/CodeClasses.iss [228-242]

 ProgressBarLabel := TNewStaticText.Create(Page);
-ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
-ProgressBarLabel.Anchors := [akLeft, akBottom];
+ProgressBarLabel.Parent := Page.Surface;
 ProgressBarLabel.Caption := 'TNewProgressBar';
 ProgressBarLabel.AutoSize := True;
-ProgressBarLabel.Parent := Page.Surface;
+ProgressBarLabel.Anchors := [akLeft, akTop];
+ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
+// Ensure dimensions are valid before using Width/Height
+ProgressBarLabel.AdjustBounds;
 
 ProgressBar := TNewProgressBar.Create(Page);
-ProgressBar.Left := ProgressBarLabel.Width + ScaleX(8);
+ProgressBar.Left := ProgressBarLabel.Left + ProgressBarLabel.Width + ScaleX(8);
 ProgressBar.Top := ProgressBarLabel.Top;
 ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
 ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
-ProgressBar.Anchors := [akLeft, akRight, akBottom];
+ProgressBar.Anchors := [akLeft, akRight, akTop];
 ProgressBar.Parent := Page.Surface;
 ProgressBar.Position := 25;
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential layout issue where ProgressBarLabel.Width is used before the control is parented and sized, which could lead to incorrect positioning of ProgressBar. It proposes a robust solution by setting the parent first and adjusting bounds.

Medium
Suggestions up to commit 304d579
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix missing semicolon syntax

Add a missing semicolon after the URLLabel.Font.Color := clHotLight statement to
fix a compilation error.

bin/lib/innosetup/Examples/CodeClasses.iss [398-401]

 URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
-URLLabel.Font.Color := clHotLight
+URLLabel.Font.Color := clHotLight;
 URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
 URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a missing semicolon which is a syntax error that would prevent the script from compiling, making it a critical fix.

High
Stabilize autosized label layout

To prevent potential UI misalignments, explicitly recalculate the layout and
cache the width of the autosized ProgressBarLabel before using it to position
the ProgressBar.

bin/lib/innosetup/Examples/CodeClasses.iss [228-242]

 ProgressBarLabel := TNewStaticText.Create(Page);
 ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
 ProgressBarLabel.Anchors := [akLeft, akBottom];
 ProgressBarLabel.Caption := 'TNewProgressBar';
 ProgressBarLabel.AutoSize := True;
 ProgressBarLabel.Parent := Page.Surface;
+ProgressBarLabel.AdjustHeight;
+
+{ Cache autosized width before positioning progress bar }
+var LabelWidth: Integer;
+LabelWidth := ProgressBarLabel.Width;
 
 ProgressBar := TNewProgressBar.Create(Page);
-ProgressBar.Left := ProgressBarLabel.Width + ScaleX(8);
+ProgressBar.Left := LabelWidth + ScaleX(8);
 ProgressBar.Top := ProgressBarLabel.Top;
 ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
 ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
 ProgressBar.Anchors := [akLeft, akRight, akBottom];
 ProgressBar.Parent := Page.Surface;
 ProgressBar.Position := 25;
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies a potential UI layout issue where an autosized control's width might not be final when used for positioning, improving the example's robustness.

Low
Suggestions up to commit f228756
CategorySuggestion                                                                                                                                    Impact
High-level
Avoid committing binaries managed by Gradle

The PR adds Gradle for dependency management but also commits large binary files
like Setup.e32 and SetupLdr.e32. These files should be downloaded by Gradle
during the build and added to .gitignore to keep them out of version control.

Examples:

bin/lib/innosetup/Setup.e32 [1]
MZP���������������������@���������������������������������������������	�!��L�!��This program must be run under Win32
bin/lib/innosetup/SetupLdr.e32 [1]
MZP���������������������@���������������������������������������������	�!��L�!��This program must be run under Win32

Solution Walkthrough:

Before:

// .gitignore
# (does not contain entries for Inno Setup binaries)

// Repository state
/bin/lib/innosetup/Setup.e32       // Large binary committed
/bin/lib/innosetup/SetupLdr.e32    // Large binary committed

// build.gradle (conceptual)
// Gradle is introduced, but binaries are still checked in.

After:

// .gitignore
# Ignore downloaded Inno Setup binaries
/bin/lib/innosetup/Setup.e32
/bin/lib/innosetup/SetupLdr.e32

// Repository state
// (binary files are no longer in the repository)

// build.gradle (conceptual)
task downloadInnoSetupBinaries {
  // Logic to download Setup.e32 and SetupLdr.e32
  // into bin/lib/innosetup/
}
build.dependsOn(downloadInnoSetupBinaries)

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that committing large binaries like Setup.e32 and SetupLdr.e32 contradicts the PR's goal of using Gradle for dependency management and is a significant repository anti-pattern.

High
Security
Revert to HTTPS to prevent security risks

Revert the XMLURL constant from HTTP back to HTTPS to prevent Man-in-the-Middle
(MitM) attacks during file download.

bin/lib/innosetup/Examples/CodeAutomation.iss [164-165]

+const
+  XMLURL = 'https://jrsoftware.github.io/issrc/ISHelp/isxfunc.xml';
 
-
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical security vulnerability (MitM) introduced by downgrading the URL protocol from HTTPS to HTTP for a file download within an installer.

High
Use a stronger hashing algorithm

Revert the hashing algorithm for key validation from the deprecated SHA-1 back
to the more secure SHA-256 to avoid cryptographic vulnerabilities.

bin/lib/innosetup/Examples/CodeDlg.iss [156]

-if GetSHA1OfString('codedlg' + KeyPage.Values[0]) = '8013f310d340dab18a0d0cda2b5b115d2dcd97e4' then
+if GetSHA256OfString('codedlg' + KeyPage.Values[0]) = '4c06e466ec3a2c977ac902a6cf4c602457f701b59309fc4282d9cb2234b7559b' then
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that downgrading from SHA-256 to SHA-1 is a security weakness, as SHA-1 is cryptographically broken, and recommends reverting to the stronger algorithm.

Medium
General
Simplify logic for better performance

Simplify the InstallOtherArch function by replacing the calls to InstallX64 and
InstallARM64 with a single check for not Is64BitInstallMode to improve
efficiency.

bin/lib/innosetup/Examples/64BitThreeArch.iss [50-53]

 function InstallOtherArch: Boolean;
 begin
-  Result := not InstallX64 and not InstallARM64;
+  Result := not Is64BitInstallMode;
 end;
Suggestion importance[1-10]: 6

__

Why: The suggestion provides a valid simplification and optimization for the InstallOtherArch function by using the Is64BitInstallMode check, which improves code clarity and efficiency.

Low

@qodo-code-review
Copy link

qodo-code-review bot commented Nov 26, 2025

PR Reviewer Guide 🔍

(Review updated until commit 536a452)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 Security concerns

Mixed content and insecure downloads:
Several URLs were changed to HTTP (e.g., XMLURL in CodeAutomation.iss) and download links adjusted. Using HTTP can enable MITM attacks and tampering of downloaded content. Additionally, a download hash is only provided for one file in CodeDownloadFiles.iss; ensure all downloadable artifacts are fetched over HTTPS and verified with strong hashes (e.g., SHA-256).

⚡ Recommended focus areas for review

Possible Issue

Missing semicolon after setting font color for URLLabel may cause a compile error; verify the line setting URLLabel.Font.Color := clHotLight is properly terminated.

URLLabel.Font.Color := clHotLight
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
Behavior Change

Changed XML download URL from HTTPS to HTTP and altered user message text and save path wording; confirm downgrade to HTTP is intentional and safe, and UI text remains accurate.

  XMLURL = 'http://jrsoftware.github.io/issrc/ISHelp/isxfunc.xml';
  XMLFileName = 'isxfunc.xml';
  XMLFileName2 = 'isxfuncmodified.xml';

procedure MSXMLButtonOnClick(Sender: TObject);
var
  XMLHTTP, XMLDoc, NewNode, RootNode: Variant;
  Path: String;
begin
  if MsgBox('Setup will now use MSXML to download XML file ''' + XMLURL + ''' and save it to disk.'#13#13'Setup will then load, modify and save this XML file. Do you want to continue?', mbInformation, mb_YesNo) = idNo then
    Exit;
Resource Leak Risk

Timer cleanup removed (KillTimer and Deinitialize) and guard against WizardForm nil dropped; verify no orphan timers remain after setup exit and that callback safely accesses form lifecycle.

  TimerCount: Integer;

procedure MyTimerProc(Arg1, Arg2, Arg3, Arg4: Longword);
begin
  Inc(TimerCount);
  WizardForm.BeveledLabel.Caption := ' Timer! ' + IntToStr(TimerCount) + ' ';
  WizardForm.BeveledLabel.Visible := True;
end;

procedure InitializeWizard;
begin
  SetTimer(0, 0, 1000, CreateCallback(@MyTimerProc));
end;

@jwaisner jwaisner merged commit 65ff557 into main Nov 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants