# copy build.sh to mldonkey_gui/src # cd to mldonkey_gui/src # and run # sh ./build.sh # # (c) 2003 address@hidden # create the $CLASSPATH - you have to change that to fit your settings eclipse_path=/usr/share/eclipse common_jar_path=/usr/share/java export CLASSPATH=$CLASSPATH:/usr/local/java/trove-1.0.2/lib/trove.jar export CLASSPATH=$CLASSPATH:$common_jar_path/gnu-regexp.jar export CLASSPATH=$CLASSPATH:$common_jar_path/gnu-getopt.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.eclipse.swt.gtk_2.1.1/ws/gtk/swt.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.eclipse.swt.gtk_2.1.1/ws/gtk/swt-pi.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.eclipse.jface_2.1.1/jface.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.eclipse.core.runtime_2.1.1/runtime.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.apache.xerces_4.0.13/xmlParserAPIs.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.apache.xerces_4.0.13/xercesImpl.jar export CLASSPATH=$CLASSPATH:$eclipse_path/plugins/org.eclipse.core.boot_2.1.1/boot.jar export CLASSPATH=$CLASSPATH:. echo using CLASSPATH=$CLASSPATH #compile the java files gcj -c -g -O `find -name "*.java"` # copy jar files to build libraries cp \ /usr/local/java/trove-1.0.2/lib/trove.jar \ $common_jar_path/gnu-regexp.jar \ $common_jar_path/gnu-getopt.jar \ $eclipse_path/plugins/org.eclipse.swt.gtk_2.1.1/ws/gtk/swt.jar \ $eclipse_path/plugins/org.eclipse.swt.gtk_2.1.1/ws/gtk/swt-pi.jar \ $eclipse_path/plugins/org.eclipse.jface_2.1.1/jface.jar \ $eclipse_path/plugins/org.eclipse.core.runtime_2.1.1/runtime.jar \ $eclipse_path/plugins/org.apache.xerces_4.0.13/xmlParserAPIs.jar \ $eclipse_path/plugins/org.apache.xerces_4.0.13/xercesImpl.jar \ $eclipse_path/plugins/org.eclipse.core.boot_2.1.1/boot.jar \ . #Because gcj can not currently use libraries that contain duplicate classes, #and "xercesImpl.jar" and "xmlParserAPIs.jar" both contain #"HTMLDOMImplementation.class", #you must delete it from one of the jar packages: zip -d xmlParserAPIs.jar org/w3c/dom/html/HTMLDOMImplementation.class #Now, compile all .jar files (located in the current directory) to libraries. for i in $(ls -1 *.jar); do libname=`basename $i .jar` gcj -fjni -shared -o lib$libname.so $i done export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$eclipse_path/plugins/org.eclipse.swt.gtk_2.1.1/os/linux/x86/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. gcj --main=net.mldonkey.g2gui.view.Main -O -o g2gui *.o -L. -ljface -lswt -lswt-pi -lruntime -lboot -lxercesImpl -lxmlParserAPIs -ltrove -lgnu-getopt -lgnu-regexp