From d250b10da35ae6b180ef01f3f65cc1ef776bb462 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 16 May 2012 19:52:55 +0400 Subject: [PATCH] Keep startup path on Unix --- bin/scripts/unix/idea.sh | 6 +----- build/scripts/utils.gant | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/scripts/unix/idea.sh b/bin/scripts/unix/idea.sh index 1ed1c5bb6b65..2d019969af77 100755 --- a/bin/scripts/unix/idea.sh +++ b/bin/scripts/unix/idea.sh @@ -21,7 +21,6 @@ if [ -z "$UNAME" -o -z "$GREP" -o -z "$CUT" -o -z "$MKTEMP" -o -z "$RM" -o -z "$ fi OS_TYPE=`"$UNAME" -s` -WORKING_DIR=`pwd` # --------------------------------------------------------------------- # Locate a JDK installation directory which will be used to run the IDE. @@ -141,8 +140,6 @@ if [ -r "$VM_OPTIONS_FILE" ]; then VM_OPTIONS="$VM_OPTIONS -Djb.vmOptionsFile=\"$VM_OPTIONS_FILE\"" fi -VM_OPTIONS="$VM_OPTIONS -Doriginal.working.dir=\"$WORKING_DIR\"" - IS_EAP="@@isEap@@" if [ "$IS_EAP" = "true" ]; then OS_NAME=`echo $OS_TYPE | "$TR" '[:upper:]' '[:lower:]'` @@ -152,7 +149,7 @@ if [ "$IS_EAP" = "true" ]; then fi fi -COMMON_JVM_ARGS="-Xbootclasspath/a:../lib/boot.jar -Didea.paths.selector=@@system_selector@@ $IDE_PROPERTIES_PROPERTY" +COMMON_JVM_ARGS="\"-Xbootclasspath/a:$IDE_HOME/lib/boot.jar\" -Didea.paths.selector=@@system_selector@@ $IDE_PROPERTIES_PROPERTY" IDE_JVM_ARGS="@@ide_jvm_args@@" ALL_JVM_ARGS="$VM_OPTIONS $COMMON_JVM_ARGS $IDE_JVM_ARGS $AGENT $REQUIRED_JVM_ARGS" @@ -167,7 +164,6 @@ export LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" # --------------------------------------------------------------------- # Run the IDE. # --------------------------------------------------------------------- -cd "$IDE_BIN_HOME" while true ; do eval "$JDK/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME $* test $? -ne 88 && break diff --git a/build/scripts/utils.gant b/build/scripts/utils.gant index 56dea509d8bc..42b39bcbbfca 100644 --- a/build/scripts/utils.gant +++ b/build/scripts/utils.gant @@ -368,8 +368,8 @@ binding.setVariable("unixScripts", { String target, String home, String name, Ma String product_uc = args.product_uc != null ? args.product_uc : p("component.names.product").toUpperCase() String vm_options = args.vm_options != null ? args.vm_options : p("component.names.product").toLowerCase() - String classPath = "CLASSPATH=\"../lib/${classPathLibs[0]}\"\n" - classPath += classPathLibs[1..-1].collect {"CLASSPATH=\"\$CLASSPATH:../lib/${it}\""}.join("\n") + String classPath = "CLASSPATH=\"\$IDE_HOME/lib/${classPathLibs[0]}\"\n" + classPath += classPathLibs[1..-1].collect {"CLASSPATH=\"\$CLASSPATH:\$IDE_HOME/lib/${it}\""}.join("\n") if (args.tools_jar) classPath += "\nCLASSPATH=\"\$CLASSPATH:\$JDK/lib/tools.jar\"" ant.copy(todir: "$target/bin") {