This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new a386bd4b6e Add a makensis version check for release builds
a386bd4b6e is described below

commit a386bd4b6e949ac142720bbae1a89e3afd6a236d
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Mar 4 15:31:52 2025 +0000

    Add a makensis version check for release builds
---
 build.xml | 42 +++++++++++++++++++++++++++++++++++++-----
 1 file changed, 37 insertions(+), 5 deletions(-)

diff --git a/build.xml b/build.xml
index bb6755e94b..152bfbcd23 100644
--- a/build.xml
+++ b/build.xml
@@ -2613,7 +2613,7 @@
     </copy>
   </target>
 
-  <target name="-installer-pre-init">
+  <target name="-installer-set-properties-1">
     <property environment="env"/>
     <condition property="wine.ok">
       <or>
@@ -2644,8 +2644,26 @@
     </condition>
   </target>
 
-  <target name="-installer-init"
-      depends="-installer-pre-init"
+  <target name="-installer-set-properties-2"
+      depends="-installer-set-properties-1"
+      if="nsis.executable.unix">
+    <exec executable="${nsis.executable.unix}" 
outputproperty="nsis.executable.unix.version">
+      <arg value="-VERSION"/>
+    </exec>
+    <condition property="nsis.executable.unix.version.ok">
+      <or>
+        <os family="windows"/>
+        <equals arg1="nsis.version" arg2="nsis.executable.unix.version"/>
+        <not>
+          <!-- Zero length string for version.dev indicates a release build -->
+          <equals arg1="${version.dev}" arg2=""/>
+        </not>
+      </or>
+    </condition>
+  </target>
+
+  <target name="-installer-check-available"
+      depends="-installer-set-properties-1"
       unless="${installer.ok}">
     <fail message="The executable ${nsis.tool} was not found on the current 
path.
 Either wine or makensis are required to build the Windows installer on a 
non-Windows platform.
@@ -2653,8 +2671,22 @@ Choose the tool by setting property nsis.tool in 
build.properties.
 To skip building the Windows installer, set the skip.installer property in 
build.properties" />
   </target>
 
+  <target name="-installer-check-version"
+      depends="-installer-set-properties-2"
+      unless="${nsis.executable.unix.version.ok}">
+    <fail message="An executable makensis was found at: ${nsis.executable.unix}
+with version [${nsis.executable.unix.version}] but version [${nsis.version}] 
is required
+for repeatable builds.
+You may need a custom build of makensis. Instructions for this may be found in 
BUILDING.txt"/>
+  </target>
+
+  <target name="-installer-checks"
+      depends="-installer-check-available,-installer-check-version"
+      unless="${installer.ok}">
+  </target>
+
   <target name="-installer-prep"
-      depends="dist-static,-installer-init"
+      depends="dist-static,-installer-checks"
       unless="skip.installer">
     <copy todir="${tomcat.dist}">
       <fileset dir="res/install-win">
@@ -2692,7 +2724,7 @@ To skip building the Windows installer, set the 
skip.installer property in build
   </target>
 
   <target name="-installer-makensis" if="nsis.executable.unix">
-    <echo message="Using makensis: ${nsis.executable.unix}"/>
+    <echo message="Using makensis: ${nsis.executable.unix} version 
[${nsis.executable.unix.version}]"/>
     <exec dir="${tomcat.dist}" executable="${nsis.executable.unix}" 
osfamily="unix">
       <arg value="-DNSISDIR=${nsis.bin.home}"/>
       <arg value="-V2"/>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to