[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-distro-pkg-dev
Subject:    /hg/icedtea-web: Use name and version as defined in configure.ac...
From:       omajid () icedtea ! classpath ! org (omajid at icedtea ! classpath ! org)
Date:       2011-01-28 16:42:04
Message-ID: hg.43c8a57314af.1296232924.8643924302249223276 () icedtea ! classpath ! org
[Download RAW message or body]

changeset 43c8a57314af in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=43c8a57314af
author: Omair Majid <omajid at redhat.com>
date: Fri Jan 28 11:41:23 2011 -0500

	Use name and version as defined in configure.ac instead of
	hardcoding it in Boot.java

	Use PACKAGE_NAME and FULL_VERSION as defined during build time
	rather than hardcoding them in net.sourceforge.jnlp.runtime.Boot.
	Generate a manifest file at build time, and define Implementation-
	Title and Implementation-Version to PACKAGE_NAME and FULL_VERSION.
	Use these values from the manifest file when displaying project name
	and version, rather than hardcoding "netx" and 0.5.

	2011-01-28 Omair Majid <omajid at redhat.com>

	 * Makefile.am: Move ICEDTEA_REV, ICEDTEA_PKG to acinclude.m4.
	Use FULL_VERSION. (stamps/netx-dist.stamp): Depend on
	netx.manifest. Use this file as the jar file manifest.
	    * acinclude.m4 (IT_SET_VERSION): New macro. Defines FULL_VERSION.
	    * configure.ac: Add netx.manifest to AC_CONFIG_FILES. Invoke
	IT_SET_VERSION.
	    * netx.manifest.in: New file.
	    * netx/net/sourceforge/jnlp/runtime/Boot.java: Set name and version
	using information from the manifest file.


diffstat:

6 files changed, 40 insertions(+), 15 deletions(-)
ChangeLog                                   |   13 +++++++++++++
Makefile.am                                 |   14 ++++----------
acinclude.m4                                |   16 ++++++++++++++++
configure.ac                                |    5 ++---
netx.manifest.in                            |    2 ++
netx/net/sourceforge/jnlp/runtime/Boot.java |    5 +++--

diffs (128 lines):

diff -r 712dd97dc800 -r 43c8a57314af ChangeLog
--- a/ChangeLog	Thu Jan 27 12:56:40 2011 -0500
+++ b/ChangeLog	Fri Jan 28 11:41:23 2011 -0500
@@ -1,3 +1,16 @@ 2011-01-27  Omair Majid  <omajid at redhat.
+2011-01-28  Omair Majid  <omajid at redhat.com>
+
+	* Makefile.am: Move ICEDTEA_REV, ICEDTEA_PKG to acinclude.m4. Use
+	FULL_VERSION.
+	(stamps/netx-dist.stamp): Depend on netx.manifest. Use this file as the
+	jar file manifest.
+	* acinclude.m4 (IT_SET_VERSION): New macro. Defines FULL_VERSION.
+	* configure.ac: Add netx.manifest to AC_CONFIG_FILES. Invoke
+	IT_SET_VERSION.
+	* netx.manifest.in: New file.
+	* netx/net/sourceforge/jnlp/runtime/Boot.java: Set name and version using
+	information from the manifest file.
+
 2011-01-27  Omair Majid  <omajid at redhat.com>
 
 	* netx/net/sourceforge/jnlp/resources/Messages.properties: Add
diff -r 712dd97dc800 -r 43c8a57314af Makefile.am
--- a/Makefile.am	Thu Jan 27 12:56:40 2011 -0500
+++ b/Makefile.am	Fri Jan 28 11:41:23 2011 -0500
@@ -54,13 +54,6 @@ else
   SRC_DIR_LINK = $(REFLINK)
 endif
 
-if HAS_ICEDTEA_REVISION
-ICEDTEA_REV = +${ICEDTEA_REVISION}
-endif
-if HAS_PKGVERSION
-ICEDTEA_PKG = $(EMPTY) (${PKGVERSION})
-endif
-
 if ENABLE_DOCS
 JAVADOC_OPTS=-use -keywords -encoding UTF-8 -splitIndex \
  -bottom '<font size="-1"> <a href="http://icedtea.classpath.org/bugzilla">Submit a \
bug or feature</a></font>' @@ -82,7 +75,7 @@ LAUNCHER_FLAGS = -O2 -fno-strict-aliasin
 	-DEXPAND_CLASSPATH_WILDCARDS
 LAUNCHER_LINK = -o $@ -pthread -Xlinker -O1 -Xlinker -z -Xlinker defs \
                -L$(BOOT_DIR)/lib/$(INSTALL_ARCH_DIR) \
 	-Wl,-soname=lib.so -Wl,-z -Wl,origin -Wl,--allow-shlib-undefined $(X11_CFLAGS) \
                $(X11_LIBS) -ldl -lz
-PLUGIN_VERSION = IcedTea-Web $(PACKAGE_VERSION)$(ICEDTEA_REV)$(ICEDTEA_PKG)
+PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION)
 
 EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in \
extra launcher \  itweb-settings.desktop.in
@@ -298,10 +291,11 @@ stamps/netx.stamp: netx-source-files.txt
 	mkdir -p stamps
 	touch $@
 
-stamps/netx-dist.stamp: stamps/netx.stamp
+stamps/netx-dist.stamp: stamps/netx.stamp $(abs_top_builddir)/netx.manifest
 	(cd $(NETX_DIR) ; \
 	 mkdir -p lib ; \
-	 $(BOOT_DIR)/bin/jar cf lib/classes.jar javax/jnlp net ; \
+	 $(BOOT_DIR)/bin/jar cfm lib/classes.jar \
+	  $(abs_top_builddir)/netx.manifest javax/jnlp net ; \
 	 cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \
 	 find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \
 	 cd src ; \
diff -r 712dd97dc800 -r 43c8a57314af acinclude.m4
--- a/acinclude.m4	Thu Jan 27 12:56:40 2011 -0500
+++ b/acinclude.m4	Fri Jan 28 11:41:23 2011 -0500
@@ -667,3 +667,19 @@ fi
 fi
 AC_PROVIDE([$0])dnl
 ])
+
+AC_DEFUN_ONCE([IT_SET_VERSION],
+[
+  AC_REQUIRE([IT_OBTAIN_HG_REVISIONS])
+  AC_REQUIRE([IT_GET_PKGVERSION])
+  AC_MSG_CHECKING([what version string to use])
+  if test "x${ICEDTEA_REVISION}" != xnone; then
+    ICEDTEA_REV="+${ICEDTEA_REVISION}"
+  fi
+  if test "x${PKGVERSION}" != "xnone"; then
+    ICEDTEA_PKG=" (${PKGVERSION})"
+  fi
+  FULL_VERSION="${PACKAGE_VERSION}${ICEDTEA_REV}${ICEDTEA_PKG}"
+  AC_MSG_RESULT([${FULL_VERSION}])
+  AC_SUBST([FULL_VERSION])
+])
diff -r 712dd97dc800 -r 43c8a57314af configure.ac
--- a/configure.ac	Thu Jan 27 12:56:40 2011 -0500
+++ b/configure.ac	Fri Jan 28 11:41:23 2011 -0500
@@ -1,6 +1,6 @@ AC_INIT([icedtea-web],[1.1pre],[distro-p
 AC_INIT([icedtea-web],[1.1pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], \
[http://icedtea.classpath.org/wiki/IcedTea-Web])  AM_INIT_AUTOMAKE([1.9 tar-pax \
                foreign])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile netx.manifest])
 
 # Older automake doesn't generate these correctly
 abs_top_builddir=`pwd -P`
@@ -35,8 +35,7 @@ IT_FIND_JAVADOC
 IT_FIND_JAVADOC
 AC_CONFIG_FILES([javac], [chmod +x javac])
 
-IT_GET_PKGVERSION
-IT_OBTAIN_HG_REVISIONS
+IT_SET_VERSION
 IT_CHECK_XULRUNNER_VERSION
 
 AC_CHECK_LIB(z, main,, [AC_MSG_ERROR("zlib not found - try installing zlib-devel")])
diff -r 712dd97dc800 -r 43c8a57314af netx.manifest.in
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx.manifest.in	Fri Jan 28 11:41:23 2011 -0500
@@ -0,0 +1,2 @@
+Implementation-Title: @PACKAGE_NAME@
+Implementation-Version: @FULL_VERSION@
diff -r 712dd97dc800 -r 43c8a57314af netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Thu Jan 27 12:56:40 2011 -0500
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Fri Jan 28 11:41:23 2011 -0500
@@ -58,11 +58,12 @@ public final class Boot implements Privi
     // todo: decide whether a spawned netx (external launch)
     // should inherit the same options as this instance (store argv?)
 
-    private static final String version = "0.5";
+    private static final String name = \
Boot.class.getPackage().getImplementationTitle(); +    private static final String \
version = Boot.class.getPackage().getImplementationVersion();  
     /** the text to display before launching the about link */
     private static final String aboutMessage = ""
-            + "netx v" + version + " - (C)2001-2003 Jon A. Maxwell (jmaxwell at \
users.sourceforge.net)\n" +            + name + " " + version
             + "\n"
             + R("BLaunchAbout");
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic