I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 8b372ad3 authored by dream's avatar dream
Browse files

Fixed build.sh

jbigi's build.sh had a number of failed assumptions as per where I2P and JAVA_HOME were which needed to be removed and a warning put in their place. A better solution would be to have some way to search for JAVA_HOME and I2P in common locations, but at least this solution works if you do it manually:

I2P=~i2p JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20 sh build.sh dynamic

thank zzz for prodding me to do this
parent dc3378d0
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,8 @@ mkdir -p lib/
mkdir -p bin/local
VER=4.3.1
set -e
if [ "$1" != "dynamic" -a ! -d gmp-$VER ]
then
TAR=gmp-$VER.tar.lzma
......@@ -54,10 +56,13 @@ cp *jbigi???* ../../lib/
echo 'Library copied to lib/'
cd ../..
I2P=~i2p
if [ ! -f $I2P/lib/i2p.jar ]
then
echo "I2P installation not found in $I2P - correct \$I2P definition in script to run speed test"
echo "I2P installation not found"
echo "We looked in '$I2P'"
echo "Not running tests against I2P installation without knowing where it is"
echo "Please set the environment variable I2P to the location of your I2P installation (so that \$I2P/lib/i2p.jar works)"
echo "If you do so, this script will run two tests to compare your installed jbigi with the one here you just compiled (to see if there is a marked improvement)"
exit 1
fi
echo 'Running test with standard I2P installation...'
......@@ -65,3 +70,5 @@ java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
echo
echo 'Running test with new libjbigi...'
java -Djava.library.path=lib/ -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
echo 'If the second is better performance, please use the jbigi you have compiled i2p will work better!'
echo '(You can do that just by copying lib/libjbigi.so over the existing libjbigi.so file in $I2P)'
......@@ -31,6 +31,12 @@ Darwin*)
LIBFILE="libjbigi.so";;
esac
if [ ! -f "$JAVA_HOME/include/jni.h" ]; then
echo "Cannot find jni.h! Looked in '$JAVA_HOME/include/jni.h'"
echo "Please set JAVA_HOME to a java home that has the JNI"
exit 1
fi
#To link dynamically to GMP (use libgmp.so or gmp.lib), uncomment the first line below
#To link statically to GMP, uncomment the second line below
# Bug!!! Quote *BOTH* or neither! --Sponge
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment