[gimp/gimp-2-8] Bug 768915 - Generate build-related files that use GIMP version and ...
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 768915 - Generate build-related files that use GIMP version and ...
- Date: Sat, 22 Apr 2017 19:38:09 +0000 (UTC)
commit 28ef45707fd5ab9d7306a0c28557a4d0ff7c2d57
Author: Kristian Rietveld <kris loopnest org>
Date: Sat Apr 22 21:24:27 2017 +0200
Bug 768915 - Generate build-related files that use GIMP version and ...
We now generate info.plist during the build. There are multiple ways
to do this, but I settled on invoking sed from a Makefile. The problems
with other possible ways were:
- Although we could have used simple substitution from configure, this
would not include the last modification year. This could have been added
to configure, but we probably also want this to update within a make
clean - make cycle without re-running configure. For git-version.h
this is also done from a Makefile and not configure.
- Using the C preprocessor (that XCode apparently does) to generate
info.plist did not work properly.
- Using PListBuddy would reorder the entire info.plist file, making it
hard to inspect the changes made as a human.
build/Makefile.am | 3 ++-
build/osx/.gitignore | 3 +++
build/osx/Makefile.am | 23 +++++++++++++++++++++++
build/osx/README | 4 ++--
build/osx/{info.plist => info.plist.in} | 12 ++++++------
configure.ac | 1 +
6 files changed, 37 insertions(+), 9 deletions(-)
---
diff --git a/build/Makefile.am b/build/Makefile.am
index 30b2e5f..61107f4 100644
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = \
- windows
\ No newline at end of file
+ osx \
+ windows
diff --git a/build/osx/.gitignore b/build/osx/.gitignore
new file mode 100644
index 0000000..b7c7d08
--- /dev/null
+++ b/build/osx/.gitignore
@@ -0,0 +1,3 @@
+/Makefile
+/Makefile.in
+/info.plist
diff --git a/build/osx/Makefile.am b/build/osx/Makefile.am
new file mode 100644
index 0000000..e6155c5
--- /dev/null
+++ b/build/osx/Makefile.am
@@ -0,0 +1,23 @@
+
+# If not set in the environment, set the deployment target of what we
+# usually use to build GIMP 2.8.
+MACOSX_DEPLOYMENT_TARGET ?= 10.6
+
+EXTRA_DIST = info.plist
+
+all-local: info.plist
+
+define sedscript
+s/%GIMP_MAJOR_VERSION%/@GIMP_MAJOR_VERSION@/;\
+s/%GIMP_MINOR_VERSION%/@GIMP_MINOR_VERSION@/;\
+s/%GIMP_MICRO_VERSION%/@GIMP_MICRO_VERSION@/;\
+s/%MACOSX_DEPLOYMENT_TARGET%/$(MACOSX_DEPLOYMENT_TARGET)/
+endef
+
+info.plist: info.plist.in
+ @if test -d "$(top_srcdir)/.git"; then \
+ git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b
1-4`"; \
+ else \
+ git_last_commit_year="`date -u '+%Y'`"; \
+ fi; \
+ sed -e "$(sedscript)" -e "s/%GIMP_GIT_LAST_COMMIT_YEAR%/$$git_last_commit_year/" $< > $@
diff --git a/build/osx/README b/build/osx/README
index d9b3128..5decdbf 100644
--- a/build/osx/README
+++ b/build/osx/README
@@ -113,7 +113,6 @@ for GIMP 2.8:
$ curl -o $HOME/gimp/directory/gimp.bundle
https://git.gnome.org/browse/gimp/plain/build/osx/gimp.bundle?h=gimp-2-8 &&
curl -o $HOME/gimp/directory/launcher.sh
https://git.gnome.org/browse/gimp/plain/build/osx/launcher.sh?h=gimp-2-8 &&
chmod +x $HOME/gimp/directory/launcher.sh &&
- curl -o $HOME/gimp/directory/info.plist
https://git.gnome.org/browse/gimp/plain/build/osx/info.plist?h=gimp-2-8 &&
curl -o $HOME/gimp/directory/gimp.icns
https://git.gnome.org/browse/gimp/plain/build/osx/gimp.icns?h=gimp-2-8 &&
curl -o $HOME/gimp/directory/xcf.icns
https://git.gnome.org/browse/gimp/plain/build/osx/xcf.icns?h=gimp-2-8 &&
curl --create-dirs -o $HOME/gimp/directory/custom/fonts.conf
https://git.gnome.org/browse/gimp/plain/build/osx/custom/fonts.conf?h=gimp-2-8 &&
@@ -124,6 +123,7 @@ $ curl -o $HOME/gimp/directory/gimp.bundle https://git.gnome.org/browse/gimp/pla
curl -o $HOME/gimp/directory/custom/session.conf
https://git.gnome.org/browse/gimp/plain/build/osx/custom/session.conf?h=gimp-2-8
$ cp -p $HOME/gimp/10.6/source/gimp-2.8/desktop/gimp.desktop $HOME/gimp/directory/gimp.desktop
+$ cp -p $HOME/gimp/10.6/source/gimp-2.8/build/osx/info.plist $HOME/gimp/directory/info.plist
2. We also need to fix a few outstanding issues:
@@ -156,7 +156,7 @@ gimp.icns application icon
gimp.svg application icon
gimp.modules configuration for jhbuild
gimp.bundle configuration for gtk-mac-bundler
-info.plist OS X application metadata
+info.plist.in OS X application metadata (template)
launcher.sh GIMP starter in the OS X application package
patches Patches as long as they are not accepted upstream
xcf.icns application icon
diff --git a/build/osx/info.plist b/build/osx/info.plist.in
similarity index 98%
rename from build/osx/info.plist
rename to build/osx/info.plist.in
index b5a3dc7..f3b73d2 100644
--- a/build/osx/info.plist
+++ b/build/osx/info.plist.in
@@ -9,7 +9,7 @@
<key>CFBundleName</key>
<string>GIMP</string>
<key>CFBundleGetInfoString</key>
- <string>2.8.20, © 1995-2017 The GIMP Development Team</string>
+ <string>%GIMP_MAJOR_VERSION%.%GIMP_MINOR_VERSION%.%GIMP_MICRO_VERSION%, ©
1995-%GIMP_GIT_LAST_COMMIT_YEAR% The GIMP Development Team</string>
<key>CFBundleIconFile</key>
<string>gimp.icns</string>
<key>CFBundleIdentifier</key>
@@ -19,19 +19,19 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.8.20</string>
+ <string></string>
<key>CFBundleSignature</key>
<string>gimp</string>
<key>CFBundleVersion</key>
- <string>2.8.20</string>
+ <string>%GIMP_MAJOR_VERSION%.%GIMP_MINOR_VERSION%.%GIMP_MICRO_VERSION%</string>
<key>NSHumanReadableCopyright</key>
- <string>© 1995-2017 The GIMP Development Team</string>
+ <string>© 1995-%GIMP_GIT_LAST_COMMIT_YEAR% The GIMP Development Team</string>
<key>LSMinimumSystemVersion</key>
- <string>10.6.0</string>
+ <string>%MACOSX_DEPLOYMENT_TARGET%.0</string>
<key>LSMinimumSystemVersionByArchitecture</key>
<dict>
<key>x86_64</key>
- <string>10.6.0</string>
+ <string>%MACOSX_DEPLOYMENT_TARGET%.0</string>
</dict>
<key>NSHighResolutionCapable</key>
<true />
diff --git a/configure.ac b/configure.ac
index 4cfd7f1..207eb5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2307,6 +2307,7 @@ app/tests/gimpdir/brushes/Makefile
app/tests/gimpdir/gradients/Makefile
app/tests/gimpdir/patterns/Makefile
build/Makefile
+build/osx/Makefile
build/windows/Makefile
build/windows/gimp.rc
build/windows/gimp-plug-ins.rc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]