/hg/icedtea-web: add symlinks under JDK_HOME/jre/bin and make ja...
omajid at icedtea.classpath.org
omajid at icedtea.classpath.org
Wed Dec 15 07:18:08 PST 2010
changeset 9397074c2c39 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9397074c2c39
author: Omair Majid <omajid at redhat.com>
date: Wed Dec 15 10:17:51 2010 -0500
add symlinks under JDK_HOME/jre/bin and make javaws work without
them too
2010-12-15 Omair Majid <omajid at redhat.com>
* Makefile.am (install-exec-local): Install plugin.jar as
data. If $(prefix)/jre/bin exists, then install symlinks to real
javaws and itweb-settings binaries under it.
($(NETX_DIR)/launcher/%.o): Set system property java.icedtea-web.bin
to point to the installed location of the javaws binary.
* netx/net/sourceforge/jnlp/Launcher.java (launchExternal): Use the
system property java.icedtea-web.bin to locate javaws binary.
diffstat:
3 files changed, 40 insertions(+), 8 deletions(-)
ChangeLog | 11 +++++++++++
Makefile.am | 30 +++++++++++++++++++++++++++---
netx/net/sourceforge/jnlp/Launcher.java | 7 ++-----
diffs (95 lines):
diff -r c45620d437e1 -r 9397074c2c39 ChangeLog
--- a/ChangeLog Wed Dec 15 09:31:48 2010 -0500
+++ b/ChangeLog Wed Dec 15 10:17:51 2010 -0500
@@ -1,3 +1,14 @@ 2010-12-15 Andrew Su <asu at redhat.com>
+2010-12-15 Omair Majid <omajid at redhat.com>
+
+ * Makefile.am
+ (install-exec-local): Install plugin.jar as data. If $(prefix)/jre/bin
+ exists, then install symlinks to real javaws and itweb-settings binaries
+ under it.
+ ($(NETX_DIR)/launcher/%.o): Set system property java.icedtea-web.bin to
+ point to the installed location of the javaws binary.
+ * netx/net/sourceforge/jnlp/Launcher.java (launchExternal): Use the system
+ property java.icedtea-web.bin to locate javaws binary.
+
2010-12-15 Andrew Su <asu at redhat.com>
* /netx/net/sourceforge/jnlp/resources/Messages.properties: Changed
diff -r c45620d437e1 -r 9397074c2c39 Makefile.am
--- a/Makefile.am Wed Dec 15 09:31:48 2010 -0500
+++ b/Makefile.am Wed Dec 15 10:17:51 2010 -0500
@@ -106,12 +106,28 @@ if ENABLE_PLUGIN
if ENABLE_PLUGIN
${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/
${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir)
- ${INSTALL_PROGRAM} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar
+ ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar
endif
${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar
${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir)
+ if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \
+ if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \
+ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \
+ fi ; \
+ if [ ! -e $(prefix)/jre/bin/javaws ] ; then \
+ ln -s $(DESTDIR)$(bindir)/javaws $(DESTDIR)$(prefix)/jre/bin ; \
+ fi ; \
+ fi
${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib
${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir)
+ if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \
+ if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \
+ rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \
+ fi ; \
+ if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \
+ ln -s $(DESTDIR)$(bindir)/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \
+ fi ; \
+ fi
install-data-local:
${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1
@@ -142,7 +158,14 @@ uninstall-local:
rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1
rm -f $(DESTDIR)$(bindir)/pluginappletviewer
rm -f $(DESTDIR)$(bindir)/javaws
+ if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \
+ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \
+ fi
+ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws
rm -f $(DESTDIR)$(bindir)/itweb-settings
+ if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \
+ rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \
+ fi
rm -rf $(DESTDIR)$(htmldir)
# Plugin
@@ -325,8 +348,9 @@ extra-lib/about.jar: stamps/extra-class-
$(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c
mkdir -p $(NETX_DIR)/launcher && \
- $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "-J-ms8m", "net.sourceforge.jnlp.runtime.Boot", }' -DPROGNAME='"javaws"' \
- -c -o $@ $<
+ $(CC) $(LAUNCHER_FLAGS) \
+ -DJAVA_ARGS='{ "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \
+ -DPROGNAME='"javaws"' -c -o $@ $<
$(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c
mkdir -p $(NETX_DIR)/launcher/controlpanel && \
diff -r c45620d437e1 -r 9397074c2c39 netx/net/sourceforge/jnlp/Launcher.java
--- a/netx/net/sourceforge/jnlp/Launcher.java Wed Dec 15 09:31:48 2010 -0500
+++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Dec 15 10:17:51 2010 -0500
@@ -329,11 +329,8 @@ public class Launcher {
List<String> commands = new LinkedList<String>();
- String pathToWebstartBinary = System.getProperty("java.home") +
- File.separatorChar +
- "bin" +
- File.separatorChar +
- "javaws";
+ // this property is set by the javaws launcher to point to the javaws binary
+ String pathToWebstartBinary = System.getProperty("java.icedtea-web.bin");
commands.add(pathToWebstartBinary);
// use -Jargument format to pass arguments to the JVM through the launcher
for (String arg : vmArgs) {
More information about the distro-pkg-dev
mailing list