diff --git a/.gitignore b/.gitignore
index 603e576d4..38dc53bd8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ TuxPaint.dmg
*.dylib
*.dSYM
.DS_Store
+Info.plist
*.thumbs
*.swp
*.swo
diff --git a/Makefile b/Makefile
index 141d2c0d4..d025b21a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1113,6 +1113,7 @@ install-macbundle:
@install -d -m 755 $(BUNDLE)/Contents/lib
@install -m 755 tuxpaint $(BUNDLE)/Contents/MacOS
@install -m 644 macos/PkgInfo $(BUNDLE)/Contents
+ @VER_VERSION=$(VER_VERSION) macos/template.sh macos/Info.plist.shdoc > macos/Info.plist
@install -m 644 macos/Info.plist $(BUNDLE)/Contents
@install -m 644 macos/tuxpaint.icns $(BUNDLE)/Contents/Resources
@macos/build-app.sh
@@ -1122,13 +1123,14 @@ install-macbundle:
install-iosbundle:
@echo
@echo "...Installing iOS App Bundle Support Files..."
- install -m 755 tuxpaint $(BUNDLE)
- install -m 644 ios/PkgInfo $(BUNDLE)
- install -m 644 ios/Info.plist $(BUNDLE)
- install -m 644 ios/tuxpaint.icns $(BUNDLE)
- install -m 644 ios/tuxpaint.cfg $(BUNDLE)
- install -m 644 ios/Splash.png $(BUNDLE)
- ibtool --compile $(BUNDLE)/Splash.storyboardc ios/Splash.storyboard
+ @install -m 755 tuxpaint $(BUNDLE)
+ @install -m 644 ios/PkgInfo $(BUNDLE)
+ @VER_VERSION=$(VER_VERSION) ios/template.sh ios/Info.plist.shdoc > ios/Info.plist
+ @install -m 644 ios/Info.plist $(BUNDLE)
+ @install -m 644 ios/tuxpaint.icns $(BUNDLE)
+ @install -m 644 ios/tuxpaint.cfg $(BUNDLE)
+ @install -m 644 ios/Splash.png $(BUNDLE)
+ @ibtool --compile $(BUNDLE)/Splash.storyboardc ios/Splash.storyboard
# Create DMG for macOS
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index 4133b35ba..d777ea0e6 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -72,6 +72,9 @@ http://www.tuxpaint.org/
(also corrects some warnings being reported by libpng (via SDL_image);
h/t Tim Dickson, closes https://sourceforge.net/p/tuxpaint/bugs/252/)
+ * Automatically update macOS build version from the command line at build
+ time.
+
* Ports & Building:
-----------------
* Change name of Tux Paint config. files from ".conf" to ".cfg"
diff --git a/docs/RELEASE.txt b/docs/RELEASE.txt
index 87f4e2402..1321235e9 100644
--- a/docs/RELEASE.txt
+++ b/docs/RELEASE.txt
@@ -25,7 +25,6 @@ a .tar.gz source tarball, and making the tarball available for download.
* Build description files:
* tuxpaint.spec (Linux RPM package)
- * macos/Info.plist (macOS build)
* win32/resources.rc (Windows mingw/msys build)
* Changelog
diff --git a/ios/Info.plist b/ios/Info.plist.shdoc
similarity index 87%
rename from ios/Info.plist
rename to ios/Info.plist.shdoc
index 9ef560077..f716f2c92 100644
--- a/ios/Info.plist
+++ b/ios/Info.plist.shdoc
@@ -7,7 +7,7 @@
CFBundleExecutable
tuxpaint
CFBundleGetInfoString
- 0.9.26, Copyright 2009-2020, Tux Paint Development Team
+ ${VER_VERSION}, Copyright 2002-$(date +%Y), Tux Paint Development Team
CFBundleIconFile
tuxpaint.icns
CFBundleIdentifier
@@ -19,11 +19,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.9.26
+ ${VER_VERSION}
CFBundleSignature
TXPT
CFBundleVersion
- 2020-12-27
+ $(date +%Y-%m-%d)
UISupportedInterfaceOrientations
UIInterfaceOrientationLandscapeLeft
diff --git a/ios/template.sh b/ios/template.sh
new file mode 120000
index 000000000..d155177c8
--- /dev/null
+++ b/ios/template.sh
@@ -0,0 +1 @@
+../macos/template.sh
\ No newline at end of file
diff --git a/macos/Info.plist b/macos/Info.plist.shdoc
similarity index 83%
rename from macos/Info.plist
rename to macos/Info.plist.shdoc
index 580c3354b..d4d14e521 100644
--- a/macos/Info.plist
+++ b/macos/Info.plist.shdoc
@@ -7,7 +7,7 @@
CFBundleExecutable
tuxpaint
CFBundleGetInfoString
- 0.9.29, Copyright 2002-2022, Tux Paint Development Team
+ ${VER_VERSION}, Copyright 2002-$(date +%Y), Tux Paint Development Team
CFBundleIconFile
tuxpaint.icns
CFBundleIdentifier
@@ -19,10 +19,10 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.9.29
+ ${VER_VERSION}
CFBundleSignature
TXPT
CFBundleVersion
- 2022-06-14
+ $(date +%Y-%m-%d)
diff --git a/macos/template.sh b/macos/template.sh
new file mode 100755
index 000000000..e4d471f00
--- /dev/null
+++ b/macos/template.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+#
+# Process a document containing shell escape sequences.
+#
+# Usage: template.sh document.shdoc
+#
+
+bash <<<"cat <<__SHDOC_TEMPLATE__$$
+$(cat "$@")
+__SHDOC_TEMPLATE__$$"
+
+# vim:ft=bash