#!/bin/sh # Uncomment the following line to override the JVM search sequence # INSTALL4J_JAVA_HOME_OVERRIDE= # Uncomment the following line to add additional VM parameters # INSTALL4J_ADD_VM_PARAMS= INSTALL4J_JAVA_PREFIX="" GREP_OPTIONS="" read_db_entry() { if [ -n "$INSTALL4J_NO_DB" ]; then return 1 fi db_home=$HOME db_file_suffix= if [ ! -w "$db_home" ]; then db_home=/tmp db_file_suffix=_$USER fi db_file=$db_home/.install4j$db_file_suffix if [ -d "$db_file" ] || ([ -f "$db_file" ] && [ ! -r "$db_file" ]) || ([ -f "$db_file" ] && [ ! -w "$db_file" ]); then db_file=$db_home/.install4j_jre$db_file_suffix fi if [ ! -f "$db_file" ]; then return 1 fi if [ ! -x "$java_exc" ]; then return 1 fi found=1 exec 7< $db_file while read r_type r_dir r_ver_major r_ver_minor r_ver_micro r_ver_patch r_ver_vendor<&7; do if [ "$r_type" = "JRE_VERSION" ]; then if [ "$r_dir" = "$test_dir" ]; then ver_major=$r_ver_major ver_minor=$r_ver_minor ver_micro=$r_ver_micro ver_patch=$r_ver_patch fi elif [ "$r_type" = "JRE_INFO" ]; then if [ "$r_dir" = "$test_dir" ]; then is_openjdk=$r_ver_major found=0 break fi fi done exec 7<&- return $found } create_db_entry() { tested_jvm=true echo testing JVM in $test_dir ... version_output=`"$bin_dir/java" $1 -version 2>&1` is_gcj=`expr "$version_output" : '.*gcj'` is_openjdk=`expr "$version_output" : '.*OpenJDK'` if [ "$is_gcj" = "0" ]; then java_version=`expr "$version_output" : '.*"\(.*\)".*'` ver_major=`expr "$java_version" : '\([0-9][0-9]*\)\..*'` ver_minor=`expr "$java_version" : '[0-9][0-9]*\.\([0-9][0-9]*\)\..*'` ver_micro=`expr "$java_version" : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'` ver_patch=`expr "$java_version" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*[\._]\([0-9][0-9]*\).*'` fi if [ "$ver_patch" = "" ]; then ver_patch=0 fi if [ -n "$INSTALL4J_NO_DB" ]; then return fi db_new_file=${db_file}_new if [ -f "$db_file" ]; then awk '$1 != "'"$test_dir"'" {print $0}' $db_file > $db_new_file rm $db_file mv $db_new_file $db_file fi dir_escaped=`echo "$test_dir" | sed -e 's/ /\\\\ /g'` echo "JRE_VERSION $dir_escaped $ver_major $ver_minor $ver_micro $ver_patch" >> $db_file echo "JRE_INFO $dir_escaped $is_openjdk" >> $db_file } test_jvm() { tested_jvm=na test_dir=$1 bin_dir=$test_dir/bin java_exc=$bin_dir/java if [ -z "$test_dir" ] || [ ! -d "$bin_dir" ] || [ ! -f "$java_exc" ] || [ ! -x "$java_exc" ]; then return fi tested_jvm=false read_db_entry || create_db_entry $2 if [ "$ver_major" = "" ]; then return; fi if [ "$ver_major" -lt "1" ]; then return; elif [ "$ver_major" -eq "1" ]; then if [ "$ver_minor" -lt "8" ]; then return; fi fi if [ "$ver_major" = "" ]; then return; fi app_java_home=$test_dir } add_class_path() { if [ -n "$1" ] && [ `expr "$1" : '.*\*'` -eq "0" ]; then local_classpath="$local_classpath${local_classpath:+:}$1" fi } compiz_workaround() { if [ "$is_openjdk" != "0" ]; then return; fi if [ "$ver_major" = "" ]; then return; fi if [ "$ver_major" -gt "1" ]; then return; elif [ "$ver_major" -eq "1" ]; then if [ "$ver_minor" -gt "6" ]; then return; elif [ "$ver_minor" -eq "6" ]; then if [ "$ver_micro" -gt "0" ]; then return; elif [ "$ver_micro" -eq "0" ]; then if [ "$ver_patch" -gt "09" ]; then return; fi fi fi fi osname=`uname -s` if [ "$osname" = "Linux" ]; then compiz=`ps -ef | grep -v grep | grep compiz` if [ -n "$compiz" ]; then export AWT_TOOLKIT=MToolkit fi fi } read_vmoptions() { vmoptions_file=`eval echo "$1" 2>/dev/null` if [ ! -r "$vmoptions_file" ]; then vmoptions_file="$prg_dir/$vmoptions_file" fi if [ -r "$vmoptions_file" ] && [ -f "$vmoptions_file" ]; then exec 8< "$vmoptions_file" while read cur_option<&8; do is_comment=`expr "W$cur_option" : 'W *#.*'` if [ "$is_comment" = "0" ]; then vmo_classpath=`expr "W$cur_option" : 'W *-classpath \(.*\)'` vmo_classpath_a=`expr "W$cur_option" : 'W *-classpath/a \(.*\)'` vmo_classpath_p=`expr "W$cur_option" : 'W *-classpath/p \(.*\)'` vmo_include=`expr "W$cur_option" : 'W *-include-options \(.*\)'` if [ ! "$vmo_classpath" = "" ]; then local_classpath="$i4j_classpath:$vmo_classpath" elif [ ! "$vmo_classpath_a" = "" ]; then local_classpath="${local_classpath}:${vmo_classpath_a}" elif [ ! "$vmo_classpath_p" = "" ]; then local_classpath="${vmo_classpath_p}:${local_classpath}" elif [ "$vmo_include" = "" ]; then if [ "W$vmov_1" = "W" ]; then vmov_1="$cur_option" elif [ "W$vmov_2" = "W" ]; then vmov_2="$cur_option" elif [ "W$vmov_3" = "W" ]; then vmov_3="$cur_option" elif [ "W$vmov_4" = "W" ]; then vmov_4="$cur_option" elif [ "W$vmov_5" = "W" ]; then vmov_5="$cur_option" else vmoptions_val="$vmoptions_val $cur_option" fi fi fi done exec 8<&- if [ ! "$vmo_include" = "" ]; then read_vmoptions "$vmo_include" fi fi } unpack_file() { if [ -f "$1" ]; then jar_file=`echo "$1" | awk '{ print substr($0,1,length-5) }'` bin/unpack200 -r "$1" "$jar_file" if [ $? -ne 0 ]; then echo "Error unpacking jar files. The architecture or bitness (32/64)" echo "of the bundled JVM might not match your machine." returnCode=1 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi fi } run_unpack200() { if [ -f "$1/lib/rt.jar.pack" ]; then old_pwd200=`pwd` cd "$1" echo "Preparing JRE ..." for pack_file in lib/*.jar.pack do unpack_file $pack_file done for pack_file in lib/ext/*.jar.pack do unpack_file $pack_file done cd "$old_pwd200" fi } TAR_OPTIONS="--no-same-owner" export TAR_OPTIONS old_pwd=`pwd` progname=`basename "$0"` linkdir=`dirname "$0"` cd "$linkdir" prg="$progname" while [ -h "$prg" ] ; do ls=`ls -ld "$prg"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '.*/.*' > /dev/null; then prg="$link" else prg="`dirname $prg`/$link" fi done prg_dir=`dirname "$prg"` progname=`basename "$prg"` cd "$prg_dir" prg_dir=`pwd` app_home=. cd "$app_home" app_home=`pwd` bundled_jre_home="$app_home/jre" if [ "__i4j_lang_restart" = "$1" ]; then cd "$old_pwd" else cd "$prg_dir"/. gunzip -V > /dev/null 2>&1 if [ "$?" -ne "0" ]; then echo "Sorry, but I could not find gunzip in path. Aborting." exit 1 fi if [ -d "$INSTALL4J_TEMP" ]; then sfx_dir_name="$INSTALL4J_TEMP/${progname}.$$.dir" else sfx_dir_name="${progname}.$$.dir" fi mkdir "$sfx_dir_name" > /dev/null 2>&1 if [ ! -d "$sfx_dir_name" ]; then sfx_dir_name="/tmp/${progname}.$$.dir" mkdir "$sfx_dir_name" if [ ! -d "$sfx_dir_name" ]; then echo "Could not create dir $sfx_dir_name. Aborting." exit 1 fi fi cd "$sfx_dir_name" if [ "$?" -ne "0" ]; then echo "The temporary directory could not created due to a malfunction of the cd command. Is the CDPATH variable set without a dot?" exit 1 fi sfx_dir_name=`pwd` if [ "W$old_pwd" = "W$sfx_dir_name" ]; then echo "The temporary directory could not created due to a malfunction of basic shell commands." exit 1 fi trap 'cd "$old_pwd"; rm -R -f "$sfx_dir_name"; exit 1' HUP INT QUIT TERM tail -c 859891 "$prg_dir/${progname}" > sfx_archive.tar.gz 2> /dev/null if [ "$?" -ne "0" ]; then tail -859891c "$prg_dir/${progname}" > sfx_archive.tar.gz 2> /dev/null if [ "$?" -ne "0" ]; then echo "tail didn't work. This could be caused by exhausted disk space. Aborting." returnCode=1 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi fi gunzip sfx_archive.tar.gz if [ "$?" -ne "0" ]; then echo "" echo "I am sorry, but the installer file seems to be corrupted." echo "If you downloaded that file please try it again. If you" echo "transfer that file with ftp please make sure that you are" echo "using binary mode." returnCode=1 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi tar xf sfx_archive.tar > /dev/null 2>&1 if [ "$?" -ne "0" ]; then echo "Could not untar archive. Aborting." returnCode=1 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi fi if [ ! "__i4j_lang_restart" = "$1" ]; then if [ -f "$prg_dir/jre.tar.gz" ] && [ ! -f jre.tar.gz ] ; then cp "$prg_dir/jre.tar.gz" . fi if [ -f jre.tar.gz ]; then echo "Unpacking JRE ..." gunzip jre.tar.gz mkdir jre cd jre tar xf ../jre.tar app_java_home=`pwd` bundled_jre_home="$app_java_home" cd .. fi run_unpack200 "$bundled_jre_home" run_unpack200 "$bundled_jre_home/jre" else if [ -d jre ]; then app_java_home=`pwd` app_java_home=$app_java_home/jre fi fi if [ -z "$app_java_home" ]; then test_jvm $INSTALL4J_JAVA_HOME_OVERRIDE fi if [ -z "$app_java_home" ]; then if [ -f "$app_home/.install4j/pref_jre.cfg" ]; then read file_jvm_home < "$app_home/.install4j/pref_jre.cfg" test_jvm "$file_jvm_home" if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then rm $db_file test_jvm "$file_jvm_home" fi fi fi if [ -z "$app_java_home" ]; then test_jvm "$app_home/jre" if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then rm $db_file test_jvm "$app_home/jre" fi fi if [ -z "$app_java_home" ]; then path_java=`which java 2> /dev/null` path_java_home=`expr "$path_java" : '\(.*\)/bin/java$'` test_jvm $path_java_home fi if [ -z "$app_java_home" ]; then common_jvm_locations="/opt/i4j_jres/* /usr/local/i4j_jres/* $HOME/.i4j_jres/* /usr/bin/java* /usr/bin/jdk* /usr/bin/jre* /usr/bin/j2*re* /usr/bin/j2sdk* /usr/java* /usr/java*/jre /usr/jdk* /usr/jre* /usr/j2*re* /usr/j2sdk* /usr/java/j2*re* /usr/java/j2sdk* /opt/java* /usr/java/jdk* /usr/java/jre* /usr/lib/java/jre /usr/local/java* /usr/local/jdk* /usr/local/jre* /usr/local/j2*re* /usr/local/j2sdk* /usr/jdk/java* /usr/jdk/jdk* /usr/jdk/jre* /usr/jdk/j2*re* /usr/jdk/j2sdk* /usr/lib/jvm/* /usr/lib/java* /usr/lib/jdk* /usr/lib/jre* /usr/lib/j2*re* /usr/lib/j2sdk* /System/Library/Frameworks/JavaVM.framework/Versions/1.?/Home /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home /Library/Java/JavaVirtualMachines/*.jdk/Contents/Home/jre" for current_location in $common_jvm_locations do if [ -z "$app_java_home" ]; then test_jvm $current_location fi done fi if [ -z "$app_java_home" ]; then test_jvm $JAVA_HOME fi if [ -z "$app_java_home" ]; then test_jvm $JDK_HOME fi if [ -z "$app_java_home" ]; then test_jvm $INSTALL4J_JAVA_HOME fi if [ -z "$app_java_home" ]; then if [ -f "$app_home/.install4j/inst_jre.cfg" ]; then read file_jvm_home < "$app_home/.install4j/inst_jre.cfg" test_jvm "$file_jvm_home" if [ -z "$app_java_home" ] && [ $tested_jvm = "false" ]; then rm $db_file test_jvm "$file_jvm_home" fi fi fi if [ -z "$app_java_home" ]; then echo No suitable Java Virtual Machine could be found on your system. echo The version of the JVM must be at least 1.8. echo Please define INSTALL4J_JAVA_HOME to point to a suitable JVM. echo You can also try to delete the JVM cache file $db_file returnCode=83 cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode fi compiz_workaround packed_files="*.jar.pack user/*.jar.pack user/*.zip.pack" for packed_file in $packed_files do unpacked_file=`expr "$packed_file" : '\(.*\)\.pack$'` $app_java_home/bin/unpack200 -q -r "$packed_file" "$unpacked_file" > /dev/null 2>&1 done local_classpath="" i4j_classpath="i4jruntime.jar:user.jar" add_class_path "$i4j_classpath" for i in `ls "user" 2> /dev/null | egrep "\.(jar|zip)$"` do add_class_path "user/$i" done vmoptions_val="" read_vmoptions "$prg_dir/$progname.vmoptions" INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS $vmoptions_val" INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS -Di4j.vpt=true" for param in $@; do if [ `echo "W$param" | cut -c -3` = "W-J" ]; then INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS `echo "$param" | cut -c 3-`" fi done if [ "W$vmov_1" = "W" ]; then vmov_1="-Di4j.vmov=true" fi if [ "W$vmov_2" = "W" ]; then vmov_2="-Di4j.vmov=true" fi if [ "W$vmov_3" = "W" ]; then vmov_3="-Di4j.vmov=true" fi if [ "W$vmov_4" = "W" ]; then vmov_4="-Di4j.vmov=true" fi if [ "W$vmov_5" = "W" ]; then vmov_5="-Di4j.vmov=true" fi echo "Starting Installer ..." $INSTALL4J_JAVA_PREFIX "$app_java_home/bin/java" -Dinstall4j.jvmDir="$app_java_home" -Dexe4j.moduleName="$prg_dir/$progname" -Dexe4j.totalDataLength=4060259 -Dinstall4j.cwd="$old_pwd" "-Dsun.java2d.noddraw=true" "-Dinstall4j.defaultLanguage=de" "$vmov_1" "$vmov_2" "$vmov_3" "$vmov_4" "$vmov_5" $INSTALL4J_ADD_VM_PARAMS -classpath "$local_classpath" com.install4j.runtime.launcher.Launcher launch com.install4j.runtime.installer.Installer false false "" "" false true false "" true true 0 0 "" 20 20 "Arial" "0,0,0" 8 500 "version 1.0.0" 20 40 "Arial" "0,0,0" 8 500 -1 "$@" returnCode=$? cd "$old_pwd" if [ ! "W $INSTALL4J_KEEP_TEMP" = "W yes" ]; then rm -R -f "$sfx_dir_name" fi exit $returnCode 0.dat 0Y] I7 (`(>˚P`13~mAP!9_QTjA1 gˠɀ۔@b_E!71gV"R`Zq"X{S';$yei+m%٥M} AWy5`^NhǸEL!LOQe&;y_f5$o'Y$TXuq4_ȧo0Xoa W"5=]zzLwU"&V h ]sE^<(h,qކ gg + JŇ'N~b꭪g͍AX>r>G7/{ Wydro$=̏f65)_v~ $жcjH*EX^{ӉwObwNq1)gE͂}HsC>, W,ٌXlVn,vwJw1. 5)Ō_Ӡ q_-a;f`Y#/JIJrB|dq{^V{0mz暏tB`*~p笕&2OA#a=fw#:q=6AIWѳcj%a2+A7d."3UxOTf]HߓrV8nbkX;3P-n͌Yo{DMt@A]}("[E Q#ux'O65] F/ilr;'Rx˄|_"l - 1 *qVT|(=QMq+cI.4$[)w1O-R*E bs{gTw5 Ny27pX "3TAOj+kA ]d4:t.ZJ4Kj(Nn%C(:nʳ%ǘB)|-`8H}0y$A>,Eݺ&Tj[CʫiTX(WΆaN|0Vgdk?0F 4ch=bZb4 x$8B-XD$yyz/Bnaח֜7Sڒ8ϑR2Dru,Y>^$Y0%L.t*~zÄJut hd Hd2P#g>4 w(0arLmgc 1q-Ek{P= Q۬1bU lH5yπ@b6̈)cwqD>?ccF\`2Ag0 QM(JBoG&xNQBk2$)f2DPQ,PI㵘l5ّyW> 閥 2ه$eϭQ.TQr g`I Ag 8K([Z%s8+3C7oTKF4$%s97g0˃[Kg-ȺLwCW&aǕHVYvi굨I [Ys58{.9CNK/@28X[Icm~ďS ֟]/duL$<0qkzlգ;ecvZ@S`9nM P4P ]`3; [sv taMN7V9 aUOii߸cfS!0@`+!!U