create-webstart-standalone.sh revision 3488
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Determine the location to this script so that we know where we are in the
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# OpenDS source tree.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fostercd "${SCRIPT_DIR}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Make sure that a few constants are defined that will be needed to build the
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# web start archive.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${PROTOCOL}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "PROTOCOL: ${PROTOCOL}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${ADDRESS}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "ADDRESS: ${ADDRESS}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "PORT: ${PORT}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${BASE_PATH}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "BASE_PATH: ${BASE_PATH}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${INSTALL_JNLP_FILENAME}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "INSTALL_JNLP_FILENAME: ${INSTALL_JNLP_FILENAME}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${PORT}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster INSTALLER_URI="${PROTOCOL}://${ADDRESS}${BASE_PATH}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster INSTALLER_URI="${PROTOCOL}://${ADDRESS}:${PORT}${BASE_PATH}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# See if we can find the location of the dependencies in the Java environment.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# If not, then fail.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test -z "${JAVA_HOME}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster JAVA_HOME=`java -cp ${ROOT_DIR}/resource FindJavaHome 2> /dev/null`
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster if test -z "${JAVA_HOME}"
8d3140b524c0e28c0a49dc7c7d481123ef3cfe11Chris Lee echo "Please set JAVA_HOME to the root of a Java 5.0 installation."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test ! -x "${JAR}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo "ERROR: Cannot find the ${JAR} utility."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo " Is JAVA_HOME set correctly?"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo " It should point to the root of a JDK (not a JRE) installation"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test ! -x "${JARSIGNER}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo "ERROR: Cannot find the ${JARSIGNER} utility."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo " Is JAVA_HOME set correctly?"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo " It should point to the root of a JDK (not a JRE) installation"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Make sure that the OpenDS build directory exists. If not, then create it.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterif test ! -d "${BUILD_DIR}"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo "WARNING: ${BUILD_DIR} does not exist. Building the server ..."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster "${ROOT_DIR}/build.sh"
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo "ERROR: Build failed. Aborting creation of web start archive."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster echo "The server was built successfully."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Determine what the name should be for the OpenDS zip file name, but without
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# the ".zip" extension.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan FosterZIP_FILEPATH=`ls ${ROOT_DIR}/build/package/OpenDS*.zip`
5c099afa7c9361afc2f4477fec0e3018588d7840Allan FosterZIP_FILENAME_BASE=`echo ${ZIP_FILENAME} | sed -e 's/\.zip//'`
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Create the directory structure into which we will place the archive.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "Creating the initial directory structure ..."
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# Copy the static files from the script directory into the appropriate places
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Foster# in the archive.
5c099afa7c9361afc2f4477fec0e3018588d7840Allan Fosterecho "Copying static content into place ..."
# Create and sign the zipped.jar file.
echo "Creating zipped.jar ..."
echo "Signing zipped.jar ..."
<property name="org.opends.quicksetup.Application.class" value="org.opends.quicksetup.installandupgrader.InstallAndUpgrader"/>