From cc1c75562925be828b024f2da14ac6152c6c5f51 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Wed, 26 Nov 2008 18:23:31 +0000 Subject: QPID-1243 : Applied patch from Robert Gemmell. Took a different approach for the linux binaries as the provided binaries requried a newer libc than I have. Also restored the qpidversion.properties file generation for this module that git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720931 13f79535-47bb-0310-9956-ffa450edef68 --- java/management/eclipse-plugin/bin/qpidmc.sh | 59 ++++---- java/management/eclipse-plugin/bin/qpidmc_gtk.sh | 8 +- java/management/eclipse-plugin/bin/qpidmc_motif.sh | 5 +- .../eclipse-plugin/build-release-common.properties | 17 +++ .../build-release-linux-gtk-x86.properties | 13 ++ .../build-release-win32-win32-x86.properties | 13 ++ java/management/eclipse-plugin/build-release.xml | 152 +++++++++++++++++++++ java/management/eclipse-plugin/build.xml | 55 ++++++++ .../qpid/management/ui/actions/VersionAction.java | 5 + .../main/resources/unix/configuration/config.ini | 4 +- .../src/main/resources/unix/eclipse.ini | 11 ++ 11 files changed, 309 insertions(+), 33 deletions(-) create mode 100644 java/management/eclipse-plugin/build-release-common.properties create mode 100644 java/management/eclipse-plugin/build-release-linux-gtk-x86.properties create mode 100644 java/management/eclipse-plugin/build-release-win32-win32-x86.properties create mode 100644 java/management/eclipse-plugin/build-release.xml create mode 100644 java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini (limited to 'java/management/eclipse-plugin') diff --git a/java/management/eclipse-plugin/bin/qpidmc.sh b/java/management/eclipse-plugin/bin/qpidmc.sh index 2472545a14..599d9bf7e0 100755 --- a/java/management/eclipse-plugin/bin/qpidmc.sh +++ b/java/management/eclipse-plugin/bin/qpidmc.sh @@ -18,14 +18,13 @@ # under the License. # -if [ "$JAVA_HOME" == "" ]; then - echo "The JAVA_HOME environment variable is not defined"; - exit 0; +if [ -z "$JAVA" ]; then + JAVA=java fi -if [ "$QPIDMC_HOME" == "" ]; then - echo "The QPIDMC_HOME environment variable is not defined correctly"; - exit 0; +if [ -z "$QPIDMC_HOME" ]; then + export QPIDMC_HOME=$(dirname $(dirname $(readlink -f $0))) + export PATH=${PATH}:${QPIDMC_HOME}/bin fi # Test if we're running on cygwin. @@ -38,27 +37,39 @@ if $cygwin; then QPIDMC_HOME=$(cygpath -w $QPIDMC_HOME) fi -os=win32 -ws=win32 -arch=x86 - -##echo $os -##echo $ws -##echo $arch ## If this is to be run on different platform other than windows then following parameters should be passed -## qpidmc.sh -## eg. qpidmc.sh linux motif x86 -if [ $# -eq 3 ]; then - os=$1 - ws=$2 - arch=$3 +## qpidmc.sh +## eg. qpidmc.sh motif + +if [ $# -eq 1 ] ; then + QPIDMC_WS=$1 +else + # If the WS is not set via QPIDMC_WS then query uname for the WS + if [ -z "$QPIDMC_WS" ] ; then + echo "Usage qpidmc.sh + echo "Alternatively set QPIDMC_WS to the windowing system you wish to use + exit 1 + fi +fi + +# If the OS is not set via QPIDMC_OS then query uname for the OS +if [ -z "$QPIDMC_OS" ] ; then + QPIDMC_OS=`uname | tr A-Z a-z` +else + # Force OS to be lower case + QPIDMC_OS=`echo $QPIDMC_OS | tr A-Z a-z` fi -if [ $os = "SunOS" ]; then - os="solaris" -elif [ $os = "Linux" ]; then - os="linux" +# If the ARCH is not set via QPIDMC_ARCH then query uname for the arch, +if [ -z "$QPIDMC_ARCH" ] ; then + QPIDMC_ARCH=`uname -i` fi -"$JAVA_HOME/bin/java" -Xms40m -Xmx256m -Declipse.consoleLog=false -jar $QPIDMC_HOME/eclipse/startup.jar org.eclipse.core.launcher.Main -launcher $QPIDMC_HOME/eclipse/eclipse -name "Qpid Management Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $os -ws $ws -arch $arch +# Note that it sometimes returns i386 which needs to be changed to x86 +if [ "$QPIDMC_ARCH" == "i386" ] ; then + QPIDMC_ARCH="x86" +fi + + +"$JAVA" -Xms40m -Xmx256m -Declipse.consoleLog=true -jar $QPIDMC_HOME/eclipse/startup.jar org.eclipse.core.launcher.Main -name "Qpid Management Console" -showsplash 600 -configuration "file:$QPIDMC_HOME/configuration" -os $QPIDMC_OS -ws $QPIDMC_WS -arch $QPIDMC_ARCH diff --git a/java/management/eclipse-plugin/bin/qpidmc_gtk.sh b/java/management/eclipse-plugin/bin/qpidmc_gtk.sh index 10b463d63b..1d55743d84 100755 --- a/java/management/eclipse-plugin/bin/qpidmc_gtk.sh +++ b/java/management/eclipse-plugin/bin/qpidmc_gtk.sh @@ -18,7 +18,9 @@ # under the License. # -os=`uname | tr A-Z a-z` -arch=`uname -p` +if [ -z "$QPIDMC_HOME" ]; then + export QPIDMC_HOME=$(dirname $(dirname $(readlink -f $0))) + export PATH=${PATH}:${QPIDMC_HOME}/bin +fi -$QPIDMC_HOME/bin/qpidmc.sh $os gtk $arch +$QPIDMC_HOME/bin/qpidmc.sh gtk diff --git a/java/management/eclipse-plugin/bin/qpidmc_motif.sh b/java/management/eclipse-plugin/bin/qpidmc_motif.sh index f53be75d87..f49759cc91 100755 --- a/java/management/eclipse-plugin/bin/qpidmc_motif.sh +++ b/java/management/eclipse-plugin/bin/qpidmc_motif.sh @@ -18,7 +18,4 @@ # under the License. # -os=`uname | tr A-Z a-z` -arch=`uname -p` - -$QPIDMC_HOME/bin/qpidmc.sh $os motif $arch +$QPIDMC_HOME/bin/qpidmc.sh motif diff --git a/java/management/eclipse-plugin/build-release-common.properties b/java/management/eclipse-plugin/build-release-common.properties new file mode 100644 index 0000000000..244448e322 --- /dev/null +++ b/java/management/eclipse-plugin/build-release-common.properties @@ -0,0 +1,17 @@ +artifactId=org.apache.qpid.management.ui +mcplugin.version=0.1.0-${project.version} +mcplugin.filename=${artifactId}_${mcplugin.version} + +mcplugin.contents.dir=${module.classes} + +mcplugin.manifest=${module.manifest} + +bin.dir=bin + +startup.jar=src/main/resources/startup.jar + +eclipse.ini=src/main/resources/eclipse.ini + +license.eclipse.txt=src/main/resources/license.eclipse.txt + +jmxremote.sasl.manifest=src/main/resources/sasl/MANIFEST.MF diff --git a/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties b/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties new file mode 100644 index 0000000000..5eeb771bb2 --- /dev/null +++ b/java/management/eclipse-plugin/build-release-linux-gtk-x86.properties @@ -0,0 +1,13 @@ +release.name=${module.namever}-linux-gtk-x86 + +release.subdir=${module.release.base}/${release.name} + +release.tar.gz=${module.release.base}/${release.name}.tar.gz + +eclipse.ini=src/main/resources/unix/eclipse.ini + +rcp.libs=${management-eclipse-plugin-linux-gtk-x86.libs} + +rcp.configuration.dir=src/main/resources/unix/configuration + +bin.includes=qpidmc.sh qpidmc_gtk.sh diff --git a/java/management/eclipse-plugin/build-release-win32-win32-x86.properties b/java/management/eclipse-plugin/build-release-win32-win32-x86.properties new file mode 100644 index 0000000000..a41bd5a54a --- /dev/null +++ b/java/management/eclipse-plugin/build-release-win32-win32-x86.properties @@ -0,0 +1,13 @@ +release.name=${module.namever}-win32-win32-x86 + +release.subdir=${module.release.base}/${release.name} + +release.zip=${module.release.base}/${release.name}.zip + +eclipse.executable=src/main/resources/eclipse.exe + +rcp.libs=${management-eclipse-plugin-win32-win32-x86.libs} + +rcp.configuration.dir=src/main/resources/win32/configuration + +bin.includes=qpidmc.bat \ No newline at end of file diff --git a/java/management/eclipse-plugin/build-release.xml b/java/management/eclipse-plugin/build-release.xml new file mode 100644 index 0000000000..b116fcb55c --- /dev/null +++ b/java/management/eclipse-plugin/build-release.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/eclipse-plugin/build.xml b/java/management/eclipse-plugin/build.xml index 492783e574..5cfd13f2a5 100644 --- a/java/management/eclipse-plugin/build.xml +++ b/java/management/eclipse-plugin/build.xml @@ -24,4 +24,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java index 11db02f5a2..be69fadbe8 100644 --- a/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java +++ b/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/VersionAction.java @@ -57,6 +57,11 @@ public class VersionAction extends Action _text = "Build Version : " + _buildVersion + "\n" + "Release Version : " + _releaseVersion; } + else + { + _text = "Build Version : \n" + + "Release Version : "; + } } catch (Exception ex) { diff --git a/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini index aa2d21fd48..5bbf344c17 100644 --- a/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini +++ b/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini @@ -22,6 +22,6 @@ osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui eclipse.product=org.apache.qpid.management.ui.product eclipse.application=org.apache.qpid.management.ui.application -osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.motif.linux.x86,org.eclipse.swt.gtk.linux.x86_64,org.eclipse.swt.gtk.linux.x86,org.eclipse.swt.gtk.linux.ppc,org.eclipse.swt.motif.hpux.PA_RISC,org.eclipse.swt.gtk.solaris.sparc,org.eclipse.swt.motif.solaris.sparc,org.eclipse.swt.carbon.macocx,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench +osgi.bundles=org.eclipse.equinox.common@2:start,org.eclipse.core.runtime@start,com.ibm.icu,org.apache.qpid.management.ui,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.jobs,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.jface,org.eclipse.swt,org.eclipse.swt.gtk.linux.x86,org.eclipse.ui,org.eclipse.ui.forms,org.eclipse.ui.workbench,jmxremote.sasl osgi.bundles.defaultStartLevel=4 -eof=eof \ No newline at end of file +eof=eof diff --git a/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini b/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini new file mode 100644 index 0000000000..33884bd8f1 --- /dev/null +++ b/java/management/eclipse-plugin/src/main/resources/unix/eclipse.ini @@ -0,0 +1,11 @@ +-startup +plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar +--launcher.library +plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805 +#-showsplash +#org.eclipse.platform +--launcher.XXMaxPermSize +256m +-vmargs +-Xms40m +-Xmx256m -- cgit v1.2.1