[gimp-help/gimp-help-2-10: 3/5] build: break the version argument into major, minor, micro.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help/gimp-help-2-10: 3/5] build: break the version argument into major, minor, micro.
- Date: Sat, 19 Mar 2022 21:41:26 +0000 (UTC)
commit 647a2935dad9a4f4b27895f9ee6e3de499a00f7c
Author: Jehan <jehan girinstud io>
Date: Sat Mar 19 16:16:54 2022 +0100
build: break the version argument into major, minor, micro.
This way, I removed harcoded MIN_VERSION (considering it will be the
major.minor) as well as various usage of '2' in app ID or directory
name. This will be much more future-proof when we will switch to GIMP
3.0 (hence gimp-help 3.0 too!).
Also I remove any hardcoded default values and just make setting these
macro mandatory.
build/windows/installer/build.bat | 4 +++-
build/windows/installer/gimp-help.iss | 26 +++++++++++-----------
.../windows/installer/installer-gimp-help-msys2.sh | 2 +-
3 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/build/windows/installer/build.bat b/build/windows/installer/build.bat
index 645690ca0..5c3679fec 100644
--- a/build/windows/installer/build.bat
+++ b/build/windows/installer/build.bat
@@ -1,5 +1,7 @@
@echo off
if "%1"=="" goto help
+if "%2"=="" goto help
+if "%3"=="" goto help
if [%INNOPATH%]==[] (
FOR /F "usebackq tokens=5,* skip=2" %%A IN (`REG QUERY
"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 6_is1" /v "Inno Setup: App
Path" /reg:32`) DO set INNOPATH=%%B
@@ -13,7 +15,7 @@ FOR /D %%l in (..\..\..\htdocs\2.10\*) DO if not "%%l"=="..\..\..\htdocs\2.10\."
if not "%%l"=="..\..\..\htdocs\2.10\.." (
if not "%%l"=="..\..\..\htdocs\2.10\pdf" (
echo Creating installer for %%~nxl
- "%INNOPATH%\iscc.exe" "gimp-help.iss" /DVERSION="%1" /DLANG="%%~nxl"
/DHELPDIR="..\..\..\htdocs\2.10"
+ "%INNOPATH%\iscc.exe" "gimp-help.iss" /DMAJORVERSION="%1" /DMINORVERSION="%2"
/DMICROVERSION="%3" /DLANG="%%~nxl" /DHELPDIR="..\..\..\htdocs\2.10"
)
)
)
diff --git a/build/windows/installer/gimp-help.iss b/build/windows/installer/gimp-help.iss
index 3bcdee9ce..f8db7f1a7 100644
--- a/build/windows/installer/gimp-help.iss
+++ b/build/windows/installer/gimp-help.iss
@@ -24,26 +24,26 @@
; distribution. ;
;.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.;
-#ifndef VERSION
- #define VERSION='2.10.0'
-#endif
-#ifndef LANG
- #define LANG='en'
-#endif
-
-;gimp version
-#define MIN_VERSION='2.10'
;#define dontcompress
;#define nofiles
-#ifndef VERSION
- #error VERSION must be defined
+#ifndef MAJORVERSION
+ #error MAJORVERSION must be defined
+#endif
+#ifndef MINORVERSION
+ #error MINORVERSION must be defined
+#endif
+#ifndef MICROVERSION
+ #error MICROVERSION must be defined
#endif
#ifndef LANG
#error LANG must be defined
#endif
+#define VERSION MAJORVERSION + '.' + MINORVERSION + '.' + MICROVERSION
+#define MIN_VERSION MAJORVERSION + '.' + MINORVERSION
+
;for picking up the correct Inno Setup language file
#if LANG=='en'
#define LANGUAGE='English'
@@ -97,12 +97,12 @@
[Setup]
AppName={cm:GimpHelp} {#VERSION}
-AppID=GIMP-Help-2
+AppID=GIMP-Help-{#MAJORVERSION}
AppVerName=GIMP Help {#VERSION}
AppPublisherURL=https://www.gimp.org/
AppSupportURL=https://www.gimp.org/
AppUpdatesURL=https://www.gimp.org/
-DefaultDirName={autopf}\GIMP Help 2
+DefaultDirName={autopf}\GIMP Help {#MAJORVERSION}
DirExistsWarning=no
DisableProgramGroupPage=yes
DisableDirPage=yes
diff --git a/build/windows/installer/installer-gimp-help-msys2.sh
b/build/windows/installer/installer-gimp-help-msys2.sh
index 8a1395b90..771db83d0 100644
--- a/build/windows/installer/installer-gimp-help-msys2.sh
+++ b/build/windows/installer/installer-gimp-help-msys2.sh
@@ -51,7 +51,7 @@ MAJOR_VERSION=`grep 'm4_define(\[help_major_version' configure.ac |sed 's/m4_def
MINOR_VERSION=`grep 'm4_define(\[help_minor_version' configure.ac |sed
's/m4_define(\[help_minor_version.*\[\([0-9]*\)\].*/\1/'`
MICRO_VERSION=`grep 'm4_define(\[help_micro_version' configure.ac |sed
's/m4_define(\[help_micro_version.*\[\([0-9]*\)\].*/\1/'`
cd build/windows/installer
-./build.bat ${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
+./build.bat ${MAJOR_VERSION} ${MINOR_VERSION} ${MICRO_VERSION}
# Test if the installer was created and return success/failure.
if [ -f "_Output/gimp-help-${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}-en-setup.exe" ]; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]