#!/bin/sh # # Startup script for IntelliJ IDEA # Lubomir Rintel <lkundrak@v3.sk> set -e # Source functions library if [ -f /usr/share/java-utils/java-functions ] ; then . /usr/share/java-utils/java-functions else echo "Can't find functions library, aborting" exit 1 fi # Default configuration BASE_FLAGS="-Xms32m -Xmx256m -XX:MaxPermSize=150m -ea" MAIN_CLASS=com.intellij.idea.Main IDEA_HOME=/usr/lib/idea/ [ "$(getconf ULONG_MAX)" = 18446744073709551615 ] && IDEA_HOME=/usr/lib64/idea/ # Override with system-wide configuration [ -f /etc/idea.conf ] && . /etc/idea.conf # Override with user configuration [ -f "$HOME/.idearc" ] && . "$HOME/.idearc" # Plugins for PLUGIN in /usr/lib/idea/plugins/* do PLUGIN="$PLUGIN/$(basename $PLUGIN).sh" [ -e "$PLUGIN" ] && . "$PLUGIN" done # IntelliJ itself BASE_JARS="$BASE_JARS idea/extensions" BASE_JARS="$BASE_JARS idea/util" BASE_JARS="$BASE_JARS idea/icons" BASE_JARS="$BASE_JARS idea/idea_rt" BASE_JARS="$BASE_JARS idea/annotations" BASE_JARS="$BASE_JARS idea/resources" BASE_JARS="$BASE_JARS idea/trove4j" BASE_JARS="$BASE_JARS idea/idea" BASE_JARS="$BASE_JARS idea/javac2" BASE_JARS="$BASE_JARS idea/bootstrap" BASE_JARS="$BASE_JARS idea/resources_en" BASE_JARS="$BASE_JARS idea/openapi" BASE_JARS="$BASE_JARS idea/boot" BASE_JARS="$BASE_JARS idea/forms_rt" # Dependencies BASE_JARS="$BASE_JARS ant" BASE_JARS="$BASE_JARS ant/ant-apache-oro" BASE_JARS="$BASE_JARS ant/ant-nodeps" BASE_JARS="$BASE_JARS cglib-2.2" BASE_JARS="$BASE_JARS commons-codec" BASE_JARS="$BASE_JARS commons-collections" BASE_JARS="$BASE_JARS commons-lang" BASE_JARS="$BASE_JARS apache-commons-net" BASE_JARS="$BASE_JARS javahelp2" BASE_JARS="$BASE_JARS jaxen" BASE_JARS="$BASE_JARS jdom" BASE_JARS="$BASE_JARS jgoodies-forms" BASE_JARS="$BASE_JARS jgoodies-looks" BASE_JARS="$BASE_JARS jna" BASE_JARS="$BASE_JARS jna/platform" BASE_JARS="$BASE_JARS junit" BASE_JARS="$BASE_JARS junit4" BASE_JARS="$BASE_JARS log4j" BASE_JARS="$BASE_JARS microba" BASE_JARS="$BASE_JARS nanoxml" BASE_JARS="$BASE_JARS objectweb-asm/asm" BASE_JARS="$BASE_JARS objectweb-asm/asm-commons" BASE_JARS="$BASE_JARS oro" BASE_JARS="$BASE_JARS picocontainer" BASE_JARS="$BASE_JARS velocity" BASE_JARS="$BASE_JARS xerces-j2" BASE_JARS="$BASE_JARS xmlbeans/xbean" BASE_JARS="$BASE_JARS xml-commons-resolver" BASE_JARS="$BASE_JARS xmlrpc" BASE_JARS="$BASE_JARS xstream" BASE_JARS="$BASE_JARS groovy" # XXX BASE_JARS="$BASE_JARS ../jvm/java/lib/tools" ECLIPSE_CORE=/usr/lib*/eclipse/dropins/jdt/plugins/org.eclipse.jdt.core_*.jar BASE_JARS="$BASE_JARS $(echo $ECLIPSE_CORE |sed 's,\(.*\)\.jar$,../../..\1,')" # Bootstrap BASE_FLAGS="$BASE_FLAGS -Xbootclasspath/a:$(/usr/bin/build-classpath idea/boot)" # Work around slow rendering with EXA enabled, # until XRender backed java2d is around # (afaik exactly the same thing is done by Sun JDK, # http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708580) IDEA_OPTS="$IDEA_OPTS -Dsun.java2d.pmoffscreen=false" # Turn on font AntiAliasing # See: https://bugzilla.redhat.com/show_bug.cgi?id=539971 IDEA_OPTS="$IDEA_OPTS -Dawt.useSystemAAFontSettings=on" # Set parameters set_jvm set_classpath $BASE_JARS set_flags $BASE_FLAGS set_options $BASE_OPTIONS $IDEA_OPTS -Didea.home.path="$IDEA_HOME" -Didea.log.path="$HOME/.idea/log" \ -Didea.config.path="$HOME/.idea/config" -Didea.system.path="$HOME/.idea/system" # Automatically configure JDKs # (is there a wiser way to do this?) mkdir -p "$HOME/.idea/config/options" perl "$IDEA_HOME/autoconfig-jdk.pl" # Let's start cd $IDEA_HOME run "$@"