/hg/icedtea-web: Synchronized launchers to be from one source
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Mon May 20 07:22:22 PDT 2013
changeset 9e1f7dc48c20 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9e1f7dc48c20
author: Jiri Vanek <jvanek at redhat.com>
date: Mon May 20 16:22:44 2013 +0200
Synchronized launchers to be from one source
diffstat:
ChangeLog | 14 +++++++
Makefile.am | 23 +++++++----
launcher/itweb-settings.in | 29 --------------
launcher/javaws.in | 91 ----------------------------------------------
launcher/launchers.in | 91 ++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 120 insertions(+), 128 deletions(-)
diffs (288 lines):
diff -r 3dd0ae4efe78 -r 9e1f7dc48c20 ChangeLog
--- a/ChangeLog Mon May 20 15:13:32 2013 +0200
+++ b/ChangeLog Mon May 20 16:22:44 2013 +0200
@@ -1,3 +1,17 @@
+2013-05-20 Jiri Vanek <jvanek at redhat.com>
+
+ Synchronized launchers to be from one source
+ * Makefile.am: (edit_launcher_script) is now accepting variables
+ (launcher.build/$(javaws)) no depends on launcher/launchers.in instead of
+ launcher/javaws.in and is filling the variables for javaws
+ (launcher.build/$(itweb_settings)) no depends on launcher/launchers.in instead of
+ launcher/itweb_settings.in and is filling the variables for itweb_settings
+ * launcher/itweb-settings.in: removed
+ * launcher/javaws.in: removed
+ * launcher/launchers.in: new file, substitution of removed (itweb-settings.in)
+ and javaws.in. Mostly based on javaws.in, just (CLASSNAME) and (PROGRAM_NAME)
+ and (BINARY_LOCATION) were made more general.
+
2013-05-20 Jiri Vanek <jvanek at redhat.com>
Fixed possible deadlock for applet->js->applet call
diff -r 3dd0ae4efe78 -r 9e1f7dc48c20 Makefile.am
--- a/Makefile.am Mon May 20 15:13:32 2013 +0200
+++ b/Makefile.am Mon May 20 16:22:44 2013 +0200
@@ -205,12 +205,13 @@
# the launcher needs to know $(bindir) and $(datadir) which can be different at
# make-time from configure-time
edit_launcher_script = sed \
- -e 's|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g' \
- -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/$(javaws)|g' \
- -e 's|[@]JAVAWS_SPLASH_LOCATION[@]|$(datadir)/$(PACKAGE_NAME)/javaws_splash.png|g' \
- -e 's|[@]ITWEB_SETTINGS_BIN_LOCATION[@]|$(bindir)/$(itweb_settings)|g' \
- -e 's|[@]JAVA[@]|$(JAVA)|g' \
- -e 's|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g'
+ -e "s|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g" \
+ -e "s|[@]JAVAWS_SPLASH_LOCATION[@]|$(datadir)/$(PACKAGE_NAME)/javaws_splash.png|g" \
+ -e "s|[@]JAVA[@]|$(JAVA)|g" \
+ -e "s|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g" \
+ -e "s|[@]MAIN_CLASS[@]|$${MAIN_CLASS}|g" \
+ -e "s|[@]BIN_LOCATION[@]|$${BIN_LOCATION}|g" \
+ -e "s|[@]PROGRAM_NAME[@]|$${PROGRAM_NAME}|g"
# Top-Level Targets
# =================
@@ -519,12 +520,18 @@
extra-lib/about.jar: stamps/extra-class-files.stamp
$(BOOT_DIR)/bin/jar cf $@ -C extra-lib net ;
-launcher.build/$(javaws): launcher/javaws.in
+launcher.build/$(javaws): launcher/launchers.in
mkdir -p launcher.build
+ MAIN_CLASS=net.sourceforge.jnlp.runtime.Boot ;\
+ BIN_LOCATION=$(bindir)/$(javaws) ;\
+ PROGRAM_NAME=$(javaws) ;\
$(edit_launcher_script) < $< > $@
-launcher.build/$(itweb_settings): launcher/itweb-settings.in
+launcher.build/$(itweb_settings): launcher/launchers.in
mkdir -p launcher.build
+ MAIN_CLASS=net.sourceforge.jnlp.controlpanel.CommandLine ;\
+ BIN_LOCATION=$(bindir)/$(itweb_settings) ;\
+ PROGRAM_NAME=$(itweb_settings) ;\
$(edit_launcher_script) < $< > $@
clean-launchers:
diff -r 3dd0ae4efe78 -r 9e1f7dc48c20 launcher/itweb-settings.in
--- a/launcher/itweb-settings.in Mon May 20 15:13:32 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-JAVA=@JAVA@
-LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@
-LAUNCHER_FLAGS=-Xms8m
-CLASSNAME=net.sourceforge.jnlp.controlpanel.CommandLine
-BINARY_LOCATION=@ITWEB_SETTINGS_BIN_LOCATION@
-PROGRAM_NAME=itweb-settings
-
-PROPERTY_NAME=deployment.jre.dir
-CUSTOM_JRE_REGEX="^$PROPERTY_NAME *= *"
-CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" ~/.icedtea/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
-if [ "x$CUSTOM_JRE" = "x" ] ; then
- CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" /etc/.java/.deploy/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
-fi;
-if [ "x$CUSTOM_JRE" != "x" ] ; then
- if [ -e "$CUSTOM_JRE" -a -e "$CUSTOM_JRE/bin/java" ] ; then
- JAVA=$CUSTOM_JRE/bin/java
- else
- echo "Your custom JRE $CUSTOM_JRE read from deployment.properties under key $PROPERTY_NAME as $CUSTOM_JRE is not valid. Using default ($JAVA) in attempt to start. Please fix this."
- fi
-fi;
-
-${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \
- -Dicedtea-web.bin.name=${PROGRAM_NAME} \
- -Dicedtea-web.bin.location=${BINARY_LOCATION} \
- ${CLASSNAME} \
- $@
-
diff -r 3dd0ae4efe78 -r 9e1f7dc48c20 launcher/javaws.in
--- a/launcher/javaws.in Mon May 20 15:13:32 2013 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-#!/bin/sh
-
-JAVA=@JAVA@
-LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@
-LAUNCHER_FLAGS=-Xms8m
-CLASSNAME=net.sourceforge.jnlp.runtime.Boot
-BINARY_LOCATION=@JAVAWS_BIN_LOCATION@
-SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
-PROGRAM_NAME=javaws
-CP=@JRE@/lib/rt.jar
-
-PROPERTY_NAME=deployment.jre.dir
-CUSTOM_JRE_REGEX="^$PROPERTY_NAME *= *"
-CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" ~/.icedtea/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
-if [ "x$CUSTOM_JRE" = "x" ] ; then
- CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" /etc/.java/.deploy/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
-fi;
-if [ "x$CUSTOM_JRE" != "x" ] ; then
- if [ -e "$CUSTOM_JRE" -a -e "$CUSTOM_JRE/bin/java" -a -e "$CUSTOM_JRE/lib/rt.jar" ] ; then
- JAVA=$CUSTOM_JRE/bin/java
- CP=$CUSTOM_JRE/lib/rt.jar
- else
- echo "Your custom JRE $CUSTOM_JRE read from deployment.properties under key $PROPERTY_NAME as $CUSTOM_JRE is not valid. Using default ($JAVA, $CP) in attempt to start. Please fix this."
- fi
-fi;
-
-JAVA_ARGS=( )
-ARGS=( )
-COMMAND=()
-
-i=0
-j=0
-
-SPLASH="false"
-if [ "x$ICEDTEA_WEB_SPLASH" = "x" ] ; then
-SPLASH="true"
-fi;
-while [ "$#" -gt "0" ]; do
- case "$1" in
- -J*)
- JAVA_ARGS[$i]="${1##-J}"
- i=$((i+1))
- ;;
- *)
- ARGS[$j]="$1"
- j=$((j+1))
- if [ "$1" = "-headless" ] ; then
- SPLASH="false"
- fi
- ;;
- esac
- shift
-done
-
-k=0
-COMMAND[k]="${JAVA}"
-k=$((k+1))
-if [ "$SPLASH" = "true" ] ; then
-COMMAND[k]="-splash:${SPLASH_LOCATION}"
-k=$((k+1))
-fi;
-COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
-k=$((k+1))
-COMMAND[k]="${LAUNCHER_FLAGS}"
-k=$((k+1))
-i=0
-while [ "$i" -lt "${#JAVA_ARGS[@]}" ]; do
- COMMAND[k]="${JAVA_ARGS[$i]}"
- i=$((i+1))
- k=$((k+1))
-done
-COMMAND[k]="-classpath"
-k=$((k+1))
-COMMAND[k]="${CP}"
-k=$((k+1))
-COMMAND[k]="-Dicedtea-web.bin.name=${PROGRAM_NAME}"
-k=$((k+1))
-COMMAND[k]="-Dicedtea-web.bin.location=${BINARY_LOCATION}"
-k=$((k+1))
-COMMAND[k]="${CLASSNAME}"
-k=$((k+1))
-j=0
-while [ "$j" -lt "${#ARGS[@]}" ]; do
- COMMAND[k]="${ARGS[$j]}"
- j=$((j+1))
- k=$((k+1))
-done
-
-exec -a "javaws" "${COMMAND[@]}"
-
-exit $?
diff -r 3dd0ae4efe78 -r 9e1f7dc48c20 launcher/launchers.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/launcher/launchers.in Mon May 20 16:22:44 2013 +0200
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+JAVA=@JAVA@
+LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@
+LAUNCHER_FLAGS=-Xms8m
+CLASSNAME=@MAIN_CLASS@
+BINARY_LOCATION=@BIN_LOCATION@
+SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
+PROGRAM_NAME=@PROGRAM_NAME@
+CP=@JRE@/lib/rt.jar
+
+PROPERTY_NAME=deployment.jre.dir
+CUSTOM_JRE_REGEX="^$PROPERTY_NAME *= *"
+CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" ~/.icedtea/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
+if [ "x$CUSTOM_JRE" = "x" ] ; then
+ CUSTOM_JRE=`grep "$CUSTOM_JRE_REGEX" /etc/.java/.deploy/deployment.properties 2>/dev/null | sed "s/$CUSTOM_JRE_REGEX//g"`
+fi;
+if [ "x$CUSTOM_JRE" != "x" ] ; then
+ if [ -e "$CUSTOM_JRE" -a -e "$CUSTOM_JRE/bin/java" -a -e "$CUSTOM_JRE/lib/rt.jar" ] ; then
+ JAVA=$CUSTOM_JRE/bin/java
+ CP=$CUSTOM_JRE/lib/rt.jar
+ else
+ echo "Your custom JRE $CUSTOM_JRE read from deployment.properties under key $PROPERTY_NAME as $CUSTOM_JRE is not valid. Using default ($JAVA, $CP) in attempt to start. Please fix this."
+ fi
+fi;
+
+JAVA_ARGS=( )
+ARGS=( )
+COMMAND=()
+
+i=0
+j=0
+
+SPLASH="false"
+if [ "x$ICEDTEA_WEB_SPLASH" = "x" ] ; then
+SPLASH="true"
+fi;
+while [ "$#" -gt "0" ]; do
+ case "$1" in
+ -J*)
+ JAVA_ARGS[$i]="${1##-J}"
+ i=$((i+1))
+ ;;
+ *)
+ ARGS[$j]="$1"
+ j=$((j+1))
+ if [ "$1" = "-headless" ] ; then
+ SPLASH="false"
+ fi
+ ;;
+ esac
+ shift
+done
+
+k=0
+COMMAND[k]="${JAVA}"
+k=$((k+1))
+if [ "$SPLASH" = "true" ] ; then
+COMMAND[k]="-splash:${SPLASH_LOCATION}"
+k=$((k+1))
+fi;
+COMMAND[k]="${LAUNCHER_BOOTCLASSPATH}"
+k=$((k+1))
+COMMAND[k]="${LAUNCHER_FLAGS}"
+k=$((k+1))
+i=0
+while [ "$i" -lt "${#JAVA_ARGS[@]}" ]; do
+ COMMAND[k]="${JAVA_ARGS[$i]}"
+ i=$((i+1))
+ k=$((k+1))
+done
+COMMAND[k]="-classpath"
+k=$((k+1))
+COMMAND[k]="${CP}"
+k=$((k+1))
+COMMAND[k]="-Dicedtea-web.bin.name=${PROGRAM_NAME}"
+k=$((k+1))
+COMMAND[k]="-Dicedtea-web.bin.location=${BINARY_LOCATION}"
+k=$((k+1))
+COMMAND[k]="${CLASSNAME}"
+k=$((k+1))
+j=0
+while [ "$j" -lt "${#ARGS[@]}" ]; do
+ COMMAND[k]="${ARGS[$j]}"
+ j=$((j+1))
+ k=$((k+1))
+done
+
+exec -a "$PROGRAM_NAME" "${COMMAND[@]}"
+
+exit $?
More information about the distro-pkg-dev
mailing list