Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2006-12-05 16:56:56 -0500
committerAndrew Niefer2006-12-05 16:56:56 -0500
commitdf79a8d6117a5778bf28b6f468b0f42c0b026dc8 (patch)
tree7e45edf17164e808735cb059de0992a28014133c /bundles/org.eclipse.equinox.executable/library/win32/build.sh
parent234f2e8893c4de279f7ebc545b01e249d05335f3 (diff)
downloadrt.equinox.framework-df79a8d6117a5778bf28b6f468b0f42c0b026dc8.tar.gz
rt.equinox.framework-df79a8d6117a5778bf28b6f468b0f42c0b026dc8.tar.xz
rt.equinox.framework-df79a8d6117a5778bf28b6f468b0f42c0b026dc8.zip
Moving launcher code from equinox-incubator/org.eclipse.equinox.launcher
(formely from platform-launcher)
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/win32/build.sh')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/win32/build.sh76
1 files changed, 76 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/win32/build.sh b/bundles/org.eclipse.equinox.executable/library/win32/build.sh
new file mode 100644
index 000000000..386f81d59
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/win32/build.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+#*******************************************************************************
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Kevin Cornell (Rational Software Corporation)
+#*******************************************************************************
+#
+# Usage: sh build.sh [<optional switches>] [clean]
+#
+# where the optional switches are:
+# -output <PROGRAM_OUTPUT> - executable filename ("eclipse")
+# -os <DEFAULT_OS> - default Eclipse "-os" value
+# -arch <DEFAULT_OS_ARCH> - default Eclipse "-arch" value
+# -ws <DEFAULT_WS> - default Eclipse "-ws" value
+#
+#
+# This script can also be invoked with the "clean" argument.
+
+cd `dirname $0`
+
+# Define default values for environment variables used in the makefiles.
+programOutput="eclipse.exe"
+defaultOS="win32"
+defaultOSArch="x86"
+defaultWS="win32"
+makefile="make_mingw.mak"
+OS="Windows"
+
+# Parse the command line arguments and override the default values.
+extraArgs=""
+while [ "$1" != "" ]; do
+ if [ "$1" = "-os" ] && [ "$2" != "" ]; then
+ defaultOS="$2"
+ shift
+ elif [ "$1" = "-arch" ] && [ "$2" != "" ]; then
+ defaultOSArch="$2"
+ shift
+ elif [ "$1" = "-ws" ] && [ "$2" != "" ]; then
+ defaultWS="$2"
+ shift
+ elif [ "$1" = "-output" ] && [ "$2" != "" ]; then
+ programOutput="$2"
+ shift
+ else
+ extraArgs="$extraArgs $1"
+ fi
+ shift
+done
+
+# Set up environment variables needed by the makefiles.
+PROGRAM_OUTPUT="$programOutput"
+DEFAULT_OS="$defaultOS"
+DEFAULT_OS_ARCH="$defaultOSArch"
+DEFAULT_WS="$defaultWS"
+OUTPUT_DIR=../../bin/$defaultWS/$defaultOS/$defaultOSArch
+
+export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS
+
+# If the OS is supported (a makefile exists)
+if [ "$makefile" != "" ]; then
+ if [ "$extraArgs" != "" ]; then
+ make -f $makefile $extraArgs
+ else
+ echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS"
+ make -f $makefile clean
+ make -f $makefile all
+ fi
+else
+ echo "Unknown OS ($OS) -- build aborted"
+fi

Back to the top