changeset 6622:1f6d83d95f96

Update octave-launch file version info for octave version (Bug #63740) * binary-dist-rules.mk: add rule to generate octave-launch.rc and use in launcher * installer-files/octave-launch.rc: rename to installer-files/octave-launch.rc.in
author John Donoghue <john.donoghue@ieee.org>
date Mon, 06 Feb 2023 12:52:34 -0500
parents 3ad1333318eb
children 92cd7ad915b6
files binary-dist-rules.mk installer-files/octave-launch.rc installer-files/octave-launch.rc.in
diffstat 3 files changed, 34 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/binary-dist-rules.mk	Thu Feb 02 09:13:11 2023 -0500
+++ b/binary-dist-rules.mk	Mon Feb 06 12:52:34 2023 -0500
@@ -114,7 +114,13 @@
 installer-files/octave-launch-firsttime.exe: $(TOP_DIR)/installer-files/octave-launch.c installer-files/octave-launch.res | installer-files/.dirstamp
 	$(MXE_CC) $< -o $@ installer-files/octave-launch.res -Wl,--subsystem,windows -lshlwapi -municode -DUNICODE -D_UNICODE -DFIRST_TIME $(OCTAVE_LAUNCH_NO_SHORT_CPPFLAGS)
 
-installer-files/octave-launch.res: $(TOP_DIR)/installer-files/octave-launch.rc | installer-files/.dirstamp
+installer-files/octave-logo.ico: $(TOP_DIR)/installer-files/octave-logo.ico | installer-files/.dirstamp
+	cp -a $< $@
+
+installer-files/octave-launch.rc: $(TOP_DIR)/installer-files/octave-launch.rc.in | installer-files/octave-logo.ico installer-files/.dirstamp
+	$(SED) $< -e 's/@PRODUCT_VERSION@/$($(OCTAVE_TARGET)_VERSION)/' -e "s/@PRODUCT_VERSION_COMMA@/$(shell echo $($(OCTAVE_TARGET)_VERSION).0 | $(SED) 's|\.|,|g')/" > $@
+
+installer-files/octave-launch.res: installer-files/octave-launch.rc | installer-files/.dirstamp
 	$(MXE_WINDRES) $< -o $@ -O coff
 endif
 
--- a/installer-files/octave-launch.rc	Thu Feb 02 09:13:11 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#include "winver.h"
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION     1,0,0,0
-PRODUCTVERSION  1,0,0,0
-BEGIN
-  BLOCK "StringFileInfo"
-  BEGIN
-    BLOCK "040904B0"  // US-English, Unicode
-    BEGIN
-      VALUE "CompanyName", "GNU Octave"
-      VALUE "FileDescription", "GNU Octave Launcher"
-      VALUE "FileVersion", "1.0"
-      VALUE "InternalName", "octave-launcher.exe"
-      VALUE "LegalCopyright", " Copyright (C) 2021 The Octave Project Developers"
-      VALUE "OriginalFilename", "octave-launcher.exe"
-      VALUE "ProductName", "GNU Octave Launcher"
-      VALUE "ProductVersion", "1.0"
-    END
-  END
-  BLOCK "VarFileInfo"
-  BEGIN
-    VALUE "Translation", 0x0409, 0x04B0  // US-English, Unicode
-  END
-END
-
-11 ICON "octave-logo.ico"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/installer-files/octave-launch.rc.in	Mon Feb 06 12:52:34 2023 -0500
@@ -0,0 +1,27 @@
+#include "winver.h"
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION     1,0,0,1
+PRODUCTVERSION  @PRODUCT_VERSION_COMMA@
+BEGIN
+  BLOCK "StringFileInfo"
+  BEGIN
+    BLOCK "040904B0"  // US-English, Unicode
+    BEGIN
+      VALUE "CompanyName", "GNU Octave"
+      VALUE "FileDescription", "GNU Octave Launcher"
+      VALUE "FileVersion", "1.0.0.1"
+      VALUE "InternalName", "octave-launcher.exe"
+      VALUE "LegalCopyright", " Copyright (C) 2021-2023 The Octave Project Developers"
+      VALUE "OriginalFilename", "octave-launcher.exe"
+      VALUE "ProductName", "GNU Octave"
+      VALUE "ProductVersion", "@PRODUCT_VERSION@"
+    END
+  END
+  BLOCK "VarFileInfo"
+  BEGIN
+    VALUE "Translation", 0x0409, 0x04B0  // US-English, Unicode
+  END
+END
+
+11 ICON "octave-logo.ico"