diff --git a/LICENSE.txt b/LICENSE.txt index da7b2418d44b25e4f5975d4fd2e673df46c43b25..3cbdd6daed8e00204abdb75011e117ee9176d632 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -127,8 +127,8 @@ Installer: -Wrapper 3.1.1: - Copyright (c) 1999, 2004 Tanuki Software +Java Service Wrapper Community Edition 32-bit 3.5.9: + Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved. See licenses/LICENSE-Wrapper.txt diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml deleted file mode 100644 index b95b5ba16ff8b8f25cb2bf0236a6d46f896761b5..0000000000000000000000000000000000000000 --- a/android/AndroidManifest.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="net.i2p.android.router" - android.versionCode="0" - android.versionName="0.0.0" - android:installLocation="preferExternal" - > - <uses-permission android:name="android.permission.INTERNET" /> - - <!-- 3 = 1.5, 2 = 1.1, 1 = 1.0; would probably work with 1 but don't have a 1.0 SDK to test against --> - <!-- 3 required for NDK --> - <uses-sdk android:minSdkVersion="3" /> - - <application android:label="@string/app_name" - android:icon="@drawable/ic_launcher_itoopie" > - <service android:name=".service.RouterService" - android:label="@string/app_name" - android:icon="@drawable/ic_launcher_itoopie" /> - <activity android:name=".activity.MainActivity" - android:label="@string/app_name" - android:icon="@drawable/ic_launcher_itoopie" - android:launchMode="singleTask" > - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - </application> -</manifest> diff --git a/android/README.txt b/android/README.txt deleted file mode 100644 index ff5b1f2d6fd57ef4965e3662b46f078853522410..0000000000000000000000000000000000000000 --- a/android/README.txt +++ /dev/null @@ -1,58 +0,0 @@ -These instructions are for a recent Android SDK (1.6 or later).. -Should also still work with a 1.5 SDK. -The build file is not compatible with the 1.1 SDK any more. -These instructions were last updated for SDK Tools Version 11 with -SDK Platform-tools Version 5, June 2011. - -#Download the SDK from http://developer.android.com/sdk/index.html -#Unzip the android SDK in ../../ -#So then the android tools will be in ../../android-sdk-linux_86/tools/ -# -# Run the GUI updater, which you must do to get an SDK Platform: -../../android-sdk-linux_86/tools/android & - -# now go to the available packages tab, check the box and click refresh, -# and download an SDK Platform -# Since I2P is configured to run on 1.1 or higher -# (API 2) download that one. Otherwise you must change the -# target in default.properties from android-2 to andriod-x -# where x is the API version. - -# To run the debugger (ddms) you also need to download the -# "Android SDK Platform-Tools" package from the GUI updater. - -# create a file local.properties with the following line (without the leading # of course): -# sdk.dir=/path/to/your/android-sdk-linux_86 -# The old property was sdk-location=/path/to/your/android-sdk-linux_86 -# but it changed in more recent tools. - -# DO NOT create a new project or anything. It's all set up right here for you. - -# Create the android 1.5 (API 3) virtual device -# (don't make a custom hardware profile) -# A AVD created with the 1.5 SDK will not work with the newer tools -../../android-sdk-linux_86/tools/android create avd --name i2p --target 3 - -#then run the emulator: -../../android-sdk-linux_86/tools/emulator -avd i2p & - -# or to talk to a real phone in debug mode: -adb kill-server -sudo adb start-server -adb devices - -#then wait a couple minutes until the emulator is up -#then install the I2P app -ant install - -#then run the debugger -../../android-sdk-linux_86/tools/ddms & - -#to rebuild and reinstall to emulator or phone: -ant reinstall - -# Now click on the I2P icon on your phone! - -#other helpful commands -../../android-sdk-linux_86/platform-tools/adb shell -../../android-sdk-linux_86/platform-tools/adb pull /some/file/on/emulator some-local-dir/ diff --git a/android/build.properties b/android/build.properties deleted file mode 100644 index 181724115d6453de5705a4d1fd7f7f682a345281..0000000000000000000000000000000000000000 --- a/android/build.properties +++ /dev/null @@ -1 +0,0 @@ -application-package=net.i2p.router diff --git a/android/build.xml b/android/build.xml deleted file mode 100644 index 37b241ea8081c3b5e717a41fca062792b9a2fcef..0000000000000000000000000000000000000000 --- a/android/build.xml +++ /dev/null @@ -1,210 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - - Portions copied and modified from Android SDK - - Copyright (c) 2005-2008, The Android Open Source Project - - Apache 2.0 license - - See ../licenses/LICENSE-Apache2.0.txt - --> - -<project name="I2PAndroid" default="help"> - - <!-- The local.properties file is created and updated by the 'android' tool. - It contain the path to the SDK. It should *NOT* be checked in in Version - Control Systems. --> - <property file="local.properties"/> - - <!-- The build.properties file can be created by you and is never touched - by the 'android' tool. This is the place to change some of the default property values - used by the Ant rules. - Here are some properties you may want to change/update: - - application-package - the name of your application package as defined in the manifest. Used by the - 'uninstall' rule. - source-folder - the name of the source folder. Default is 'src'. - out-folder - the name of the output folder. Default is 'bin'. - - Properties related to the SDK location or the project target should be updated - using the 'android' tool with the 'update' action. - - This file is an integral part of the build system for your application and - should be checked in in Version Control Systems. - - --> - <property file="build.properties"/> - <!-- set the old name to the new name --> - <property name="sdk-location" value="${sdk.dir}" /> - - <!-- The default.properties file is created and updated by the 'android' tool, as well - as ADT. - This file is an integral part of the build system for your application and - should be checked in in Version Control Systems. --> - <property file="default.properties"/> - - <!-- Custom Android task to deal with the project target, and import the proper rules. - This requires ant 1.6.0 or above. --> - <path id="android.antlibs"> - <pathelement path="${sdk-location}/tools/lib/anttasks.jar" /> - <pathelement path="${sdk-location}/tools/lib/sdklib.jar" /> - <pathelement path="${sdk-location}/tools/lib/androidprefs.jar" /> - <pathelement path="${sdk-location}/tools/lib/apkbuilder.jar" /> - <pathelement path="${sdk-location}/tools/lib/jarutils.jar" /> - </path> - - <taskdef name="setup" - classname="com.android.ant.SetupTask" - classpathref="android.antlibs"/> - - <!-- Execute the Android Setup task that will setup some properties specific to the target, - and import the rules files. - To customize the rules, copy/paste them below the task, and disable import by setting - the import attribute to false: - <setup import="false" /> - - This will ensure that the properties are setup correctly but that your customized - targets are used. - --> - <setup import="true" /> - - <echo>Ignore warning about SDK version</echo> - <!-- - ================================================================================ - New I2P rules - ================================================================================ - --> - - <!-- overrides of those in main_rules.xml --> - - <target name="-pre-build" depends="copy-i2p-resources, incrementBuild" /> - - <target name="-pre-compile" depends="buildrouter" /> - - <target name="-post-compile" depends="hackcleanup, jbigi" /> - - <!-- new rules --> - - <target name="buildrouter" depends="-dirs" > - <!-- build router and core --> - <ant dir=".." target="buildrouter" /> - - <!-- router --> - <copy file="../build/router.jar" todir="${jar.libs.dir}" /> - - <!-- core --> - - <!-- org.bouncycastle.crypto already in android - but we need a little trickery because our HMac is incompatible... - and the libs aren't in the SDK to compile against??? --> - <jar destfile="${jar.libs.dir}/crypto.jar" > - <zipfileset src="../build/i2p.jar" > - <include name="org/bouncycastle/crypto/Digest.class" /> - <include name="org/bouncycastle/crypto/Mac.class" /> - <include name="org/bouncycastle/crypto/digests/GeneralDigest.class" /> - <include name="org/bouncycastle/crypto/digests/MD5Digest.class" /> - </zipfileset > - </jar> - - <!-- lots of unneeded stuff could be deleted here --> - <jar destfile="${jar.libs.dir}/i2p.jar" > - <zipfileset src="../build/i2p.jar" > - <exclude name="net/i2p/util/LogWriter.class" /> - <exclude name="net/i2p/util/SecureDirectory.class" /> - <exclude name="net/i2p/util/SecureFile.class" /> - <exclude name="net/i2p/util/SecureFileOutputStream.class" /> - <exclude name="org/bouncycastle/crypto/Digest.class" /> - <exclude name="org/bouncycastle/crypto/Mac.class" /> - <exclude name="org/bouncycastle/crypto/digests/GeneralDigest.class" /> - <exclude name="org/bouncycastle/crypto/digests/MD5Digest.class" /> - </zipfileset > - </jar> - </target> - - <!-- some resources --> - <target name="copy-i2p-resources" depends="-dirs" > - <copy file="../installer/resources/themes/console/images/i2plogo.png" todir="res/drawable/" /> - <copy file="../installer/resources/blocklist.txt" tofile="res/raw/blocklist_txt" /> - </target> - - <target name="hackcleanup"> - <delete file="${jar.libs.dir}/crypto.jar" /> - </target> - - <target name="jbigi"> - <exec executable="sh" osfamily="unix" failonerror="true"> - <arg value="-c" /> - <arg value="jni/build.sh" /> - </exec> - <copy file="jni/libjbigi.so" todir="${native.libs.dir}/armeabi" /> - </target> - - <target name="incrementBuild"> - <buildnumber file="scripts/build.number" /> - <exec executable="sh" osfamily="unix" failonerror="true"> - <arg value="-c" /> - <arg value="scripts/setversion.sh" /> - </exec> - <!-- this loads my.version.code and my.version.name --> - <property file="scripts/version.properties" /> - </target> - - <!-- install now does both --> - <target name="reinstall" depends="install" /> - - <target name="distclean" depends="clean"> - <delete dir="${jar.libs.dir}" verbose="${verbose}" /> - <delete file="res/drawable/i2plogo.png" verbose="${verbose}"/> - <delete file="res/raw/blocklist_txt" verbose="${verbose}" /> - <delete dir="jni/build/" verbose="${verbose}" /> - <delete file="jni/libjbigi.so" verbose="${verbose}" /> - <delete file="scripts/build.number" verbose="${verbose}" /> - <delete file="scripts/version.properties" verbose="${verbose}" /> - </target> - - <!-- - ================================================================================ - From here down copied from SDK tools/ant/main_rules.xml from Tools version 11 - and then modified - ================================================================================ - --> - - <!-- not necessary to copy if setup import="true" --> - - - <!-- - override this because the ant task com.android.ant.AaptExecLoopTask has issues: - a) it uses version.code which main_rules sets to "" and - b) it can't set versionName via the aapt task, have to use the aapt command line - --> - - <!-- Puts the project's resources into the output package file - This actually can create multiple resource package in case - Some custom apk with specific configuration have been - declared in default.properties. - --> - <target name="-package-resources"> - <echo>Packaging resources</echo> - <exec executable="${aapt}" failonerror="true" > - <arg value="package" /> - <arg value="--version-code" /> - <arg value="${my.version.code}" /> - <arg value="--version-name" /> - <arg value="${my.version.name}" /> - <arg value="-f" /> - <arg value="-m" /> - <arg value="-M" /> - <arg value="AndroidManifest.xml" /> - <arg value="-I" /> - <arg value="${android.jar}" /> - <arg value="-S" /> - <arg value="${resource.absolute.dir}" /> - <arg value="-J" /> - <arg value="${gen.absolute.dir}" /> - <arg value="-F" /> - <arg value="${out.absolute.dir}/${resource.package.file.name}" /> - </exec> - </target> - -</project> diff --git a/android/default.properties b/android/default.properties deleted file mode 100644 index 0b9250e021cfaac0bcbf8575a75aab1ec81008f8..0000000000000000000000000000000000000000 --- a/android/default.properties +++ /dev/null @@ -1,11 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 diff --git a/android/jni/build.sh b/android/jni/build.sh deleted file mode 100755 index af5d17220ef7ae0abfc3fabee6898e5d31cb0683..0000000000000000000000000000000000000000 --- a/android/jni/build.sh +++ /dev/null @@ -1,83 +0,0 @@ -# -# build GMP and libjbigi.so using the Android tools directly -# - -# uncomment to skip -# exit 0 - -THISDIR=$(realpath $(dirname $(which $0))) -cd $THISDIR -export NDK=$(realpath ../../../android-ndk-r5b/) - -# -# API level, must match that in ../AndroidManifest.xml -# -LEVEL=3 -ARCH=arm -export SYSROOT=$NDK/platforms/android-$LEVEL/arch-$ARCH/ -export AABI=arm-linux-androideabi-4.4.3 -export SYSTEM=linux-x86 -export BINPREFIX=arm-linux-androideabi- -export CC="$NDK/toolchains/$AABI/prebuilt/$SYSTEM/bin/${BINPREFIX}gcc --sysroot=$SYSROOT" - -#echo "CC is $CC" - -JBIGI=$(realpath ../../core/c/jbigi) -GMPVER=4.3.2 -GMP=$JBIGI/gmp-$GMPVER - -if [ ! -d $GMP ] -then - echo "Source dir for GMP version $GMPVER not found in $GMP" - echo "Install it there or change GMPVER and/or GMP in this script" - exit 1 -fi - -LIBFILE=$PWD/libjbigi.so -if [ -f $LIBFILE ] -then - echo "$LIBFILE exists, nothing to do here" - echo "If you wish to force a recompile, delete it" - exit 0 -fi - -mkdir -p build -cd build - -# we must set both build and host, so that the configure -# script will set cross_compile=yes, so that it -# won't attempt to run the a.out files -if [ ! -f config.status ] -then - echo "Configuring GMP..." - $GMP/configure --with-pic --build=x86-none-linux --host=armv5-eabi-linux || exit 1 -fi - -echo "Building GMP..." -make || exit 1 - -export JAVA_HOME=$(dirname $(dirname $(realpath $(which javac)))) -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 - -COMPILEFLAGS="-fPIC -Wall" -INCLUDES="-I. -I$JBIGI/jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" -LINKFLAGS="-shared -Wl,-soname,libjbigi.so,--fix-cortex-a8" - -echo "Building jbigi lib that is statically linked to GMP" -STATICLIBS=".libs/libgmp.a" - -echo "Compiling C code..." -rm -f jbigi.o $LIBFILE -echo "$CC -c $COMPILEFLAGS $INCLUDES $JBIGI/jbigi/src/jbigi.c" -$CC -c $COMPILEFLAGS $INCLUDES $JBIGI/jbigi/src/jbigi.c || exit 1 -echo "$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS" -$CC $LINKFLAGS $INCLUDES $INCLUDELIBS -o $LIBFILE jbigi.o $STATICLIBS || exit 1 - -ls -l $LIBFILE || exit 1 - - -echo 'Built successfully' diff --git a/android/res/drawable/ic_launcher_itoopie.png b/android/res/drawable/ic_launcher_itoopie.png deleted file mode 100644 index acb8a2bb8e7ef8e67c808dc766a751990f6ddc1f..0000000000000000000000000000000000000000 Binary files a/android/res/drawable/ic_launcher_itoopie.png and /dev/null differ diff --git a/android/res/layout/main.xml b/android/res/layout/main.xml deleted file mode 100644 index d764115276c1b6c135b8093a48d4adcb1ee4d67d..0000000000000000000000000000000000000000 --- a/android/res/layout/main.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - > -<TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:text="Hello World, I2PAndroid" - /> -<ImageView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:src="@drawable/i2plogo" - /> -</LinearLayout> - diff --git a/android/res/raw/logger_config b/android/res/raw/logger_config deleted file mode 100644 index 86651d8807093bf38f118a7f83b4fa8b746e5404..0000000000000000000000000000000000000000 --- a/android/res/raw/logger_config +++ /dev/null @@ -1,8 +0,0 @@ -logger.defaultLevel=INFO -logger.record.net.i2p.router.peerManager.ProfileOrganizer=WARN -logger.record.net.i2p.router.transport=WARN -logger.record.net.i2p.router.transport.FIFOBandwidthRefiller=ERROR -logger.record.net.i2p.stat.Rate=ERROR -logger.record.net.i2p.util.LogManager=WARN -logger.record.net.i2p.util.LogWriter=WARN -logger.record.net.i2p.util.NativeBigInteger=DEBUG diff --git a/android/res/raw/router_config b/android/res/raw/router_config deleted file mode 100644 index 5fa8dcc1013a45fd8d0513f20e101041676a1b3e..0000000000000000000000000000000000000000 --- a/android/res/raw/router_config +++ /dev/null @@ -1,52 +0,0 @@ -# initial router.config -# temp directory -i2p.dir.temp=/data/data/net.i2p.router/files/tmp -i2p.dir.pid=/data/data/net.i2p.router/files/tmp -# save memory -prng.buffers=2 -router.decayingBloomFilterM=20 -stat.full=false -# -# Don't run NTP client, the phone should have a valid time -# -time.disabled=true -# -# no I2CP -# -i2p.dummyClientFacade=true -i2cp.disableInterface=true -# -##### Tunnels -# -router.inboundPool.backupQuantity=0 -router.inboundPool.length=2 -router.inboundPool.lengthVariance=0 -router.inboundPool.quantity=2 -router.outboundPool.backupQuantity=0 -router.outboundPool.length=2 -router.outboundPool.lengthVariance=0 -router.outboundPool.quantity=2 -router.maxParticipatingTunnels=0 -router.sharePercentage=10 -# -##### Transport -# -i2np.bandwidth.inboundKBytesPerSecond=100 -i2np.bandwidth.outboundKBytesPerSecond=30 -# -# NTCP -# -#i2np.ntcp.enable=false -i2np.ntcp.maxConnections=12 -# -# UDP disabled for now -# -i2np.udp.enable=false -i2np.udp.maxConnections=12 -# -# no COMM at all!!! -#i2p.vmCommSystem=true -# -# not on android -i2np.upnp.enable=false -routerconsole.geoip.enable=false diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml deleted file mode 100644 index d1ab96508e6091b8634eb9c74ce5dc8d58ab8692..0000000000000000000000000000000000000000 --- a/android/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<resources> - <string name="app_name">I2P</string> -</resources> diff --git a/android/scripts/setversion.sh b/android/scripts/setversion.sh deleted file mode 100755 index bf4e6b9d817530257f87b10a9de73d65300ae3a8..0000000000000000000000000000000000000000 --- a/android/scripts/setversion.sh +++ /dev/null @@ -1,59 +0,0 @@ -# -# Get the version number and fix up AndroidManifest.xml -# Public domain -# -THISDIR=$(realpath $(dirname $(which $0))) -cd $THISDIR -MANIFEST=../AndroidManifest.xml -TMP=AndroidManifest.xml.tmp - -CORE=`grep 'public final static String VERSION' ../../core/java/src/net/i2p/CoreVersion.java | \ - cut -d '"' -f 2` - -MAJOR=`echo $CORE | cut -d '.' -f 1` -MINOR=`echo $CORE | cut -d '.' -f 2` -RELEASE=`echo $CORE | cut -d '.' -f 3` - -ROUTERBUILD=$((`grep 'public final static long BUILD' ../../router/java/src/net/i2p/router/RouterVersion.java | \ - cut -d '=' -f 2 | \ - cut -d ';' -f 1`)) - -ANDROIDBUILD=`grep 'build.number' build.number | \ - cut -d '=' -f 2` - -SDK=`grep 'android:minSdkVersion' $MANIFEST | \ - cut -d '"' -f 2` - -# don't let build number get too long -VERSIONSTRING="${CORE}-${ROUTERBUILD}_b$(($ANDROIDBUILD % 256))-SDK$SDK" - -# -# Android version code is an integer. -# So we have 31 bits. -# MAJOR 4 bits 0-15 -# MINOR 8 bits 0-255 -# RELEASE 8 bits 0-255 -# ROUTERBUILD 8 bits 0-255 -# ANDROIDBUILD 3 bits 0-7 -# -# Note that ANDROIDBUILD is modded % 8, it will wrap, -# beware of that if you release multiple builds using the -# same ROUTERBUILD, or clear it if you update ROUTERBUILD -# -VERSIONINT=$(( \ - (($MAJOR % 16) << 27) + \ - (($MINOR % 256) << 19) + \ - (($RELEASE % 256) << 11) + \ - (($ROUTERBUILD % 256) << 3) + \ - ($ANDROIDBUILD % 8) \ - )) - -echo "Android version: '$VERSIONSTRING' (${VERSIONINT})" -echo "my.version.name=${VERSIONSTRING}" > version.properties -echo "my.version.code=${VERSIONINT}" >> version.properties - -SUBST='s/android.versionCode="[0-9]"/android.versionCode="'${VERSIONINT}'"/' -sed "$SUBST" < $MANIFEST > $TMP -SUBST='s/android.versionName="[^"]*"/android.versionName="'${VERSIONSTRING}'"/' -sed "$SUBST" < $TMP > $MANIFEST -rm -f $TMP diff --git a/android/src/net/i2p/android/router/activity/I2PActivityBase.java b/android/src/net/i2p/android/router/activity/I2PActivityBase.java deleted file mode 100644 index 180f289abe10b8b08edf4c51f1026bc35f3e1b56..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/android/router/activity/I2PActivityBase.java +++ /dev/null @@ -1,65 +0,0 @@ -package net.i2p.android.router.activity; - -import android.app.Activity; -import android.content.ComponentName; -import android.content.Intent; -import android.os.Bundle; - -public abstract class I2PActivityBase extends Activity { - protected String _myDir; - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - _myDir = getFilesDir().getAbsolutePath(); - } - - @Override - public void onRestart() - { - System.err.println(this + " onRestart called"); - super.onRestart(); - } - - @Override - public void onStart() - { - System.err.println(this + " onStart called"); - super.onStart(); - Intent intent = new Intent(); - intent.setClassName(this, "net.i2p.android.router.service.RouterService"); - System.err.println(this + " calling startService"); - ComponentName name = startService(intent); - System.err.println(this + " got from startService: " + name); - } - - @Override - public void onResume() - { - System.err.println(this + " onResume called"); - super.onResume(); - } - - @Override - public void onPause() - { - System.err.println(this + " onPause called"); - super.onPause(); - } - - @Override - public void onStop() - { - System.err.println(this + " onStop called"); - super.onStop(); - } - - @Override - public void onDestroy() - { - System.err.println(this + "onDestroy called"); - super.onDestroy(); - } -} diff --git a/android/src/net/i2p/android/router/activity/MainActivity.java b/android/src/net/i2p/android/router/activity/MainActivity.java deleted file mode 100644 index d16d49635062699817c05d38876f949df9b30145..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/android/router/activity/MainActivity.java +++ /dev/null @@ -1,16 +0,0 @@ -package net.i2p.android.router.activity; - -import android.os.Bundle; - -import net.i2p.android.router.R; - -public class MainActivity extends I2PActivityBase { - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - } -} diff --git a/android/src/net/i2p/android/router/service/Init.java b/android/src/net/i2p/android/router/service/Init.java deleted file mode 100644 index 8928385e3d0f8eb4d53ee027b8e6e4817c886b04..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/android/router/service/Init.java +++ /dev/null @@ -1,134 +0,0 @@ -package net.i2p.android.router.service; - -import android.content.Context; -import android.content.pm.PackageInfo; -import android.content.pm.PackageManager; -import android.content.res.Resources; -import android.content.res.Resources.NotFoundException; -import android.os.Build; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.IOException; -import java.util.List; -import java.util.Properties; - -import net.i2p.android.router.R; -import net.i2p.data.DataHelper; -import net.i2p.router.Router; -import net.i2p.router.RouterContext; -import net.i2p.router.RouterLaunch; -import net.i2p.util.OrderedProperties; -import net.i2p.util.NativeBigInteger; - -class Init { - - private final Context ctx; - private final String myDir; - - public Init(Context c) { - ctx = c; - myDir = c.getFilesDir().getAbsolutePath(); - } - - void debugStuff() { - System.err.println("java.io.tmpdir" + ": " + System.getProperty("java.io.tmpdir")); - System.err.println("java.vendor" + ": " + System.getProperty("java.vendor")); - System.err.println("java.version" + ": " + System.getProperty("java.version")); - System.err.println("os.arch" + ": " + System.getProperty("os.arch")); - System.err.println("os.name" + ": " + System.getProperty("os.name")); - System.err.println("os.version" + ": " + System.getProperty("os.version")); - System.err.println("user.dir" + ": " + System.getProperty("user.dir")); - System.err.println("user.home" + ": " + System.getProperty("user.home")); - System.err.println("user.name" + ": " + System.getProperty("user.name")); - System.err.println("getFilesDir()" + ": " + myDir); - System.err.println("Package" + ": " + ctx.getPackageName()); - System.err.println("Version" + ": " + getOurVersion()); - System.err.println("MODEL" + ": " + Build.MODEL); - System.err.println("DISPLAY" + ": " + Build.DISPLAY); - System.err.println("VERSION" + ": " + Build.VERSION.RELEASE); - System.err.println("SDK" + ": " + Build.VERSION.SDK); - } - - private String getOurVersion() { - PackageManager pm = ctx.getPackageManager(); - String us = ctx.getPackageName(); - try { - PackageInfo pi = pm.getPackageInfo(us, 0); - System.err.println("VersionCode" + ": " + pi.versionCode); - if (pi.versionName != null) - return pi.versionName; - } catch (Exception e) {} - return "??"; - } - - void initialize() { - mergeResourceToFile(R.raw.router_config, "router.config"); - mergeResourceToFile(R.raw.logger_config, "logger.config"); - copyResourceToFile(R.raw.blocklist_txt, "blocklist.txt"); - - // Set up the locations so Router and WorkingDir can find them - System.setProperty("i2p.dir.base", myDir); - System.setProperty("i2p.dir.config", myDir); - System.setProperty("wrapper.logfile", myDir + "/wrapper.log"); - } - - private void copyResourceToFile(int resID, String f) { - InputStream in = null; - FileOutputStream out = null; - - System.err.println("Creating file " + f + " from resource"); - byte buf[] = new byte[4096]; - try { - // Context methods - in = ctx.getResources().openRawResource(resID); - out = ctx.openFileOutput(f, 0); - - int read = 0; - while ( (read = in.read(buf)) != -1) - out.write(buf, 0, read); - - } catch (IOException ioe) { - } catch (Resources.NotFoundException nfe) { - } finally { - if (in != null) try { in.close(); } catch (IOException ioe) {} - if (out != null) try { out.close(); } catch (IOException ioe) {} - } - } - - /** - * Load defaults from resource, - * then add props from file, - * and write back - */ - private void mergeResourceToFile(int resID, String f) { - InputStream in = null; - InputStream fin = null; - - byte buf[] = new byte[4096]; - try { - Properties props = new OrderedProperties(); - in = ctx.getResources().openRawResource(resID); - DataHelper.loadProps(props, in); - - try { - fin = ctx.openFileInput(f); - DataHelper.loadProps(props, fin); - System.err.println("Merging resource into file " + f); - } catch (IOException ioe) { - System.err.println("Creating file " + f + " from resource"); - } finally { - if (fin != null) try { fin.close(); } catch (IOException ioe) {} - } - - DataHelper.storeProps(props, ctx.getFileStreamPath(f)); - } catch (IOException ioe) { - } catch (Resources.NotFoundException nfe) { - } finally { - if (in != null) try { in.close(); } catch (IOException ioe) {} - if (fin != null) try { fin.close(); } catch (IOException ioe) {} - } - } - -} diff --git a/android/src/net/i2p/android/router/service/RouterService.java b/android/src/net/i2p/android/router/service/RouterService.java deleted file mode 100644 index 50d7cf644a268deb4b9283602199cdad11c4fc10..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/android/router/service/RouterService.java +++ /dev/null @@ -1,137 +0,0 @@ -package net.i2p.android.router.service; - -import android.app.Service; -import android.content.Context; -import android.content.Intent; -import android.os.Bundle; -import android.os.IBinder; - -import java.util.List; - -import net.i2p.android.router.R; -import net.i2p.router.Router; -import net.i2p.router.RouterContext; -import net.i2p.router.RouterLaunch; -import net.i2p.util.NativeBigInteger; - -/** - * Runs the router - */ -public class RouterService extends Service { - private RouterContext _context; - private String _myDir; - private int _state; - private Thread _starterThread; - private StatusBar _statusBar; - private final Object _stateLock = new Object(); - - private static final int STATE_INIT = 0; - private static final int STATE_STARTING = 1; - private static final int STATE_RUNNING = 2; - private static final int STATE_STOPPING = 3; - private static final int STATE_STOPPED = 4; - - private static final String MARKER = "************************************** "; - - @Override - public void onCreate() { - System.err.println(this + " onCreate called" + - " Current state is: " + _state); - - _myDir = getFilesDir().getAbsolutePath(); - Init init = new Init(this); - init.debugStuff(); - init.initialize(); - _statusBar = new StatusBar(this); - } - - @Override - public int onStartCommand(Intent intent, int flags, int startId) { - System.err.println(this + " onStart called" + - "Current state is: " + _state); - synchronized (_stateLock) { - if (_state != STATE_INIT) - return START_STICKY; - _statusBar.update("I2P is starting up"); - _state = STATE_STARTING; - _starterThread = new Thread(new Starter()); - _starterThread.start(); - } - return START_STICKY; - } - - private class Starter implements Runnable { - public void run() { - System.err.println(MARKER + this + " starter thread"); - NativeBigInteger.main(null); - RouterLaunch.main(null); - synchronized (_stateLock) { - if (_state != STATE_STARTING) - return; - _state = STATE_RUNNING; - List contexts = RouterContext.listContexts(); - if ( (contexts == null) || (contexts.isEmpty()) ) - throw new IllegalStateException("No contexts. This is usually because the router is either starting up or shutting down."); - _statusBar.update("I2P is running"); - _context = (RouterContext)contexts.get(0); - _context.router().setKillVMOnEnd(false); - _context.addShutdownTask(new ShutdownHook()); - _starterThread = null; - } - System.err.println("Router.main finished"); - } - } - - @Override - public IBinder onBind(Intent intent) - { - System.err.println("onBind called" + - "Current state is: " + _state); - return null; - } - - @Override - public void onDestroy() { - System.err.println("onDestroy called" + - "Current state is: " + _state); - synchronized (_stateLock) { - if (_state == STATE_STARTING) - _starterThread.interrupt(); - if (_state == STATE_STARTING || _state == STATE_RUNNING) { - _state = STATE_STOPPING; - // should this be in a thread? - _statusBar.update("I2P is stopping"); - Thread stopperThread = new Thread(new Stopper()); - stopperThread.start(); - } else if (_state != STATE_STOPPING) { - _statusBar.off(this); - } - } - } - - private class Stopper implements Runnable { - public void run() { - System.err.println(MARKER + this + " stopper thread"); - _context.router().shutdown(Router.EXIT_HARD); - _statusBar.off(RouterService.this); - System.err.println("shutdown complete"); - synchronized (_stateLock) { - _state = STATE_STOPPED; - } - } - } - - private class ShutdownHook implements Runnable { - public void run() { - System.err.println(this + " shutdown hook" + - "Current state is: " + _state); - synchronized (_stateLock) { - if (_state == STATE_STARTING || _state == STATE_RUNNING) { - _state = STATE_STOPPED; - _statusBar.off(RouterService.this); - stopSelf(); - } - } - } - } -} diff --git a/android/src/net/i2p/android/router/service/StatusBar.java b/android/src/net/i2p/android/router/service/StatusBar.java deleted file mode 100644 index 08b473fd696324316e0a0b3b3844983090992d67..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/android/router/service/StatusBar.java +++ /dev/null @@ -1,45 +0,0 @@ -package net.i2p.android.router.service; - -import android.app.Notification; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.content.Context; -import android.content.Intent; - -import net.i2p.android.router.R; -import net.i2p.android.router.activity.MainActivity; - -public class StatusBar { - - private final Context ctx; - private final Intent intent; - private final Notification notif; - private final NotificationManager mgr; - - private static final int ID = 1; - - StatusBar(Context cx) { - ctx = cx; - String ns = Context.NOTIFICATION_SERVICE; - mgr = (NotificationManager)ctx.getSystemService(ns); - - int icon = R.drawable.ic_launcher_itoopie; - String text = "Starting I2P"; - long now = System.currentTimeMillis(); - notif = new Notification(icon, text, now); - notif.flags |= Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR; - intent = new Intent(ctx, MainActivity.class); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - } - - public void update(String details) { - String title = "I2P Status"; - PendingIntent pi = PendingIntent.getActivity(ctx, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); - notif.setLatestEventInfo(ctx, title, details, pi); - mgr.notify(ID, notif); - } - - public void off(Context ctx) { - mgr.cancel(ID); - } -} diff --git a/android/src/net/i2p/util/LogWriter.java b/android/src/net/i2p/util/LogWriter.java deleted file mode 100644 index 18ba54c8ed3f7f5a1b1b6d1bb507fa5db8171859..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/util/LogWriter.java +++ /dev/null @@ -1,174 +0,0 @@ -package net.i2p.util; - -/* - * public domain - * - */ - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.List; -import java.util.Queue; - -/** - * bridge to android logging - * - * @author zzz - */ -class LogWriter implements Runnable { - private final static long CONFIG_READ_ITERVAL = 10 * 1000; - private long _lastReadConfig = 0; - private long _numBytesInCurrentFile = 0; - private OutputStream _currentOut; // = System.out - private int _rotationNum = -1; - private String _logFilenamePattern; - private File _currentFile; - private LogManager _manager; - - private boolean _write; - - private LogWriter() { // nop - } - - public LogWriter(LogManager manager) { - _manager = manager; - } - - public void stopWriting() { - _write = false; - } - - public void run() { - _write = true; - try { - while (_write) { - flushRecords(); - rereadConfig(); - } - System.err.println("Done writing"); - } catch (Exception e) { - System.err.println("Error writing the logs: " + e.getMessage()); - e.printStackTrace(); - } - } - - public void flushRecords() { flushRecords(true); } - public void flushRecords(boolean shouldWait) { - try { - // zero copy, drain the manager queue directly - Queue<LogRecord> records = _manager.getQueue(); - if (records == null) return; - if (!records.isEmpty()) { - LogRecord rec; - while ((rec = records.poll()) != null) { - writeRecord(rec); - } - try { - if (_currentOut != null) - _currentOut.flush(); - } catch (IOException ioe) { - //if (++_diskFullMessageCount < MAX_DISKFULL_MESSAGES) - System.err.println("Error writing the router log - disk full? " + ioe); - } - } - } catch (Throwable t) { - t.printStackTrace(); - } finally { - if (shouldWait) { - try { - synchronized (this) { - this.wait(10*1000); - } - } catch (InterruptedException ie) { // nop - } - } - } - } - - public String currentFile() { - return _currentFile != null ? _currentFile.getAbsolutePath() : "uninitialized"; - } - - private void rereadConfig() { - long now = Clock.getInstance().now(); - if (now - _lastReadConfig > CONFIG_READ_ITERVAL) { - _manager.rereadConfig(); - _lastReadConfig = now; - } - } - - private void writeRecord(LogRecord rec) { - if (rec.getThrowable() == null) - log(rec.getPriority(), rec.getSource(), rec.getSourceName(), rec.getThreadName(), rec.getMessage()); - else - log(rec.getPriority(), rec.getSource(), rec.getSourceName(), rec.getThreadName(), rec.getMessage(), rec.getThrowable()); - } - - public void log(int priority, Class src, String name, String threadName, String msg) { - if (src != null) { - String tag = src.getName(); - int dot = tag.lastIndexOf("."); - if (dot >= 0) - tag = tag.substring(dot + 1); - android.util.Log.println(toAndroidLevel(priority), - tag, - '[' + threadName + "] " + msg); - } else if (name != null) - android.util.Log.println(toAndroidLevel(priority), - name, - '[' + threadName + "] " + msg); - else - android.util.Log.println(toAndroidLevel(priority), - threadName, msg); - } - - public void log(int priority, Class src, String name, String threadName, String msg, Throwable t) { - if (src != null) { - String tag = src.getName(); - int dot = tag.lastIndexOf("."); - if (dot >= 0) - tag = tag.substring(dot + 1); - android.util.Log.println(toAndroidLevel(priority), - tag, - '[' + threadName + "] " + msg + - ' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t)); - } else if (name != null) - android.util.Log.println(toAndroidLevel(priority), - name, - '[' + threadName + "] " + msg + - ' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t)); - else - android.util.Log.println(toAndroidLevel(priority), - threadName, - msg + ' ' + t.toString() + ' ' + android.util.Log.getStackTraceString(t)); - } - - private static int toAndroidLevel(int level) { - switch (level) { - case Log.DEBUG: - return android.util.Log.DEBUG; - case Log.INFO: - return android.util.Log.INFO; - case Log.WARN: - return android.util.Log.WARN; - case Log.ERROR: - case Log.CRIT: - default: - return android.util.Log.ERROR; - } - } - - private static final String replace(String pattern, int num) { - char c[] = pattern.toCharArray(); - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < c.length; i++) { - if ( (c[i] != '#') && (c[i] != '@') ) - buf.append(c[i]); - else - buf.append(num); - } - return buf.toString(); - } -} diff --git a/android/src/net/i2p/util/SecureDirectory.java b/android/src/net/i2p/util/SecureDirectory.java deleted file mode 100644 index 0c34c91c054caf237279f2d3099a758cfca03c67..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/util/SecureDirectory.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.i2p.util; - -import java.io.File; - -/** - * setXXX() not available until API level 9 (Platform Version 2.3) - * @since 0.8.7 - */ -public class SecureDirectory extends File { - - public SecureDirectory(String pathname) { - super(pathname); - } - - public SecureDirectory(String parent, String child) { - super(parent, child); - } - - public SecureDirectory(File parent, String child) { - super(parent, child); - } -} diff --git a/android/src/net/i2p/util/SecureFile.java b/android/src/net/i2p/util/SecureFile.java deleted file mode 100644 index e9362ef946873f6f6875eb0677611a90bd38ef52..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/util/SecureFile.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.i2p.util; - -import java.io.File; - -/** - * setXXX() not available until API level 9 (Platform Version 2.3) - * @since 0.8.7 - */ -public class SecureFile extends SecureDirectory { - - public SecureFile(String pathname) { - super(pathname); - } - - public SecureFile(String parent, String child) { - super(parent, child); - } - - public SecureFile(File parent, String child) { - super(parent, child); - } -} diff --git a/android/src/net/i2p/util/SecureFileOutputStream.java b/android/src/net/i2p/util/SecureFileOutputStream.java deleted file mode 100644 index e45798cf988741fb430fae2f5cf334d4989354b6..0000000000000000000000000000000000000000 --- a/android/src/net/i2p/util/SecureFileOutputStream.java +++ /dev/null @@ -1,53 +0,0 @@ -package net.i2p.util; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; - -import net.i2p.I2PAppContext; - -/** - * setXXX() not available until API level 9 (Platform Version 2.3) - * @since 0.8.7 - */ -public class SecureFileOutputStream extends FileOutputStream { - - /** - * super() - */ - public SecureFileOutputStream(String file) throws FileNotFoundException { - super(file); - } - - /** - * super() - */ - public SecureFileOutputStream(String file, boolean append) throws FileNotFoundException { - super(file, append); - } - - /** - * super() - */ - public SecureFileOutputStream(File file) throws FileNotFoundException { - super(file); - } - - /** - * super() - */ - public SecureFileOutputStream(File file, boolean append) throws FileNotFoundException { - super(file, append); - } - - /** @return false */ - static boolean canSetPerms() { - return false; - } - - /** - * noop - */ - public static void setPerms(File f) { - } -} diff --git a/apps/addressbook/build.xml b/apps/addressbook/build.xml index 30750a231fcb8d95bb4bce5572d5ae315f6b96e5..2fe77475cb9d1dab7707b0e547e25a1ccefa2e3f 100644 --- a/apps/addressbook/build.xml +++ b/apps/addressbook/build.xml @@ -51,6 +51,8 @@ <!-- unused for now, as we oddly ship addressbook as a .war --> <target name="jar" depends="compile, changes"> <jar basedir="${build}" destfile="${dist}/${jar}"> + <!-- set if unset --> + <property name="workspace.changes" value="" /> <manifest> <attribute name="Main-Class" value="addressbook.Daemon"/> <attribute name="Build-Date" value="${build.timestamp}" /> @@ -67,6 +69,8 @@ <copy todir="${dist}/tmp/WEB-INF/classes"> <fileset dir="${build}"/> </copy> + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}"> <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> @@ -81,9 +85,17 @@ <uptodate property="war.uptodate" targetfile="${dist}/${war}"> <srcfiles dir= "." includes="${build}/**/*.class, web.xml"/> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="war.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> - <target name="changes"> + <target name="changes" depends="warUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> diff --git a/apps/desktopgui/build.xml b/apps/desktopgui/build.xml index 9a2bb13fb676f2f047f3206fdc40e014e8928271..b85975d8bd0cd4b0346a2c7b59fea80fc5b70c9b 100644 --- a/apps/desktopgui/build.xml +++ b/apps/desktopgui/build.xml @@ -29,8 +29,7 @@ <compilerarg line="${javac.compilerargs}" /> <classpath> <pathelement location="../../core/java/build/i2p.jar" /> - <!-- doesn't matter if we're not on win32, we just need the java classes, not the platform-dependent code --> - <pathelement location="../../installer/lib/wrapper/win32/wrapper.jar" /> + <pathelement location="../../installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="../../router/java/build/router.jar" /> </classpath> </javac> @@ -39,7 +38,7 @@ </copy> </target> - <target name="jar" depends="compile"> + <target name="bundle" > <exec executable="sh" osfamily="unix" failifexecutionfails="true" > <arg value="./bundle-messages.sh" /> </exec> @@ -50,6 +49,9 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + </target> + + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -61,6 +63,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, bundle, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar basedir="${build}" destfile="${dist}/${jar}"> <manifest> <attribute name="Main-Class" value="net.i2p.desktopgui.Main"/> @@ -71,6 +78,20 @@ </jar> </target> + <target name="jarUpToDate"> + <uptodate property="jar.uptodate" targetfile="${dist}/${jar}" > + <srcfiles dir= "." includes="build/**/*.class" /> + </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> + </target> + <target name="javadoc"> <mkdir dir="${build}" /> <mkdir dir="${build}/${javadoc}" /> diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml index e500dcc614fbbc4626266a302acb9b2d5e7ce136..f5906e3bf840e859ae005682e1506073f05ae557 100644 --- a/apps/i2psnark/java/build.xml +++ b/apps/i2psnark/java/build.xml @@ -36,7 +36,7 @@ </javac> </target> - <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -48,6 +48,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class"> <manifest> <attribute name="Main-Class" value="org.klomp.snark.Snark" /> @@ -63,6 +68,17 @@ <uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" > <srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <not> + <isset property="wjar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <!-- Ideally we would include @@ -72,7 +88,9 @@ - So we must continue to duplicate everything in the war. <classes dir="./build/obj" includes="**/I2PSnarkServlet*.class" /> --> - <target name="war" depends="jar, bundle, warUpToDate" unless="war.uptodate" > + <target name="war" depends="jar, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <war destfile="../i2psnark.war" webxml="../web.xml" basedir="../" includes="_icons/*" > <!-- include only the web stuff, as of 0.7.12 the router will add i2psnark.jar to the classpath for the war --> <classes dir="./build/obj" includes="**/web/*.class" /> diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml index 56ca6f30b08a6c63702aec839aba8968c1954e12..b7fe4e908311263b745bfca82b457c70953c8877 100644 --- a/apps/i2ptunnel/java/build.xml +++ b/apps/i2ptunnel/java/build.xml @@ -34,10 +34,7 @@ </javac> </target> - <!-- TODO: Move the web classes from the jar to the war - they are not part of the API - - This will require sponge to rewrite some seedless stuff that uses it. - --> - <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -49,6 +46,15 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + + <!-- TODO: Move the web classes from the jar to the war - they are not part of the API + - This will require sponge to rewrite some seedless stuff that uses it. + --> + <target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.j.tr" value="" /> <jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class"> <manifest> <attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" /> @@ -64,6 +70,14 @@ <uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" > <srcfiles dir= "build/obj" includes="**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="bundle" depends="compile, precompilejsp"> @@ -97,7 +111,7 @@ </exec> </target> - <target name="war" depends="precompilejsp, bundle, warUpToDate" unless="war.uptodate" > + <target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" > <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -109,6 +123,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="war" depends="precompilejsp, bundle, warUpToDate, listChangedFiles2" unless="war.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.w.tr" value="" /> <war destfile="build/i2ptunnel.war" webxml="../jsp/web-out.xml" basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp"> <manifest> @@ -123,6 +142,14 @@ <uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" > <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" /> </uptodate> + <condition property="shouldListChanges2" > + <and> + <not> + <isset property="war.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="precompilejsp" depends="jar" unless="precompilejsp.uptodate"> diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml index 73ac7a1d1654fc6179ae4d2ee7998925b6ddad51..e686e364a73c17db730bbcf1959f1bc4f5f3ca05 100644 --- a/apps/jetty/build.xml +++ b/apps/jetty/build.xml @@ -98,7 +98,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -110,6 +110,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" > <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> @@ -123,6 +128,14 @@ <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" > <srcfiles dir= "build/obj" includes="**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="clean" > diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml index 8fcd2d517c8aa9c16a5b98543b5083eb83209d4e..8904bafb3b1ddb7f01c3e3356c881611b50aafb8 100644 --- a/apps/ministreaming/java/build.xml +++ b/apps/ministreaming/java/build.xml @@ -31,7 +31,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -43,6 +43,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" > <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> @@ -56,6 +61,14 @@ <uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" > <srcfiles dir= "." includes="build/obj/**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="javadoc"> diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index 778625f7ab321669398d5a9f6bbab53132908726..7de6836ccd241d207568faf18a8bf2bdda939f40 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -25,7 +25,7 @@ <pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../desktopgui/build" /> - <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 --> + <pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" /> </classpath> </depend> @@ -57,7 +57,7 @@ <pathelement location="../../systray/java/build/systray.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../desktopgui/dist/desktopgui.jar" /> - <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 --> + <pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" /> </classpath> </javac> @@ -67,7 +67,7 @@ <target name="jar" depends="jar1, war, bundle" /> <!-- the jar without the latest message classes from the jsps --> - <target name="jar1" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -80,6 +80,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar1" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.j.tr" value="" /> <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class"> <manifest> <!-- top level installer will rename to jrobin.jar --> @@ -115,6 +120,14 @@ <uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" > <srcfiles dir= "build/obj" includes="**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="poupdate" depends="precompilejsp"> @@ -134,8 +147,7 @@ </exec> </target> - <!-- does NOT update the message classes, as those go in the jar --> - <target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" > + <target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" > <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -147,6 +159,12 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <!-- does NOT update the message classes, as those go in the jar --> + <target name="war" depends="precompilejsp, warUpToDate, listChangedFiles2" unless="war.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.w.tr" value="" /> <!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ --> <war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml" basedir="../jsp/" excludes="web.xml, *.css, **/*.java, *.jsp, *.jsi, web-fragment.xml, web-out.xml"> @@ -162,6 +180,14 @@ <uptodate property="war.uptodate" targetfile="build/routerconsole.war" > <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate"> @@ -211,7 +237,7 @@ <pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../desktopgui/dist/desktopgui.jar" /> - <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> + <pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="build/routerconsole.jar" /> <pathelement location="build/" /> <pathelement location="../../../router/java/build/router.jar" /> @@ -243,7 +269,7 @@ <pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../desktopgui/dist/desktopgui.jar" /> - <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> + <pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="build/routerconsole.jar" /> <pathelement location="build" /> <pathelement location="../../../router/java/build/router.jar" /> diff --git a/apps/sam/java/build.xml b/apps/sam/java/build.xml index 7e62fd27c2fee17fdbb77c6084c394dd6eacfdda..d55ed0d61c3bca555838c1067b553d83caf21986 100644 --- a/apps/sam/java/build.xml +++ b/apps/sam/java/build.xml @@ -45,7 +45,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -57,6 +57,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class"> <manifest> <attribute name="Main-Class" value="net.i2p.sam.SAMBridge" /> @@ -72,6 +77,14 @@ <uptodate property="jar.uptodate" targetfile="build/sam.jar" > <srcfiles dir= "build/obj" includes="**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="jarTest" depends="jar, compileTest"> diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml index 1351399b72c66ba1c692ab57a077de1e95558a66..b5c842f5b94641dd273d53dd46104893e1b84470 100644 --- a/apps/streaming/java/build.xml +++ b/apps/streaming/java/build.xml @@ -44,7 +44,7 @@ </javac> </target> - <target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -56,6 +56,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="builddep, compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" > <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> @@ -69,6 +74,14 @@ <uptodate property="jar.uptodate" targetfile="build/streaming.jar" > <srcfiles dir= "." includes="build/obj/**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="jarTest" depends="jar, compileTest"> diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml index d2dc2f121b7383f03a905a30fba065563b03526d..9fe4f3497ddf0211a6e2ac251abb8fb3dd81ec0c 100644 --- a/apps/susidns/src/build.xml +++ b/apps/susidns/src/build.xml @@ -67,7 +67,7 @@ <target name="all" depends="war"/> - <target name="war" depends="compile, precompilejsp, bundle, warUpToDate" unless="war.uptodate" > + <target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -79,6 +79,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="war" depends="compile, precompilejsp, bundle, warUpToDate" unless="war.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <war destfile="${project}.war" webxml="WEB-INF/web-out.xml"> <fileset dir="."> <include name="WEB-INF/**/*.class"/> @@ -102,6 +107,14 @@ <uptodate property="war.uptodate" targetfile="${project}.war"> <srcfiles dir= "." includes="WEB-INF/web-out.xml WEB-INF/**/*.class images/*.png css.css index.html WEB-INF/classes/${project}.properties" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="war.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="bundle" depends="compile, precompilejsp"> diff --git a/apps/susimail/build.xml b/apps/susimail/build.xml index b38edf9b9ad9ffa1a8be29e232e337bdf4c66d31..7c40f0e973ac455c1dfd06be474e4caabdad3c8d 100644 --- a/apps/susimail/build.xml +++ b/apps/susimail/build.xml @@ -22,7 +22,7 @@ </target> <target name="jar" depends="compile, war" /> - <target name="war" depends="compile, bundle, warUpToDate" unless="war.uptodate" > + <target name="listChangedFiles" depends="warUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -34,6 +34,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="war" depends="compile, bundle, warUpToDate, listChangedFiles" unless="war.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <war destfile="susimail.war" webxml="src/WEB-INF/web.xml" basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*"> <manifest> @@ -48,6 +53,14 @@ <uptodate property="war.uptodate" targetfile="susimail.war"> <srcfiles dir= "src" excludes="LICENSE src/**/*" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="war.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="bundle" depends="compile"> diff --git a/apps/systray/java/build.xml b/apps/systray/java/build.xml index dc8f08afb81d6bf6a57d6cee18bbbaf01ccca8f2..4dd50f0c98914c25456a0f2b25b70d1e74dac31e 100644 --- a/apps/systray/java/build.xml +++ b/apps/systray/java/build.xml @@ -23,7 +23,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate"> + <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -35,6 +35,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate"> + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/systray.jar" basedir="./build/obj" includes="**/*.class"> <manifest> <attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" /> @@ -50,6 +55,14 @@ <uptodate property="jar.uptodate" targetfile="./build/systray.jar"> <srcfiles dir= "build/obj" includes="**/*.class" /> </uptodate> + <condition property="shouldListChanges" > + <and> + <not> + <isset property="jar.uptodate" /> + </not> + <isset property="mtn.available" /> + </and> + </condition> </target> <target name="javadoc"> diff --git a/build.xml b/build.xml index 868235312fc4416ea9464f11ccfc849335b6265c..42e31f03818cdffc55dc07fb2eecaff9092cfdbd 100644 --- a/build.xml +++ b/build.xml @@ -159,11 +159,20 @@ </jar> </target> - <target name="buildProperties" > + <target name="checkForMtn" > + <available property="mtn.available" file="_MTN" type="dir" /> + </target> + + <target name="getMtnRev" depends="checkForMtn" if="mtn.available" > <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" > <arg value="automate" /> <arg value="get_base_revision_id" /> </exec> + </target> + + <target name="buildProperties" depends="getMtnRev" > + <!-- default if not set above --> + <property name="workspace.version" value="unknown" /> <tstamp> <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" /> </tstamp> @@ -240,21 +249,56 @@ <copy file="apps/addressbook/dist/addressbook.war" todir="build/" /> </target> - <target name="jbigi"> + <target name="jbigi-list-changes" depends="checkForMtn" if="mtn.available" > + <exec executable="mtn" outputproperty="workspace.changes.jbigi" errorproperty="mtn.error.jbigi" failifexecutionfails="false" > + <arg value="list" /> + <arg value="changed" /> + <arg value="installer/lib/jbigi" /> + </exec> + <!-- \n in an attribute value generates an invalid manifest --> + <exec executable="tr" inputstring="${workspace.changes.jbigi}" outputproperty="workspace.changes.jbigi.tr" errorproperty="mtn.error2" failifexecutionfails="false" > + <arg value="-s" /> + <arg value="[:space:]" /> + <arg value="," /> + </exec> + </target> + + <target name="jbigi" depends="buildProperties, jbigi-list-changes" > + <!-- set if unset --> + <property name="workspace.changes.jbigi.tr" value="" /> <jar destfile="build/jbigi.jar" whenmanifestonly="fail" > <fileset dir="installer/lib/jbigi" includes="*.so *.dll *.jnilib" /> + <manifest> + <attribute name="Build-Date" value="${build.timestamp}" /> + <attribute name="Base-Revision" value="${workspace.version}" /> + <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" /> + </manifest> </jar> </target> - <target name="jbigi-windows-only" > + <target name="jbigi-windows-only" depends="buildProperties, jbigi-list-changes" > + <!-- set if unset --> + <property name="workspace.changes.jbigi.tr" value="" /> <jar destfile="build/jbigi.jar" whenmanifestonly="fail" > <fileset dir="installer/lib/jbigi" includes="*windows*.dll" /> + <manifest> + <attribute name="Build-Date" value="${build.timestamp}" /> + <attribute name="Base-Revision" value="${workspace.version}" /> + <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" /> + </manifest> </jar> </target> - <target name="jbigi-linux-only"> + <target name="jbigi-linux-only" depends="buildProperties, jbigi-list-changes" > + <!-- set if unset --> + <property name="workspace.changes.jbigi.tr" value="" /> <jar destfile="build/jbigi.jar" whenmanifestonly="fail" > <fileset dir="installer/lib/jbigi" includes="*linux*.so" /> + <manifest> + <attribute name="Build-Date" value="${build.timestamp}" /> + <attribute name="Base-Revision" value="${workspace.version}" /> + <attribute name="Workspace-Changes" value="${workspace.changes.jbigi.tr}" /> + </manifest> </jar> </target> @@ -337,7 +381,7 @@ <pathelement location="apps/jetty/jettylib/javax.servlet.jar" /> <pathelement location="apps/systray/java/lib/systray4j.jar" /> <pathelement location="apps/jrobin/jrobin-1.5.9.1.jar" /> - <pathelement location="installer/lib/wrapper/win32/wrapper.jar" /> + <pathelement location="installer/lib/wrapper/all/wrapper.jar" /> <pathelement location="core/lib/junit.jar" /> </classpath> <link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="installer/resources/package-lists/java/" /> @@ -352,6 +396,9 @@ <delete file="syndie-standalone.zip" failonerror="false" quiet="true" /> <delete file="i2psnark-standalone.zip" failonerror="false" quiet="true" /> <delete file="BOB-one.jar" failonerror="false" quiet="true" /> + <delete dir="core/c/jbigi/bin" /> + <delete dir="core/c/jbigi/lib" /> + <delete dir="core/c/jcpuid/lib" /> <delete dir="debian/tmp" /> <delete dir="debian/db" /> <delete file="debian/files" /> @@ -434,6 +481,9 @@ <copy todir="pkg-temp/lib/wrapper/freebsd/"> <fileset dir="installer/lib/wrapper/freebsd/" /> </copy> + <copy todir="pkg-temp/lib/wrapper/freebsd64/"> + <fileset dir="installer/lib/wrapper/freebsd64" /> + </copy> <copy todir="pkg-temp/lib/wrapper/macosx/"> <fileset dir="installer/lib/wrapper/macosx/" /> </copy> @@ -451,22 +501,26 @@ <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" /> <copy file="installer/resources/fixperms.bat" todir="pkg-temp/" /> <copy file="installer/resources/install_i2p_service_winnt.bat" todir="pkg-temp/" /> - <copy file="installer/resources/postinstall.bat" todir="pkg-temp/" /> <copy file="installer/resources/set_config_dir_for_nt_service.bat" todir="pkg-temp/" /> <copy file="installer/resources/uninstall_i2p_service_winnt.bat" todir="pkg-temp/" /> + <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" /> <copy todir="pkg-temp/lib/wrapper/win32/"> <fileset dir="installer/lib/wrapper/win32/" /> </copy> + <copy todir="pkg-temp/lib/wrapper/win64/"> + <fileset dir="installer/lib/wrapper/win64/" /> + </copy> </target> <!-- only what is needed for debian, etc. --> <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" > <copy file="build/jbigi.jar" todir="pkg-temp/lib" /> + <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" /> </target> <target name="preppkg-linux" depends="preppkg-base"> <copy file="installer/resources/runplain.sh" todir="pkg-temp/" /> - <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> + <!-- <copy file="apps/i2psnark/launch-i2psnark" todir="pkg-temp/" /> old feature that per zzz isn't used--> <copy file="installer/resources/eepget" todir="pkg-temp/" /> <copy file="installer/resources/i2prouter" todir="pkg-temp/" /> <copy file="installer/resources/osid" todir="pkg-temp/" /> @@ -746,9 +800,8 @@ <target name="prepjupdatefixes" depends="prepupdate, buildWEB"> <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" /> </target> - <target name="installer" depends="preppkg, buildProperties"> - <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> - <mkdir dir="pkg-temp/installer" /> + + <target name="util-list-changes" depends="checkForMtn" if="mtn.available" > <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -760,6 +813,13 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="installer" depends="preppkg, buildProperties, util-list-changes" > + <taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> + <mkdir dir="pkg-temp/installer" /> + <!-- set if unset --> + <property name="workspace.changes.util.tr" value="" /> <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class"> <manifest> <attribute name="Main-Class" value="net.i2p.util.Copy" /> @@ -873,7 +933,7 @@ <arg value="-output"/> <arg value="i2p.fba"/> <arg value="-auxclasspath"/> - <arg value="build/commons-el.jar:build/commons-logging.jar:build/jasper-compiler.jar:build/jasper-runtime.jar:build/javax.servlet.jar:build/org.mortbay.jetty.jar:apps/jrobin/jrobin-1.5.9.1.jar:apps/systray/java/lib/systray4j.jar:installer/lib/wrapper/linux/wrapper.jar:apps/susidns/src/WEB-INF/lib/standard.jar:apps/susidns/src/WEB-INF/lib/jstl.jar:apps/jrobin/jrobin-1.5.9.1.jar"/> + <arg value="build/commons-el.jar:build/commons-logging.jar:build/jasper-compiler.jar:build/jasper-runtime.jar:build/javax.servlet.jar:build/org.mortbay.jetty.jar:apps/jrobin/jrobin-1.5.9.1.jar:apps/systray/java/lib/systray4j.jar:installer/lib/wrapper/all/wrapper.jar:apps/susidns/src/WEB-INF/lib/standard.jar:apps/susidns/src/WEB-INF/lib/jstl.jar:apps/jrobin/jrobin-1.5.9.1.jar"/> <arg value="-sourcepath"/> <arg value="apps/BOB/src/:apps/addressbook/java/src/:apps/i2psnark/java/src/:apps/i2ptunnel/java/src/:apps/ministreaming/java/src/:apps/routerconsole/java/src/:apps/sam/java/src/:apps/streaming/java/src/:apps/susidns/src/java/src/:apps/susimail/src/src/:apps/systray/java/src/:core/java/src/:router/java/src/"/> <!-- start of the files to be analyzed --> @@ -1179,7 +1239,7 @@ <copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" /> <!--wrapper - dont even think about it. i2p cosumes appreantly more mem without it on win32--> <copy file="installer/lib/wrapper/win32/wrapper.dll" todir="pkg-temp/lib" /> - <copy file="installer/lib/wrapper/win32/wrapper.jar" todir="pkg-temp/lib" /> + <copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" /> <copy file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" /> <!-- copy the unpack/start batchfiles --> <copy todir="pkg-temp"> diff --git a/core/java/build.xml b/core/java/build.xml index 045f86ef902d2fd6ac25da33cc52838bdd0a7aed..d6275085945258c6f4fad34e43b62fdf50395ce6 100644 --- a/core/java/build.xml +++ b/core/java/build.xml @@ -39,7 +39,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" if="mtn.available" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -51,6 +51,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/i2p.jar" basedir="./build/obj" includes="**/*.class" > <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> diff --git a/core/java/src/net/i2p/util/LogManager.java b/core/java/src/net/i2p/util/LogManager.java index c76ea02b69a3650249d0c3cc9425dd6b5761b992..b7d280491f6b7375c0e584acac41381a19f4e4f4 100644 --- a/core/java/src/net/i2p/util/LogManager.java +++ b/core/java/src/net/i2p/util/LogManager.java @@ -17,20 +17,18 @@ import java.text.DateFormat; import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.Map; import java.util.Properties; import java.util.Queue; import java.util.Set; import java.util.TimeZone; -import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingQueue; import net.i2p.I2PAppContext; +import net.i2p.data.DataHelper; /** * Manages the logging system, loading (and reloading) the configuration file, @@ -286,18 +284,11 @@ public class LogManager { } Properties p = new Properties(); - FileInputStream fis = null; try { - fis = new FileInputStream(cfgFile); - p.load(fis); + DataHelper.loadProps(p, cfgFile); _configLastRead = _context.clock().now(); } catch (IOException ioe) { System.err.println("Error loading logger config from " + cfgFile.getAbsolutePath()); - } finally { - if (fis != null) try { - fis.close(); - } catch (IOException ioe) { // nop - } } parseConfig(p); updateLimits(); @@ -363,6 +354,7 @@ public class LogManager { private void parseLimits(Properties config) { parseLimits(config, PROP_RECORD_PREFIX); } + private void parseLimits(Properties config, String recordPrefix) { _limits.clear(); if (config != null) { @@ -559,60 +551,47 @@ public class LogManager { return _rotationLimit; } + /** @return success */ public boolean saveConfig() { - String config = createConfig(); - FileOutputStream fos = null; + Properties props = createConfig(); try { - fos = new FileOutputStream(_locationFile); - fos.write(config.getBytes()); + DataHelper.storeProps(props, _locationFile); return true; } catch (IOException ioe) { getLog(LogManager.class).error("Error saving the config", ioe); return false; - } finally { - if (fos != null) try { fos.close(); } catch (IOException ioe) {} } } - private String createConfig() { - StringBuilder buf = new StringBuilder(8*1024); - buf.append(PROP_FORMAT).append('=').append(new String(_format)).append('\n'); - buf.append(PROP_DATEFORMAT).append('=').append(_dateFormatPattern).append('\n'); - buf.append(PROP_DISPLAYONSCREEN).append('=').append((_displayOnScreen ? "TRUE" : "FALSE")).append('\n'); + private Properties createConfig() { + Properties rv = new OrderedProperties(); + rv.setProperty(PROP_FORMAT, new String(_format)); + rv.setProperty(PROP_DATEFORMAT, _dateFormatPattern); + rv.setProperty(PROP_DISPLAYONSCREEN, Boolean.toString(_displayOnScreen)); String filenameOverride = _context.getProperty(FILENAME_OVERRIDE_PROP); if (filenameOverride == null) - buf.append(PROP_FILENAME).append('=').append(_baseLogfilename).append('\n'); + rv.setProperty(PROP_FILENAME, _baseLogfilename); else // this isn't technically correct - this could mess with some funky scenarios - buf.append(PROP_FILENAME).append('=').append(DEFAULT_FILENAME).append('\n'); + rv.setProperty(PROP_FILENAME, DEFAULT_FILENAME); if (_fileSize >= 1024*1024) - buf.append(PROP_FILESIZE).append('=').append( (_fileSize / (1024*1024))).append("m\n"); + rv.setProperty(PROP_FILESIZE, (_fileSize / (1024*1024)) + "m"); else if (_fileSize >= 1024) - buf.append(PROP_FILESIZE).append('=').append( (_fileSize / (1024))).append("k\n"); + rv.setProperty(PROP_FILESIZE, (_fileSize / (1024))+ "k"); else if (_fileSize > 0) - buf.append(PROP_FILESIZE).append('=').append(_fileSize).append('\n'); + rv.setProperty(PROP_FILESIZE, Integer.toString(_fileSize)); // if <= 0, dont specify - buf.append(PROP_ROTATIONLIMIT).append('=').append(_rotationLimit).append('\n'); - buf.append(PROP_DEFAULTLEVEL).append('=').append(Log.toLevelString(_defaultLimit)).append('\n'); - buf.append(PROP_DISPLAYONSCREENLEVEL).append('=').append(Log.toLevelString(_onScreenLimit)).append('\n'); - buf.append(PROP_CONSOLEBUFFERSIZE).append('=').append(_consoleBufferSize).append('\n'); + rv.setProperty(PROP_ROTATIONLIMIT, Integer.toString(_rotationLimit)); + rv.setProperty(PROP_DEFAULTLEVEL, Log.toLevelString(_defaultLimit)); + rv.setProperty(PROP_DISPLAYONSCREENLEVEL, Log.toLevelString(_onScreenLimit)); + rv.setProperty(PROP_CONSOLEBUFFERSIZE, Integer.toString(_consoleBufferSize)); - buf.append("# log limit overrides:\n"); - - TreeMap limits = new TreeMap(); for (LogLimit lim : _limits) { - limits.put(lim.getRootName(), Log.toLevelString(lim.getLimit())); - } - for (Iterator iter = limits.entrySet().iterator(); iter.hasNext(); ) { - Map.Entry entry = (Map.Entry)iter.next(); - String path = (String)entry.getKey(); - String lim = (String)entry.getValue(); - buf.append(PROP_RECORD_PREFIX).append(path); - buf.append('=').append(lim).append('\n'); + rv.setProperty(PROP_RECORD_PREFIX + lim.getRootName(), Log.toLevelString(lim.getLimit())); } - return buf.toString(); + return rv; } /** diff --git a/history.txt b/history.txt index 224d01d751b9516af76823b3f27f710f55d1321e..c6fa6c93ebed35e87bfc4b3617749c23f48611d2 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,33 @@ +2011-06-09 kytv + * Added an x64 wrapper for Windows. This is needed because a 32bit wrapper + cannot start a 64bit JVM. + +2011-06-08 zzz + * Build: + - Add standard manifest to jbigi.jar + - Don't do 'mtn list changed' if not in a workspace or not needed + * LogManager: Use DataHelper methods for loading and storing config + +2011-06-08 kytv + * Update jbigi/jcpuid Windows dlls. As was done for FreeBSD and Linux, the + libraries for 32bit CPUs were linked against gmp-4.3.2 and those for the + 64bit CPUs were linked against gmp-5.0.2. + +2011-06-07 kytv + * Upgrade the wrapper to 3.5.9. Noticable changes include: + - FreeBSD amd64 is now a supported arch along with i386. To use the wrapper + with the most recent version of FreeBSD the port 'misc/compat6x' will need + to be installed. + - OSX: Both Intel and PPC Macs are supported. 32-bit support. If you'd like 64-bit + support, please file a bug in trac with the output of "uname -m". + * Upgrade jbigi/jcpuid for FreeBSD i386 and add support for amd64. As was done with + the Linux compiles, 32bit compiles were linked with gmp 4.3.2 and 64 bit builds + (as well as 32bit builds for 64bit cpus) were linked against gmp 5.0.2. + +2011-06-06 zzz + * Drop andorid/ directory; further development will happen in + an android-only branch. + 2011-06-05 zzz * Console: Tag stat descriptions at declaration rather than in Strings.java * Data: Remove duplicate signature verification code @@ -13,7 +43,7 @@ The 4.3.2 files are half the size of those built with GMP 5.0.2, and there was little or no performance difference between the two versions for 32 bit processors. See http://zzz.i2p/topics/306 for discussion and test results. - - Replace old non-PIC 62-bit linux libs (GMP 4.1.4 built in 2005) + - Replace old non-PIC 64-bit linux libs (GMP 4.1.4 built in 2005) with PIC libs built with GMP 5.0.2. License is LGPLv3. Built by sponge with GCC 4.4.4, downloaded from http://sponge.i2p/files/jbigi/gmp-5.0.2/ diff --git a/installer/install.xml b/installer/install.xml index 4c0e9057e6facb955a666df0a7dba85cab8fea8c..a56b0aeddfd4a7349bc040752c139cf6a3505b63 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -130,13 +130,28 @@ <parsable targetfile="$INSTALL_PATH/eepget" type="shell" os="unix|mac" /> <parsable targetfile="$INSTALL_PATH/runplain.sh" type="shell" os="unix|mac" /> + <conditions> + <condition type="variable" id="is64bit"> + <name>SYSTEM_sun_arch_data_model</name> + <value>64</value> + </condition> + </conditions> <!-- postinstall stuff for windows --> + <!-- Wrapper for 32bit Windows JVM --> <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper\win32\I2Psvc.exe" /><arg value="$INSTALL_PATH" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.dll" /><arg value="$INSTALL_PATH\lib" /></args></executable> + <!-- wrapper for 64bit Windows JVM --> + <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn" + condition="is64bit" > <os family="windows" /> + <args><arg value="$INSTALL_PATH\lib\wrapper\win64\I2Psvc.exe" /><arg value="$INSTALL_PATH" /></args></executable> + <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn" + condition="is64bit" > <os family="windows" /> + <args><arg value="$INSTALL_PATH\lib\wrapper\win64\wrapper.dll" /><arg value="$INSTALL_PATH\lib" /></args></executable> + <!-- Arch-indep wrapper.jar on Windows --> <executable targetfile="$INSTALL_PATH/installer/copy.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> - <args><arg value="$INSTALL_PATH\lib\wrapper\win32\wrapper.jar" /><arg value="$INSTALL_PATH\lib" /></args></executable> + <args><arg value="$INSTALL_PATH\lib\wrapper\all\wrapper.jar" /><arg value="$INSTALL_PATH\lib" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\i2prouter" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> @@ -147,8 +162,6 @@ <args><arg value="$INSTALL_PATH\osid" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\postinstall.sh" /></args></executable> - <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> - <args><arg value="$INSTALL_PATH\postinstall.bat" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> <args><arg value="$INSTALL_PATH\uninstall_i2p_service_unix" /></args></executable> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" /> diff --git a/installer/lib/jbigi/README.txt b/installer/lib/jbigi/README.txt index 3f997e9c1596b7982babcf076d2e101a02aa2a5a..a1e5662c896df719b1b910547d00a8eac3ea4888 100644 --- a/installer/lib/jbigi/README.txt +++ b/installer/lib/jbigi/README.txt @@ -39,6 +39,10 @@ Updates May/June 2011: - jcpuid.c updated to be compatible with -fPIC - 32 bit libjcpuid-linux-x86.so updated, compiled with -fPIC. - 64 bit libjcpuid-linux-x86_64.so added, compiled with -fPIC. + - 32 bit libjcpuid-freebsd-x86.so updated, compiled with -fPIC. + - 64 bit libjcpid-freebsd-x86_64.so added, compiled with -fPIC. + - 32 bit libjcpuid-x86-solaris.so added, compiled with -fPIC. + - 32 bit jcpuid-windows.dll updated (no PIC for Windows). - See also javadoc and code in CPUID.java jbigi: - k62 and k63 are identical for all except windows; exception added to @@ -46,9 +50,13 @@ Updates May/June 2011: - All 32 bit linux files updated with GMP 4.3.2, compiled with -fPIC, except for athlon64 and pentium4, which use GMP 5.0.2. - All 64 bit linux files updated with GMP 5.0.2. - - libjbigi-windows-athlon64.dll deleted, it was a duplicate of - libjbigi-windows-athlon.dll. NativeBigInteger now uses athlon as - a fallback for all 64-bit processors. + - All 32 bit freebsd files updated with GMP 4.3.2, compiled with -fPIC. + - All 64 bit freebsd files are new and were linked with GMP 5.0.2. + - All existing windows files were updated with GMP 4.3.2. Just as was + done for the non-windows architectures, files for 64 bit CPUs were + linked with GMP 5.0.2. + - jbigi-windows-athlon64.dll was updated, it used to be duplicate of + jbigi-windows-athlon.dll. - Note that all new 64 bit files will use the _64 suffix. For example, the old libjbigi-linux-athlon64.so file was 64 bit; now it is 32 bit and the 64 bit file is libjbigi-linux-athlon64_64.so. diff --git a/installer/lib/jbigi/jbigi-windows-athlon.dll b/installer/lib/jbigi/jbigi-windows-athlon.dll index 993277816c8056cecf8402faba3a6a2f8eaa1380..f37af4d52cf47f5bd92641fb6a38e6f368acfa92 100644 Binary files a/installer/lib/jbigi/jbigi-windows-athlon.dll and b/installer/lib/jbigi/jbigi-windows-athlon.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-athlon64.dll b/installer/lib/jbigi/jbigi-windows-athlon64.dll new file mode 100644 index 0000000000000000000000000000000000000000..c3a1284529bdc15db803f63eeb84319ec5810d66 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-athlon64.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-atom.dll b/installer/lib/jbigi/jbigi-windows-atom.dll new file mode 100644 index 0000000000000000000000000000000000000000..1c536d0d2916aa8e5c11f7007aaf314b73124224 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-atom.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-core2.dll b/installer/lib/jbigi/jbigi-windows-core2.dll new file mode 100644 index 0000000000000000000000000000000000000000..cb5f02b17a66e2c17a0cabb630dd64541f0ed033 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-core2.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-corei.dll b/installer/lib/jbigi/jbigi-windows-corei.dll new file mode 100644 index 0000000000000000000000000000000000000000..ff0b6407f9fd0f0348fdbfe8cb6f49fac872ca49 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-corei.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-geode.dll b/installer/lib/jbigi/jbigi-windows-geode.dll new file mode 100644 index 0000000000000000000000000000000000000000..42c8163b26d9ae516089f2eb3c50716937bc3580 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-geode.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-k6.dll b/installer/lib/jbigi/jbigi-windows-k6.dll index 947bafec5f3ad0860cad1bbb36ca5824b05c2068..67c3ac73249dbd3051e15ecee106faef89a97415 100644 Binary files a/installer/lib/jbigi/jbigi-windows-k6.dll and b/installer/lib/jbigi/jbigi-windows-k6.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-k62.dll b/installer/lib/jbigi/jbigi-windows-k62.dll index d98c6d1ca0ba73748c70f787257058bcd111fc39..4c9bf3d63faac9184d9e98111996b3208048b69b 100644 Binary files a/installer/lib/jbigi/jbigi-windows-k62.dll and b/installer/lib/jbigi/jbigi-windows-k62.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-k63.dll b/installer/lib/jbigi/jbigi-windows-k63.dll index fd67e8f23196994cafe0ecad4fd0fd3253bb110e..f30439722eb5a067a316e1a4672b305830867018 100644 Binary files a/installer/lib/jbigi/jbigi-windows-k63.dll and b/installer/lib/jbigi/jbigi-windows-k63.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-nano.dll b/installer/lib/jbigi/jbigi-windows-nano.dll new file mode 100644 index 0000000000000000000000000000000000000000..5abcef8c91dfb248396be1518fec555196fb0c03 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-nano.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-none.dll b/installer/lib/jbigi/jbigi-windows-none.dll index 0528400b113a7fe052664a561dcc7a225f90fa48..867385437ee0376c1de0b48f8b50e2cdf3795a17 100644 Binary files a/installer/lib/jbigi/jbigi-windows-none.dll and b/installer/lib/jbigi/jbigi-windows-none.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentium.dll b/installer/lib/jbigi/jbigi-windows-pentium.dll index f1877792a3410dffa1d8c214741c8302c8a1e43c..e6eb409fab947bca051449c61202837781b53967 100644 Binary files a/installer/lib/jbigi/jbigi-windows-pentium.dll and b/installer/lib/jbigi/jbigi-windows-pentium.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentium2.dll b/installer/lib/jbigi/jbigi-windows-pentium2.dll index 0de688555a1f77947b7cbf9a987459eabf396d19..05f69cc9d57e064f9f159b8cdf04dd4f338e7666 100644 Binary files a/installer/lib/jbigi/jbigi-windows-pentium2.dll and b/installer/lib/jbigi/jbigi-windows-pentium2.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentium3.dll b/installer/lib/jbigi/jbigi-windows-pentium3.dll index 87551bf002d9ab85b6f357a2efd400a1ee7bd7c0..42f56e2364c8ce8dfdc7a930d2cadb907c0cac1c 100644 Binary files a/installer/lib/jbigi/jbigi-windows-pentium3.dll and b/installer/lib/jbigi/jbigi-windows-pentium3.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentium4.dll b/installer/lib/jbigi/jbigi-windows-pentium4.dll index 2e40144c2f59338b77030fcf4fb450f1fcd9f724..1ce973a35ac9896ba06cba3272f0018e0541f5ac 100644 Binary files a/installer/lib/jbigi/jbigi-windows-pentium4.dll and b/installer/lib/jbigi/jbigi-windows-pentium4.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentiumm.dll b/installer/lib/jbigi/jbigi-windows-pentiumm.dll new file mode 100644 index 0000000000000000000000000000000000000000..61084381e29bc23ccc55753def4e8a6822456809 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-pentiumm.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-pentiummmx.dll b/installer/lib/jbigi/jbigi-windows-pentiummmx.dll index 1614f1221174e739fed4b0565795358785b7c79a..4671081caee4b65627a2af35dc8dda726ae83d51 100644 Binary files a/installer/lib/jbigi/jbigi-windows-pentiummmx.dll and b/installer/lib/jbigi/jbigi-windows-pentiummmx.dll differ diff --git a/installer/lib/jbigi/jbigi-windows-viac3.dll b/installer/lib/jbigi/jbigi-windows-viac3.dll new file mode 100644 index 0000000000000000000000000000000000000000..7acee2246ea5a8275914bf5e34f84d3c9eddfbe4 Binary files /dev/null and b/installer/lib/jbigi/jbigi-windows-viac3.dll differ diff --git a/installer/lib/jbigi/jcpuid-x86-windows.dll b/installer/lib/jbigi/jcpuid-x86-windows.dll index ed77562e82ef4001fa4045e385e350bca22a6050..1b323c251eb41227fde288d84615bf8e7b1ddc95 100644 Binary files a/installer/lib/jbigi/jcpuid-x86-windows.dll and b/installer/lib/jbigi/jcpuid-x86-windows.dll differ diff --git a/installer/lib/jbigi/libjbigi-freebsd-viac32.so b/installer/lib/jbigi/libjbigi-freebsd-viac32.so deleted file mode 100755 index 751f732192212a6c0294c33d8e8e8cb2b3cd0f59..0000000000000000000000000000000000000000 Binary files a/installer/lib/jbigi/libjbigi-freebsd-viac32.so and /dev/null differ diff --git a/installer/lib/wrapper/all/wrapper.jar b/installer/lib/wrapper/all/wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..fa77ea9304cde2a819e5d3e5ec0b46bcc3266f91 Binary files /dev/null and b/installer/lib/wrapper/all/wrapper.jar differ diff --git a/installer/lib/wrapper/freebsd/i2psvc b/installer/lib/wrapper/freebsd/i2psvc index b6c3f0702f999cebe64cdff26093eb1a2f0cebb7..efb7dcb831a1d0893dd7906e694c22252618c716 100644 Binary files a/installer/lib/wrapper/freebsd/i2psvc and b/installer/lib/wrapper/freebsd/i2psvc differ diff --git a/installer/lib/wrapper/freebsd/libwrapper.so b/installer/lib/wrapper/freebsd/libwrapper.so index 31babdaa0e72f56426ea306aa07d8baa754e6e1c..0922eeb8e77731859f219eef26f4a0f089a574aa 100644 Binary files a/installer/lib/wrapper/freebsd/libwrapper.so and b/installer/lib/wrapper/freebsd/libwrapper.so differ diff --git a/installer/lib/wrapper/freebsd/wrapper.jar b/installer/lib/wrapper/freebsd/wrapper.jar deleted file mode 100644 index 83c4c3f7d9a5496ccfe217a2dbc2bff53e07afa0..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/freebsd/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/freebsd64/i2psvc b/installer/lib/wrapper/freebsd64/i2psvc new file mode 100755 index 0000000000000000000000000000000000000000..977a9c84ab9557c09a5256867d111052ae6b0560 Binary files /dev/null and b/installer/lib/wrapper/freebsd64/i2psvc differ diff --git a/installer/lib/wrapper/freebsd64/libwrapper.so b/installer/lib/wrapper/freebsd64/libwrapper.so new file mode 100755 index 0000000000000000000000000000000000000000..1a1581e287af11e55821b32e84169ffff2f0fc66 Binary files /dev/null and b/installer/lib/wrapper/freebsd64/libwrapper.so differ diff --git a/installer/lib/wrapper/linux/i2psvc b/installer/lib/wrapper/linux/i2psvc index 2a389f8e051c0c9b6952cc5b9c2075b3122eabbe..7bfaa0e3648f0ae6057a77cd200e56f7936b99a2 100644 Binary files a/installer/lib/wrapper/linux/i2psvc and b/installer/lib/wrapper/linux/i2psvc differ diff --git a/installer/lib/wrapper/linux/libwrapper.so b/installer/lib/wrapper/linux/libwrapper.so index 0d8763cb46c0f2e44745f950915f2b35009c9737..47c4b7fef9f142af7e39a2d85b62abafff812fdf 100644 Binary files a/installer/lib/wrapper/linux/libwrapper.so and b/installer/lib/wrapper/linux/libwrapper.so differ diff --git a/installer/lib/wrapper/linux/wrapper.jar b/installer/lib/wrapper/linux/wrapper.jar deleted file mode 100644 index 0a40b651f55e3a5ed4876f365d06140eecfa87f6..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/linux/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/linux64/i2psvc b/installer/lib/wrapper/linux64/i2psvc index b193016fecdc3b7ac1f415e5a901abc76c8f7ce6..a72f2f5094adb1591cb7ac09085b3d3f3976a7c1 100644 Binary files a/installer/lib/wrapper/linux64/i2psvc and b/installer/lib/wrapper/linux64/i2psvc differ diff --git a/installer/lib/wrapper/linux64/libwrapper.so b/installer/lib/wrapper/linux64/libwrapper.so index 583b4dce66e0d33adbf7105d04ba38e125d30249..331c37665ac9a9dc9995e0a23e0cbc59fa03ecbd 100644 Binary files a/installer/lib/wrapper/linux64/libwrapper.so and b/installer/lib/wrapper/linux64/libwrapper.so differ diff --git a/installer/lib/wrapper/linux64/wrapper.jar b/installer/lib/wrapper/linux64/wrapper.jar deleted file mode 100644 index 0bbe9a471f23872a9540513bf842f9ed7cc8936d..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/linux64/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/macosx/i2psvc b/installer/lib/wrapper/macosx/i2psvc index 79b975516d5482b047f9c7f5c9eede4877a33cb5..1e9d076dab65bc2ee385e69bf6b03edbc5cf6d28 100644 Binary files a/installer/lib/wrapper/macosx/i2psvc and b/installer/lib/wrapper/macosx/i2psvc differ diff --git a/installer/lib/wrapper/macosx/libwrapper.jnilib b/installer/lib/wrapper/macosx/libwrapper.jnilib index 3e09fa4907c8314ec50d9ee9e3325a1e173e3458..180e71592d9414af507c53d6e5dbcc4fa9787285 100644 Binary files a/installer/lib/wrapper/macosx/libwrapper.jnilib and b/installer/lib/wrapper/macosx/libwrapper.jnilib differ diff --git a/installer/lib/wrapper/macosx/readme.txt b/installer/lib/wrapper/macosx/readme.txt deleted file mode 100644 index 722642d4b1b507f5c4ece66c83bb60f5e00b3ed3..0000000000000000000000000000000000000000 --- a/installer/lib/wrapper/macosx/readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -The wrapper in here is built with an osx patch, backported from -the 3.1.2 per - http://sourceforge.net/tracker/index.php?func=detail& - aid=1262323& - group_id=39428& - atid=425187 diff --git a/installer/lib/wrapper/macosx/wrapper.c.diff b/installer/lib/wrapper/macosx/wrapper.c.diff deleted file mode 100644 index e6abc048dfb6f516c071ed291836cba5555e9d22..0000000000000000000000000000000000000000 --- a/installer/lib/wrapper/macosx/wrapper.c.diff +++ /dev/null @@ -1,78 +0,0 @@ ---- wrapper_3.1.1_src/src/c/wrapper.c Fri Jul 16 10:29:10 2004 -+++ wrapper_3.1.1_src_modified/src/c/wrapper.c Fri Sep 16 14:55:23 2005 -@@ -312,7 +312,13 @@ - #include <stdio.h> - #include <stdlib.h> - #include <time.h> -+ -+#ifdef MACOSX -+#include <sys/time.h> -+#else - #include <sys/timeb.h> -+#endif -+ - #include <sys/stat.h> - #include "wrapperinfo.h" - #include "wrapper.h" -@@ -760,16 +766,28 @@ - int len; - int pos; - int err; -+ -+ #ifdef MACOSX -+ struct timeval timeBuffer; -+ #else - struct timeb timeBuffer; -+ #endif -+ - long startTime; - int startTimeMillis; - long now; - int nowMillis; - long durr; - -+#ifdef MACOSX -+ gettimeofday(&timeBuffer, NULL); -+ startTime = now = timeBuffer.tv_sec; -+ startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000; -+#else - ftime( &timeBuffer ); - startTime = now = timeBuffer.time; - startTimeMillis = nowMillis = timeBuffer.millitm; -+#endif - - /* - log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis); -@@ -900,9 +918,15 @@ - } - - /* Get the time again */ -+#ifdef MACOSX -+ gettimeofday(&timeBuffer, NULL); -+ now = timeBuffer.tv_sec; -+ nowMillis = timeBuffer.tv_usec / 1000; -+#else - ftime( &timeBuffer ); - now = timeBuffer.time; - nowMillis = timeBuffer.millitm; -+#endif - } - /* - log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "done durr=%ld", durr); -@@ -2250,10 +2274,15 @@ - * Calculates a tick count using the system time. - */ - DWORD wrapperGetSystemTicks() { -+#ifdef MACOSX -+ struct timeval timeBuffer; -+ gettimeofday(&timeBuffer, NULL); -+ return (timeBuffer.tv_sec * 1000 + timeBuffer.tv_usec/1000) / WRAPPER_TICK_MS; -+#else - struct timeb timeBuffer; -- - ftime( &timeBuffer ); - return (timeBuffer.time * 1000 + timeBuffer.millitm) / WRAPPER_TICK_MS; -+#endif - } - - /** diff --git a/installer/lib/wrapper/macosx/wrapper.jar b/installer/lib/wrapper/macosx/wrapper.jar deleted file mode 100644 index 3d2b1559a495c2cf27fb101d9a8272ce238199db..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/macosx/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/macosx/wrapper_unix.c.diff b/installer/lib/wrapper/macosx/wrapper_unix.c.diff deleted file mode 100644 index 60053ed5c7262d6dfefe1f4b707a30179d2352df..0000000000000000000000000000000000000000 --- a/installer/lib/wrapper/macosx/wrapper_unix.c.diff +++ /dev/null @@ -1,60 +0,0 @@ ---- wrapper_3.1.1_src/src/c/wrapper_unix.c Fri Jul 16 10:29:10 2004 -+++ wrapper_3.1.1_src_modified/src/c/wrapper_unix.c Fri Sep 16 14:45:48 2005 -@@ -309,7 +309,13 @@ - #include <limits.h> - #include <pthread.h> - #include <pwd.h> -+ -+#ifdef MACOSX -+#include <sys/time.h> -+#else - #include <sys/timeb.h> -+#endif -+ - #include <sys/types.h> - #include <sys/stat.h> - #include <sys/wait.h> -@@ -1056,7 +1062,11 @@ - ssize_t bytesRead; - char readBuf [1025]; - int readBufPos, childOutputBufferPos; -+#ifdef MACOSX -+ struct timeval timeBuffer; -+#else - struct timeb timeBuffer; -+#endif - long startTime; - int startTimeMillis; - long now; -@@ -1064,9 +1074,15 @@ - long durr; - - if (jvmOut != -1) { -+#ifdef MACOSX -+ gettimeofday(&timeBuffer, NULL); -+ startTime = now = timeBuffer.tv_sec; -+ startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000; -+#else - ftime( &timeBuffer ); - startTime = now = timeBuffer.time; - startTimeMillis = nowMillis = timeBuffer.millitm; -+#endif - - /* - log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis); -@@ -1159,9 +1175,15 @@ - } - - /* Get the time again */ -+#ifdef MACOSX -+ gettimeofday(&timeBuffer, NULL); -+ now = timeBuffer.tv_sec; -+ nowMillis = timeBuffer.tv_usec / 1000; -+#else - ftime( &timeBuffer ); - now = timeBuffer.time; - nowMillis = timeBuffer.millitm; -+#endif - } - } - diff --git a/installer/lib/wrapper/solaris/wrapper.jar b/installer/lib/wrapper/solaris/wrapper.jar deleted file mode 100644 index 403247380648ac987c8c11d49157204e611fe45e..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/solaris/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/win32/I2Psvc.exe b/installer/lib/wrapper/win32/I2Psvc.exe index 392cf53d748391abf8bfa12e3216c3a95f1e105f..e6a0096a854e76896ff88bc7b1c8006840ee46be 100644 Binary files a/installer/lib/wrapper/win32/I2Psvc.exe and b/installer/lib/wrapper/win32/I2Psvc.exe differ diff --git a/installer/lib/wrapper/win32/wrapper.dll b/installer/lib/wrapper/win32/wrapper.dll index e15eaa8fdac27b2ef772a40ec6b030d1c6cf65d4..d1418f4af7c7c80a51b2cdd9ce9a2b5bc5a2c52c 100644 Binary files a/installer/lib/wrapper/win32/wrapper.dll and b/installer/lib/wrapper/win32/wrapper.dll differ diff --git a/installer/lib/wrapper/win32/wrapper.jar b/installer/lib/wrapper/win32/wrapper.jar deleted file mode 100644 index 46d7907b09a7fe434c0048d3c895b59d8c828c7b..0000000000000000000000000000000000000000 Binary files a/installer/lib/wrapper/win32/wrapper.jar and /dev/null differ diff --git a/installer/lib/wrapper/win64/I2Psvc.exe b/installer/lib/wrapper/win64/I2Psvc.exe new file mode 100755 index 0000000000000000000000000000000000000000..6d6b6103562f1f3defb934e2aa09ccce2020a3b5 Binary files /dev/null and b/installer/lib/wrapper/win64/I2Psvc.exe differ diff --git a/installer/lib/wrapper/win64/README-x64-win.txt b/installer/lib/wrapper/win64/README-x64-win.txt new file mode 100644 index 0000000000000000000000000000000000000000..e7f3279dc0d8eb0dea7ba34442c01bb43b2b3d39 --- /dev/null +++ b/installer/lib/wrapper/win64/README-x64-win.txt @@ -0,0 +1,5 @@ +Changes will probably be needed for newer versions than 3.5.9. + +To use the patch in this directory, copy Makefile-windows-x86-32.nmake to +Makefile-windows-x86-64.nmake then "patch < x64-win.patch". Compiles cleanly +using VS2010. diff --git a/installer/lib/wrapper/win64/wrapper.dll b/installer/lib/wrapper/win64/wrapper.dll new file mode 100644 index 0000000000000000000000000000000000000000..9f27992fae35cd90500a792f24deb748882e8f12 Binary files /dev/null and b/installer/lib/wrapper/win64/wrapper.dll differ diff --git a/installer/lib/wrapper/win64/x64-win.patch b/installer/lib/wrapper/win64/x64-win.patch new file mode 100644 index 0000000000000000000000000000000000000000..4679c6cd5b75bd7e8fc8c37b3269d34a37689cc4 --- /dev/null +++ b/installer/lib/wrapper/win64/x64-win.patch @@ -0,0 +1,26 @@ +--- Makefile-windows-x86-64.nmake 2011-05-28 21:12:05.383721860 +0000 ++++ Makefile-windows-x86-64.nmake 2011-06-09 19:43:59.349132461 +0000 +@@ -9,19 +9,19 @@ + + PROJ = wrapper + +-COMPILE = cl /D "WIN32" /D "NDEBUG" /FD /EHsc /MT /W3 /nologo /c /Zi /errorReport:prompt /D "_CRT_SECURE_NO_DEPRECATE" /D "UNICODE" /D "_UNICODE" /D "_WIN32_WINNT=0x0500" +-LINK = link /NOLOGO /MANIFEST /DEBUG /MACHINE:X86 /ERRORREPORT:PROMPT DelayImp.lib ++COMPILE = cl /D "WIN32" /D "WIN64" /D "NDEBUG" /FD /EHsc /MT /W3 /nologo /c /Zi /errorReport:prompt /D "_CRT_SECURE_NO_DEPRECATE" /D "UNICODE" /D "_UNICODE" /D "_WIN32_WINNT=0x0500" ++LINK = link /NOLOGO /MANIFEST /DEBUG /MACHINE:AMD64 /ERRORREPORT:PROMPT DelayImp.lib + RC = rc + + # EXE Definitions +-EXE_OUTDIR = $(PROJ)32_VC8__Win32_Release ++EXE_OUTDIR = $(PROJ)32_VC8__Win64_Release + EXE_OBJS = $(EXE_OUTDIR)\wrapper_i18n.obj $(EXE_OUTDIR)\logger.obj $(EXE_OUTDIR)\property.obj $(EXE_OUTDIR)\wrapper.obj $(EXE_OUTDIR)\wrapper_win.obj $(EXE_OUTDIR)\wrappereventloop.obj $(EXE_OUTDIR)\wrapper_file.obj $(EXE_OUTDIR)\wrapperinfo.obj + EXE_LIBS = mpr.lib shell32.lib wsock32.lib shlwapi.lib advapi32.lib user32.lib Crypt32.lib Wintrust.lib pdh.lib + EXE_COMPILE_OPTS = /O2 /GL /D "_CONSOLE" + EXE_LINK_OPTS = /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFESTFILE:"$(EXE_OUTDIR)\$(PROJ).exe.intermediate.manifest" /PDB:"$(EXE_OUTDIR)\$(PROJ).pdb" /OPT:REF /OPT:ICF /LTCG + + # DLL Definitions +-DLL_OUTDIR = $(PROJ)JNI32_VC8__Win32_Release ++DLL_OUTDIR = $(PROJ)JNI32_VC8__Win64_Release + DLL_OBJS = $(DLL_OUTDIR)\wrapper_i18n.obj $(DLL_OUTDIR)\wrapperjni.obj $(DLL_OUTDIR)\wrapperjni_win.obj $(DLL_OUTDIR)\wrapperinfo.obj + DLL_LIBS = shell32.lib advapi32.lib user32.lib + DLL_COMPILE_OPTS = /Od /I "..\" /I ".\" /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "_WINDOWS" /D "_USRDLL" /D "DECODERJNI_VC8_EXPORTS" /D "_WINDLL" diff --git a/installer/resources/postinstall.bat b/installer/resources/postinstall.bat deleted file mode 100644 index 417b02d7cdbced4306de586dbe685d84821765fc..0000000000000000000000000000000000000000 --- a/installer/resources/postinstall.bat +++ /dev/null @@ -1,55 +0,0 @@ -:: I2P Installer - Installs and pre-configures I2P. -:: -:: postinstall.bat -:: 2004 The I2P Project -:: http://www.i2p2.de/ -:: This code is public domain. -:: -:: author: hypercubus -:: -:: Installs the Java Service Wrapper support files for Win32 then launches the -:: I2P router as a background service. - -@echo off -setlocal - -if "%OS%"=="Windows_NT" ( -set INSTALL_PATH=%~dp0 -) else ( -set INSTALL_PATH="%1" -) - -copy "%INSTALL_PATH%lib\wrapper\win32\I2Psvc.exe" "%INSTALL_PATH%" -copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.dll" "%INSTALL_PATH%lib" -copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.jar" "%INSTALL_PATH%lib" - -if "%OS%"=="Windows_NT" ( - -del /f /q "%INSTALL_PATH%i2prouter" -:: del /f /q "%INSTALL_PATH%install_i2p_service_unix" -del /f /q "%INSTALL_PATH%install-headless.txt" -del /f /q "%INSTALL_PATH%osid" -del /f /q "%INSTALL_PATH%postinstall.sh" -del /f /q "%INSTALL_PATH%startRouter.sh" -:: del /f /q "%INSTALL_PATH%uninstall_i2p_service_unix" -del /f /q "%INSTALL_PATH%icons\*.xpm" -rmdir /q /s "%INSTALL_PATH%lib\wrapper" -start /b /i /d"%INSTALL_PATH%" i2prouter.bat %INSTALL_PATH% - -) else ( - -del "%INSTALL_PATH%eepget" -del "%INSTALL_PATH%i2prouter" -:: del "%INSTALL_PATH%install_i2p_service_unix" -del "%INSTALL_PATH%install_i2p_service_winnt.bat" -del "%INSTALL_PATH%install-headless.txt" -del "%INSTALL_PATH%osid" -del "%INSTALL_PATH%postinstall.sh" -del "%INSTALL_PATH%startRouter.sh" -:: del "%INSTALL_PATH%uninstall_i2p_service_unix" -del "%INSTALL_PATH%uninstall_i2p_service_winnt.bat" -del "%INSTALL_PATH%icons\*.xpm" -deltree /Y "%INSTALL_PATH%lib\wrapper" -start /M "%INSTALL_PATH%i2prouter.bat" %INSTALL_PATH% - -) diff --git a/installer/resources/postinstall.sh b/installer/resources/postinstall.sh index 0ad5e866d3eeeb5a3e0c91e3ac92e3fa000284fd..4f77ad534c42a1be5ebe0fff61fbc106e7e0758c 100644 --- a/installer/resources/postinstall.sh +++ b/installer/resources/postinstall.sh @@ -16,11 +16,11 @@ if [ ! "X$1" = "X" ]; then cd $1 fi -chmod 744 ./i2prouter -# chmod 744 ./install_i2p_service_unix -chmod 744 ./osid -chmod 744 ./runplain.sh -# chmod 744 ./uninstall_i2p_service_unix +chmod 755 ./i2prouter +# chmod 755 ./install_i2p_service_unix +chmod 755 ./osid +chmod 755 ./runplain.sh +# chmod 755 ./uninstall_i2p_service_unix ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory." @@ -32,40 +32,45 @@ if [ "X$HOST_OS" = "X" -o $HOST_OS = "unknown" ]; then fi OS_ARCH=`uname -m` -X86_64=`echo "$OS_ARCH" | grep x86_64` +X86_64=`echo "${OS_ARCH}" | grep x86_64` case $HOST_OS in debian | fedora | gentoo | linux | mandrake | redhat | suse ) if [ "X$X86_64" = "X" ]; then wrapperpath="./lib/wrapper/linux" - cp $wrapperpath/libwrapper.so ./lib/ + cp ${wrapperpath}/libwrapper.so ./lib/ else wrapperpath="./lib/wrapper/linux64" - cp $wrapperpath/libwrapper.so ./lib + cp ${wrapperpath}/libwrapper.so ./lib fi ;; freebsd ) - wrapperpath="./lib/wrapper/freebsd" - cp $wrapperpath/libwrapper.so ./lib/ + if [ ! `uname -m |grep amd64` ]; then + wrapperpath="./lib/wrapper/freebsd" + cp ${wrapperpath}/libwrapper.so ./lib/ + else + wrapperpath="./lib/wrapper/freebsd64" + cp ${wrapperpath}/libwrapper.so ./lib/ + fi ;; osx ) wrapperpath="./lib/wrapper/macosx" - cp $wrapperpath/libwrapper.jnilib ./lib/ + cp ${wrapperpath}/libwrapper.jnilib ./lib/ ;; solaris ) wrapperpath="./lib/wrapper/solaris" - cp $wrapperpath/libwrapper.so ./lib/ + cp ${wrapperpath}/libwrapper.so ./lib/ ;; * ) - echo "$ERROR_MSG" + echo "${ERROR_MSG}" exit 1 ;; esac -cp $wrapperpath/wrapper.jar ./lib/ +#cp $wrapperpath/wrapper.jar ./lib/ cp $wrapperpath/i2psvc . -chmod 744 ./eepget -chmod 744 ./i2psvc +chmod 755 ./eepget +chmod 755 ./i2psvc rm -rf ./icons rm -rf ./lib/wrapper rm -f ./lib/*.dll diff --git a/installer/resources/runplain.sh b/installer/resources/runplain.sh index fa9c550cac43e91f01a52b71e570acc6603d8fa1..949a7abd7c0d03d26ada1c6ad9ce1c1b4d274175 100644 --- a/installer/resources/runplain.sh +++ b/installer/resources/runplain.sh @@ -19,7 +19,7 @@ I2PTEMP="%SYSTEM_java_io_tmpdir" PREFERv4="false" CP= -for jars in `ls ${I2P}/lib/*.jar`; do CP=${CP}:${jars}; echo $CP; done +for jars in `ls ${I2P}/lib/*.jar`; do CP=${CP}:${jars}; done JAVA=java JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt" diff --git a/licenses/LICENSE-Wrapper.txt b/licenses/LICENSE-Wrapper.txt index 039b8927d383afaa52267f76c3dc82c50d9a5223..e1356e16b899a0dd3b61823348d9f568404d4157 100644 --- a/licenses/LICENSE-Wrapper.txt +++ b/licenses/LICENSE-Wrapper.txt @@ -1,41 +1,395 @@ -Copyright (c) 1999, 2004 Tanuki Software - -Permission is hereby granted, free of charge, to any person -obtaining a copy of the Java Service Wrapper and associated -documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sub-license, -and/or sell copies of the Software, and to permit persons to -whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -Portions of the Software have been derived from source code -developed by Silver Egg Technology under the following license: - -Copyright (c) 2001 Silver Egg Technology - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sub-license, and/or -sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +---------------------------------------------------------------------- +----------------- ----------------- + Tanuki Software, Ltd. + Community Software License Agreement + Version 1.1 +IMPORTANT-READ CAREFULLY: This license agreement is a legal agreement +between you ("Licensee") and Tanuki Software, Ltd. ("TSI"), which +includes computer software, associated media, printed materials, and +may include online or electronic documentation ( Software ). PLEASE +READ THIS AGREEMENT CAREFULLY BEFORE YOU INSTALL, COPY, DOWNLOAD OR +USE THE SOFTWARE ACCOMPANYING THIS PACKAGE. + +Section 1 - Grant of License + +Community editions of the Software are made available on the GNU +General Public License, Version 2 ("GPLv2"), included in Section 4 of +this license document. All sections of the Community Software License +Agreement must be complied with in addition to those of the GPLv2. + + +Section 2 - Definitions + +2.1. "Community Edition" shall mean versions of the Software Program +distributed in source form under this license agreement, and all new +releases, corrections, enhancements and updates to the Software +Program, which TSI makes generally available under this agreement. + +2.2. "Documentation" shall mean the contents of the website +describing the functionality and use of the Software Program, located +at http://wrapper.tanukisoftware.org + +2.3. "Product" shall mean the computer programs, that are provided by +Licensee to Licensee customers or potential customers, and that +contain both the Software Program as a component of the Product, and a +component or components (other than the Software Program) that provide +the material functionality of the Product. If the Product is released +in source form, the Software Program or any of its components may only +be included in executable form. + +2.4. "Software Program" shall mean the computer software and license +file provided by TSI under this Agreement, including all new releases, +corrections, enhancements and updates to such computer software, which +TSI makes generally available and which Licensee receive pursuant to +Licensee subscription to TSIMS. Some specific features or platforms +may not be enabled if they do not fall under the feature set(s) +covered by the specific license fees paid. + +2.5 "End User" shall mean the customers of the Licensee or any +recipient of the Product whether or not any payment is made to use +the Product. + + +Section 3 - Licensee Obligations + +A copy of this license must be distributed in full with the Product +in a location that is obvious to any End User. + +In accordance with Section 4, the full source code of all components +of the Product must be made available to any and all End Users. + +Licensee may extend and/or modify the Software Program and distribute +under the terms of this agreement provided that the copyright notice +and license information displayed in the console and log files are +not obfuscated or obstructed in any way. + + +Section 4 - GPLv2 License Agreement + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + Everyone is permitted to copy and distribute verbatim copies of + this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General + Public License is intended to guarantee your freedom to share and + change free software--to make sure the software is free for all + its users. This General Public License applies to most of the Free + Software Foundation's software and to any other program whose + authors commit to using it. (Some other Free Software Foundation + software is covered by the GNU Library General Public License + instead.) You can apply it to your programs, too. + + When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that + you have the freedom to distribute copies of free software (and + charge for this service if you wish), that you receive source code + or can get it if you want it, that you can change the software or + use pieces of it in new free programs; and that you know you can + do these things. + + To protect your rights, we need to make restrictions that forbid + anyone to deny you these rights or to ask you to surrender the + rights. These restrictions translate to certain responsibilities + for you if you distribute copies of the software, or if you modify + it. + + For example, if you distribute copies of such a program, whether + gratis or for a fee, you must give the recipients all the rights + that you have. You must make sure that they, too, receive or can + get the source code. And you must show them these terms so they + know their rights. + + We protect your rights with two steps: + + (1) copyright the software, and + (2) offer you this license which gives you legal permission to + copy, distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make + certain that everyone understands that there is no warranty for + this free software. If the software is modified by someone else + and passed on, we want its recipients to know that what they have + is not the original, so that any problems introduced by others + will not reflect on the original authors' reputations. + + Finally, any free program is threatened constantly by software + patents. We wish to avoid the danger that redistributors of a free + program will individually obtain patent licenses, in effect making + the program proprietary. To prevent this, we have made it clear + that any patent must be licensed for everyone's free use or not + licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which + contains a notice placed by the copyright holder saying it may be + distributed under the terms of this General Public License. The + "Program", below, refers to any such program or work, and a "work + based on the Program" means either the Program or any derivative + work under copyright law: that is to say, a work containing the + Program or a portion of it, either verbatim or with modifications + and/or translated into another language. (Hereinafter, translation + is included without limitation in the term "modification".) Each + licensee is addressed as "you". + + Activities other than copying, distribution and modification are + not covered by this License; they are outside its scope. The act + of running the Program is not restricted, and the output from the + Program is covered only if its contents constitute a work based on + the Program (independent of having been made by running the + Program). Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's + source code as you receive it, in any medium, provided that you + conspicuously and appropriately publish on each copy an + appropriate copyright notice and disclaimer of warranty; keep + intact all the notices that refer to this License and to the + absence of any warranty; and give any other recipients of the + Program a copy of this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, + and you may at your option offer warranty protection in exchange + for a fee. + + 2. You may modify your copy or copies of the Program or any + portion of it, thus forming a work based on the Program, and copy + and distribute such modifications or work under the terms of + Section 1 above, provided that you also meet all of these + conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the + Program is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the + Program, and can be reasonably considered independent and separate + works in themselves, then this License, and its terms, do not + apply to those sections when you distribute them as separate works. + But when you distribute the same sections as part of a whole which + is a work based on the Program, the distribution of the whole must + be on the terms of this License, whose permissions for other + licensees extend to the entire whole, and thus to each and every + part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or + contest your rights to work written entirely by you; rather, the + intent is to exercise the right to control the distribution of + derivative or collective works based on the Program. + + In addition, mere aggregation of another work not based on the + Program with the Program (or with a work based on the Program) on + a volume of a storage or distribution medium does not bring the + other work under the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms + of Sections 1 and 2 above provided that you also do one of the + following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software + interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + + The source code for a work means the preferred form of the work + for making modifications to it. For an executable work, complete + source code means all the source code for all modules it contains, + plus any associated interface definition files, plus the scripts + used to control compilation and installation of the executable. + However, as a special exception, the source code distributed need + not include anything that is normally distributed (in either + source or binary form) with the major components (compiler, + kernel, and so on) of the operating system on which the executable + runs, unless that component itself accompanies the executable. + + If distribution of executable or object code is made by offering + access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is + void, and will automatically terminate your rights under this + License. However, parties who have received copies, or rights, + from you under this License will not have their licenses + terminated so long as such parties remain in full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify + or distribute the Program or its derivative works. These actions + are prohibited by law if you do not accept this License. + Therefore, by modifying or distributing the Program (or any work + based on the Program), you indicate your acceptance of this + License to do so, and all its terms and conditions for copying, + distributing or modifying the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on + the Program), the recipient automatically receives a license from + the original licensor to copy, distribute or modify the Program + subject to these terms and conditions. You may not impose any + further restrictions on the recipients' exercise of the rights + granted herein. You are not responsible for enforcing compliance + by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of + patent infringement or for any other reason (not limited to + patent issues), conditions are imposed on you (whether by court + order, agreement or otherwise) that contradict the conditions of + this License, they do not excuse you from the conditions of this + License. If you cannot distribute so as to satisfy simultaneously + your obligations under this License and any other pertinent + obligations, then as a consequence you may not distribute the + Program at all. For example, if a patent license would not permit + royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only + way you could satisfy both it and this License would be to refrain + entirely from distribution of the Program. + + If any portion of this section is held invalid or unenforceable + under any particular circumstance, the balance of the section is + intended to apply and the section as a whole is intended to apply + in other circumstances. + + It is not the purpose of this section to induce you to infringe + any patents or other property right claims or to contest validity + of any such claims; this section has the sole purpose of + protecting the integrity of the free software distribution system, + which is implemented by public license practices. Many people have + made generous contributions to the wide range of software + distributed through that system in reliance on consistent + application of that system; it is up to the author/donor to decide + if he or she is willing to distribute software through any other + system and a licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed + to be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, + the original copyright holder who places the Program under this + License may add an explicit geographical distribution limitation + excluding those countries, so that distribution is permitted only + in or among countries not thus excluded. In such case, this + License incorporates the limitation as if written in the body of + this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the + Program specifies a version number of this License which applies + to it and "any later version", you have the option of following + the terms and conditions either of that version or of any later + version published by the Free Software Foundation. If the Program + does not specify a version number of this License, you may choose + any version ever published by the Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other + free programs whose distribution conditions are different, write + to the author to ask for permission. For software which is + copyrighted by the Free Software Foundation, write to the Free + Software Foundation; we sometimes make exceptions for this. Our + decision will be guided by the two goals of preserving the free + status of all derivatives of our free software and of promoting + the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE + LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS + AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE + DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR + OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY + MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE + LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY + OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + +Section 4 - 3rd Party Components + +(1) The Software Program includes software and documentation components +developed in part by Silver Egg Technology, Inc.("SET") prior to 2001 +and released under the following license. + + Copyright (c) 2001 Silver Egg Technology + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sub-license, and/or + sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. diff --git a/router/java/build.xml b/router/java/build.xml index e157dd25557d0a41488777e98634ccd5100a15fd..ea9f7b6135f6505c65267e0d761b85c4f48cd79f 100644 --- a/router/java/build.xml +++ b/router/java/build.xml @@ -53,7 +53,7 @@ </javac> </target> - <target name="jar" depends="compile, jarUpToDate" unless="jar.uptodate" > + <target name="listChangedFiles" if="mtn.available" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <arg value="list" /> <arg value="changed" /> @@ -65,6 +65,11 @@ <arg value="[:space:]" /> <arg value="," /> </exec> + </target> + + <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" > + <!-- set if unset --> + <property name="workspace.changes.tr" value="" /> <jar destfile="./build/router.jar" basedir="./build/obj" includes="**/*.class" > <manifest> <attribute name="Build-Date" value="${build.timestamp}" /> diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 80cfb9c849e64cfae6697a1ebe6b5ed68aeebb35..43dca92409f4dc28e87e8883417efa05045ec22f 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 18; + public final static long BUILD = 21; /** for example "-test" */ public final static String EXTRA = "";