merge of '14e8f430d97e8e6a9926d59299775ca98d590c8d'

and '2b3daf42c48bc7b83cfa015b1dba87538ee2f8db'
This commit is contained in:
kytv
2011-06-10 14:53:59 +00:00
92 changed files with 826 additions and 1541 deletions

View File

@ -127,8 +127,8 @@ Installer:
Wrapper 3.1.1: Java Service Wrapper Community Edition 32-bit 3.5.9:
Copyright (c) 1999, 2004 Tanuki Software Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
See licenses/LICENSE-Wrapper.txt See licenses/LICENSE-Wrapper.txt

View File

@ -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>

View File

@ -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/

View File

@ -1 +0,0 @@
application-package=net.i2p.router

View File

@ -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>

View File

@ -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

View File

@ -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'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">I2P</string>
</resources>

View File

@ -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

View File

@ -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();
}
}

View File

@ -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);
}
}

View File

@ -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) {}
}
}
}

View File

@ -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();
}
}
}
}
}

View File

@ -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);
}
}

View File

@ -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();
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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) {
}
}

View File

@ -51,6 +51,8 @@
<!-- unused for now, as we oddly ship addressbook as a .war --> <!-- unused for now, as we oddly ship addressbook as a .war -->
<target name="jar" depends="compile, changes"> <target name="jar" depends="compile, changes">
<jar basedir="${build}" destfile="${dist}/${jar}"> <jar basedir="${build}" destfile="${dist}/${jar}">
<!-- set if unset -->
<property name="workspace.changes" value="" />
<manifest> <manifest>
<attribute name="Main-Class" value="addressbook.Daemon"/> <attribute name="Main-Class" value="addressbook.Daemon"/>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />
@ -67,6 +69,8 @@
<copy todir="${dist}/tmp/WEB-INF/classes"> <copy todir="${dist}/tmp/WEB-INF/classes">
<fileset dir="${build}"/> <fileset dir="${build}"/>
</copy> </copy>
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}"> <war basedir="${dist}/tmp" webxml="web.xml" destfile="${dist}/${war}">
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />
@ -81,9 +85,17 @@
<uptodate property="war.uptodate" targetfile="${dist}/${war}"> <uptodate property="war.uptodate" targetfile="${dist}/${war}">
<srcfiles dir= "." includes="${build}/**/*.class, web.xml"/> <srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="changes"> <target name="changes" depends="warUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />

View File

@ -29,8 +29,7 @@
<compilerarg line="${javac.compilerargs}" /> <compilerarg line="${javac.compilerargs}" />
<classpath> <classpath>
<pathelement location="../../core/java/build/i2p.jar" /> <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/all/wrapper.jar" />
<pathelement location="../../installer/lib/wrapper/win32/wrapper.jar" />
<pathelement location="../../router/java/build/router.jar" /> <pathelement location="../../router/java/build/router.jar" />
</classpath> </classpath>
</javac> </javac>
@ -39,7 +38,7 @@
</copy> </copy>
</target> </target>
<target name="jar" depends="compile"> <target name="bundle" >
<exec executable="sh" osfamily="unix" failifexecutionfails="true" > <exec executable="sh" osfamily="unix" failifexecutionfails="true" >
<arg value="./bundle-messages.sh" /> <arg value="./bundle-messages.sh" />
</exec> </exec>
@ -50,6 +49,9 @@
<exec executable="sh" osfamily="windows" failifexecutionfails="false" > <exec executable="sh" osfamily="windows" failifexecutionfails="false" >
<arg value="./bundle-messages.sh" /> <arg value="./bundle-messages.sh" />
</exec> </exec>
</target>
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -61,6 +63,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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}"> <jar basedir="${build}" destfile="${dist}/${jar}">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.desktopgui.Main"/> <attribute name="Main-Class" value="net.i2p.desktopgui.Main"/>
@ -71,6 +78,20 @@
</jar> </jar>
</target> </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"> <target name="javadoc">
<mkdir dir="${build}" /> <mkdir dir="${build}" />
<mkdir dir="${build}/${javadoc}" /> <mkdir dir="${build}/${javadoc}" />

View File

@ -36,7 +36,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -48,6 +48,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class">
<manifest> <manifest>
<attribute name="Main-Class" value="org.klomp.snark.Snark" /> <attribute name="Main-Class" value="org.klomp.snark.Snark" />
@ -63,6 +68,17 @@
<uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" > <uptodate property="jar.uptodate" targetfile="build/i2psnark.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" excludes="**/I2PSnarkServlet*.class **/messages_*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<not>
<isset property="wjar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<!-- Ideally we would include <!-- Ideally we would include
@ -72,7 +88,9 @@
- So we must continue to duplicate everything in the war. - So we must continue to duplicate everything in the war.
<classes dir="./build/obj" includes="**/I2PSnarkServlet*.class" /> <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/*" > <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 --> <!-- 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" /> <classes dir="./build/obj" includes="**/web/*.class" />

View File

@ -34,10 +34,7 @@
</javac> </javac>
</target> </target>
<!-- TODO: Move the web classes from the jar to the war - they are not part of the API <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
- This will require sponge to rewrite some seedless stuff that uses it.
-->
<target name="jar" depends="builddep, compile, jarUpToDate" unless="jar.uptodate" >
<exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" > <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -49,6 +46,15 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./build/i2ptunnel.jar" basedir="./build/obj" includes="**/*.class">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" /> <attribute name="Main-Class" value="net.i2p.i2ptunnel.I2PTunnel" />
@ -64,6 +70,14 @@
<uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" > <uptodate property="jar.uptodate" targetfile="build/i2ptunnel.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="bundle" depends="compile, precompilejsp"> <target name="bundle" depends="compile, precompilejsp">
@ -97,7 +111,7 @@
</exec> </exec>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -109,6 +123,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" <war destfile="build/i2ptunnel.war" webxml="../jsp/web-out.xml"
basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp"> basedir="../jsp/" excludes="web.xml, web-fragment.xml, web-out.xml, **/*.java, *.jsp">
<manifest> <manifest>
@ -123,6 +142,14 @@
<uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" > <uptodate property="war.uptodate" targetfile="build/i2ptunnel.war" >
<srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" /> <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, **/*.java, *.jsp" />
</uptodate> </uptodate>
<condition property="shouldListChanges2" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="precompilejsp" depends="jar" unless="precompilejsp.uptodate"> <target name="precompilejsp" depends="jar" unless="precompilejsp.uptodate">

View File

@ -98,7 +98,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -110,6 +110,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" > <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />
@ -123,6 +128,14 @@
<uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" > <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="clean" > <target name="clean" >

View File

@ -31,7 +31,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -43,6 +43,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" > <jar destfile="./build/mstreaming.jar" basedir="./build/obj" includes="**/*.class" >
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />
@ -56,6 +61,14 @@
<uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" > <uptodate property="jar.uptodate" targetfile="build/mstreaming.jar" >
<srcfiles dir= "." includes="build/obj/**/*.class" /> <srcfiles dir= "." includes="build/obj/**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="javadoc"> <target name="javadoc">

View File

@ -25,7 +25,7 @@
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/build" /> <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" /> <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" />
</classpath> </classpath>
</depend> </depend>
@ -57,7 +57,7 @@
<pathelement location="../../systray/java/build/systray.jar" /> <pathelement location="../../systray/java/build/systray.jar" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.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" /> <pathelement location="../../jrobin/jrobin-1.5.9.1.jar" />
</classpath> </classpath>
</javac> </javac>
@ -67,7 +67,7 @@
<target name="jar" depends="jar1, war, bundle" /> <target name="jar" depends="jar1, war, bundle" />
<!-- the jar without the latest message classes from the jsps --> <!-- 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" > <exec executable="mtn" outputproperty="workspace.changes.j" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -80,6 +80,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class">
<manifest> <manifest>
<!-- top level installer will rename to jrobin.jar --> <!-- top level installer will rename to jrobin.jar -->
@ -115,6 +120,14 @@
<uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" > <uptodate property="jar.uptodate" targetfile="build/routerconsole.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="poupdate" depends="precompilejsp"> <target name="poupdate" depends="precompilejsp">
@ -134,8 +147,7 @@
</exec> </exec>
</target> </target>
<!-- does NOT update the message classes, as those go in the jar --> <target name="listChangedFiles2" depends="warUpToDate" if="shouldListChanges2" >
<target name="war" depends="precompilejsp, warUpToDate" unless="war.uptodate" >
<exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" > <exec executable="mtn" outputproperty="workspace.changes.w" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -147,6 +159,12 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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/ --> <!-- 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" <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"> 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" > <uptodate property="war.uptodate" targetfile="build/routerconsole.war" >
<srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" /> <srcfiles dir= "../jsp" excludes="web.xml, web-fragment.xml, *.css, **/*.java, *.jsp, *.jsi" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate"> <target name="precompilejsp" depends="jar1" unless="precompilejsp.uptodate">
@ -211,7 +237,7 @@
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.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/routerconsole.jar" />
<pathelement location="build/" /> <pathelement location="build/" />
<pathelement location="../../../router/java/build/router.jar" /> <pathelement location="../../../router/java/build/router.jar" />
@ -243,7 +269,7 @@
<pathelement location="../../systray/java/build/obj" /> <pathelement location="../../systray/java/build/obj" />
<pathelement location="../../systray/java/lib/systray4j.jar" /> <pathelement location="../../systray/java/lib/systray4j.jar" />
<pathelement location="../../desktopgui/dist/desktopgui.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/routerconsole.jar" />
<pathelement location="build" /> <pathelement location="build" />
<pathelement location="../../../router/java/build/router.jar" /> <pathelement location="../../../router/java/build/router.jar" />

View File

@ -45,7 +45,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -57,6 +57,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./build/sam.jar" basedir="./build/obj" includes="**/*.class">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.sam.SAMBridge" /> <attribute name="Main-Class" value="net.i2p.sam.SAMBridge" />
@ -72,6 +77,14 @@
<uptodate property="jar.uptodate" targetfile="build/sam.jar" > <uptodate property="jar.uptodate" targetfile="build/sam.jar" >
<srcfiles dir= "build/obj" includes="**/*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="jarTest" depends="jar, compileTest"> <target name="jarTest" depends="jar, compileTest">

View File

@ -44,7 +44,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -56,6 +56,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" > <jar destfile="./build/streaming.jar" basedir="./build/obj" includes="**/*.class" >
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />
@ -69,6 +74,14 @@
<uptodate property="jar.uptodate" targetfile="build/streaming.jar" > <uptodate property="jar.uptodate" targetfile="build/streaming.jar" >
<srcfiles dir= "." includes="build/obj/**/*.class" /> <srcfiles dir= "." includes="build/obj/**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="jarTest" depends="jar, compileTest"> <target name="jarTest" depends="jar, compileTest">

View File

@ -67,7 +67,7 @@
<target name="all" depends="war"/> <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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -79,6 +79,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <war destfile="${project}.war" webxml="WEB-INF/web-out.xml">
<fileset dir="."> <fileset dir=".">
<include name="WEB-INF/**/*.class"/> <include name="WEB-INF/**/*.class"/>
@ -102,6 +107,14 @@
<uptodate property="war.uptodate" targetfile="${project}.war"> <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" /> <srcfiles dir= "." includes="WEB-INF/web-out.xml WEB-INF/**/*.class images/*.png css.css index.html WEB-INF/classes/${project}.properties" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="bundle" depends="compile, precompilejsp"> <target name="bundle" depends="compile, precompilejsp">

View File

@ -22,7 +22,7 @@
</target> </target>
<target name="jar" depends="compile, war" /> <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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -34,6 +34,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" <war destfile="susimail.war" webxml="src/WEB-INF/web.xml"
basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*"> basedir="src/" excludes="WEB-INF/web.xml LICENSE src/**/*">
<manifest> <manifest>
@ -48,6 +53,14 @@
<uptodate property="war.uptodate" targetfile="susimail.war"> <uptodate property="war.uptodate" targetfile="susimail.war">
<srcfiles dir= "src" excludes="LICENSE src/**/*" /> <srcfiles dir= "src" excludes="LICENSE src/**/*" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="war.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="bundle" depends="compile"> <target name="bundle" depends="compile">

View File

@ -23,7 +23,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -35,6 +35,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./build/systray.jar" basedir="./build/obj" includes="**/*.class">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" /> <attribute name="Main-Class" value="net.i2p.apps.systray.SysTray" />
@ -50,6 +55,14 @@
<uptodate property="jar.uptodate" targetfile="./build/systray.jar"> <uptodate property="jar.uptodate" targetfile="./build/systray.jar">
<srcfiles dir= "build/obj" includes="**/*.class" /> <srcfiles dir= "build/obj" includes="**/*.class" />
</uptodate> </uptodate>
<condition property="shouldListChanges" >
<and>
<not>
<isset property="jar.uptodate" />
</not>
<isset property="mtn.available" />
</and>
</condition>
</target> </target>
<target name="javadoc"> <target name="javadoc">

View File

@ -159,11 +159,20 @@
</jar> </jar>
</target> </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" > <exec executable="mtn" outputproperty="workspace.version" errorproperty="mtn.error1" failifexecutionfails="false" >
<arg value="automate" /> <arg value="automate" />
<arg value="get_base_revision_id" /> <arg value="get_base_revision_id" />
</exec> </exec>
</target>
<target name="buildProperties" depends="getMtnRev" >
<!-- default if not set above -->
<property name="workspace.version" value="unknown" />
<tstamp> <tstamp>
<format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" /> <format property="build.timestamp" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC" locale="en" />
</tstamp> </tstamp>
@ -240,21 +249,56 @@
<copy file="apps/addressbook/dist/addressbook.war" todir="build/" /> <copy file="apps/addressbook/dist/addressbook.war" todir="build/" />
</target> </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" > <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
<fileset dir="installer/lib/jbigi" includes="*.so *.dll *.jnilib" /> <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> </jar>
</target> </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" > <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
<fileset dir="installer/lib/jbigi" includes="*windows*.dll" /> <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> </jar>
</target> </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" > <jar destfile="build/jbigi.jar" whenmanifestonly="fail" >
<fileset dir="installer/lib/jbigi" includes="*linux*.so" /> <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> </jar>
</target> </target>
@ -337,7 +381,7 @@
<pathelement location="apps/jetty/jettylib/javax.servlet.jar" /> <pathelement location="apps/jetty/jettylib/javax.servlet.jar" />
<pathelement location="apps/systray/java/lib/systray4j.jar" /> <pathelement location="apps/systray/java/lib/systray4j.jar" />
<pathelement location="apps/jrobin/jrobin-1.5.9.1.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" /> <pathelement location="core/lib/junit.jar" />
</classpath> </classpath>
<link offline="true" href="http://download.oracle.com/javase/6/docs/api/" packagelistLoc="installer/resources/package-lists/java/" /> <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="syndie-standalone.zip" failonerror="false" quiet="true" />
<delete file="i2psnark-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 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/tmp" />
<delete dir="debian/db" /> <delete dir="debian/db" />
<delete file="debian/files" /> <delete file="debian/files" />
@ -434,6 +481,9 @@
<copy todir="pkg-temp/lib/wrapper/freebsd/"> <copy todir="pkg-temp/lib/wrapper/freebsd/">
<fileset dir="installer/lib/wrapper/freebsd/" /> <fileset dir="installer/lib/wrapper/freebsd/" />
</copy> </copy>
<copy todir="pkg-temp/lib/wrapper/freebsd64/">
<fileset dir="installer/lib/wrapper/freebsd64" />
</copy>
<copy todir="pkg-temp/lib/wrapper/macosx/"> <copy todir="pkg-temp/lib/wrapper/macosx/">
<fileset dir="installer/lib/wrapper/macosx/" /> <fileset dir="installer/lib/wrapper/macosx/" />
</copy> </copy>
@ -451,22 +501,26 @@
<copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" /> <copy file="installer/resources/i2prouter.bat" todir="pkg-temp/" />
<copy file="installer/resources/fixperms.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/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/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/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/"> <copy todir="pkg-temp/lib/wrapper/win32/">
<fileset dir="installer/lib/wrapper/win32/" /> <fileset dir="installer/lib/wrapper/win32/" />
</copy> </copy>
<copy todir="pkg-temp/lib/wrapper/win64/">
<fileset dir="installer/lib/wrapper/win64/" />
</copy>
</target> </target>
<!-- only what is needed for debian, etc. --> <!-- only what is needed for debian, etc. -->
<target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" > <target name="preppkg-linux-only" depends="preppkg-linux, jbigi-linux-only" >
<copy file="build/jbigi.jar" todir="pkg-temp/lib" /> <copy file="build/jbigi.jar" todir="pkg-temp/lib" />
<copy file="installer/lib/wrapper/all/wrapper.jar" todir="pkg-temp/lib" />
</target> </target>
<target name="preppkg-linux" depends="preppkg-base"> <target name="preppkg-linux" depends="preppkg-base">
<copy file="installer/resources/runplain.sh" todir="pkg-temp/" /> <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/eepget" todir="pkg-temp/" />
<copy file="installer/resources/i2prouter" todir="pkg-temp/" /> <copy file="installer/resources/i2prouter" todir="pkg-temp/" />
<copy file="installer/resources/osid" todir="pkg-temp/" /> <copy file="installer/resources/osid" todir="pkg-temp/" />
@ -746,9 +800,8 @@
<target name="prepjupdatefixes" depends="prepupdate, buildWEB"> <target name="prepjupdatefixes" depends="prepupdate, buildWEB">
<copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" /> <copy file="build/org.mortbay.jetty.jar" todir="pkg-temp/lib/" />
</target> </target>
<target name="installer" depends="preppkg, buildProperties">
<taskdef name="izpack" classpath="${basedir}/installer/lib/izpack/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> <target name="util-list-changes" depends="checkForMtn" if="mtn.available" >
<mkdir dir="pkg-temp/installer" />
<exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" > <exec executable="mtn" outputproperty="workspace.changes.util" errorproperty="mtn.error.util" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -760,6 +813,13 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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"> <jar destfile="./pkg-temp/installer/copy.jar" basedir="./core/java/build/obj" includes="net/i2p/util/Copy.class net/i2p/util/FileUtil.class">
<manifest> <manifest>
<attribute name="Main-Class" value="net.i2p.util.Copy" /> <attribute name="Main-Class" value="net.i2p.util.Copy" />
@ -873,7 +933,7 @@
<arg value="-output"/> <arg value="-output"/>
<arg value="i2p.fba"/> <arg value="i2p.fba"/>
<arg value="-auxclasspath"/> <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="-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/"/> <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 --> <!-- start of the files to be analyzed -->
@ -1179,7 +1239,7 @@
<copy file="apps/systray/java/lib/systray4j.jar" todir="pkg-temp/lib" /> <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--> <!--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.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 file="installer/lib/wrapper/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
<!-- copy the unpack/start batchfiles --> <!-- copy the unpack/start batchfiles -->
<copy todir="pkg-temp"> <copy todir="pkg-temp">

View File

@ -39,7 +39,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -51,6 +51,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" > <jar destfile="./build/i2p.jar" basedir="./build/obj" includes="**/*.class" >
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />

View File

@ -17,20 +17,18 @@ import java.text.DateFormat;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.Queue; import java.util.Queue;
import java.util.Set; import java.util.Set;
import java.util.TimeZone; import java.util.TimeZone;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import net.i2p.I2PAppContext; import net.i2p.I2PAppContext;
import net.i2p.data.DataHelper;
/** /**
* Manages the logging system, loading (and reloading) the configuration file, * Manages the logging system, loading (and reloading) the configuration file,
@ -286,18 +284,11 @@ public class LogManager {
} }
Properties p = new Properties(); Properties p = new Properties();
FileInputStream fis = null;
try { try {
fis = new FileInputStream(cfgFile); DataHelper.loadProps(p, cfgFile);
p.load(fis);
_configLastRead = _context.clock().now(); _configLastRead = _context.clock().now();
} catch (IOException ioe) { } catch (IOException ioe) {
System.err.println("Error loading logger config from " + cfgFile.getAbsolutePath()); System.err.println("Error loading logger config from " + cfgFile.getAbsolutePath());
} finally {
if (fis != null) try {
fis.close();
} catch (IOException ioe) { // nop
}
} }
parseConfig(p); parseConfig(p);
updateLimits(); updateLimits();
@ -363,6 +354,7 @@ public class LogManager {
private void parseLimits(Properties config) { private void parseLimits(Properties config) {
parseLimits(config, PROP_RECORD_PREFIX); parseLimits(config, PROP_RECORD_PREFIX);
} }
private void parseLimits(Properties config, String recordPrefix) { private void parseLimits(Properties config, String recordPrefix) {
_limits.clear(); _limits.clear();
if (config != null) { if (config != null) {
@ -559,60 +551,47 @@ public class LogManager {
return _rotationLimit; return _rotationLimit;
} }
/** @return success */
public boolean saveConfig() { public boolean saveConfig() {
String config = createConfig(); Properties props = createConfig();
FileOutputStream fos = null;
try { try {
fos = new FileOutputStream(_locationFile); DataHelper.storeProps(props, _locationFile);
fos.write(config.getBytes());
return true; return true;
} catch (IOException ioe) { } catch (IOException ioe) {
getLog(LogManager.class).error("Error saving the config", ioe); getLog(LogManager.class).error("Error saving the config", ioe);
return false; return false;
} finally {
if (fos != null) try { fos.close(); } catch (IOException ioe) {}
} }
} }
private String createConfig() { private Properties createConfig() {
StringBuilder buf = new StringBuilder(8*1024); Properties rv = new OrderedProperties();
buf.append(PROP_FORMAT).append('=').append(new String(_format)).append('\n'); rv.setProperty(PROP_FORMAT, new String(_format));
buf.append(PROP_DATEFORMAT).append('=').append(_dateFormatPattern).append('\n'); rv.setProperty(PROP_DATEFORMAT, _dateFormatPattern);
buf.append(PROP_DISPLAYONSCREEN).append('=').append((_displayOnScreen ? "TRUE" : "FALSE")).append('\n'); rv.setProperty(PROP_DISPLAYONSCREEN, Boolean.toString(_displayOnScreen));
String filenameOverride = _context.getProperty(FILENAME_OVERRIDE_PROP); String filenameOverride = _context.getProperty(FILENAME_OVERRIDE_PROP);
if (filenameOverride == null) 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 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) 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) 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) else if (_fileSize > 0)
buf.append(PROP_FILESIZE).append('=').append(_fileSize).append('\n'); rv.setProperty(PROP_FILESIZE, Integer.toString(_fileSize));
// if <= 0, dont specify // if <= 0, dont specify
buf.append(PROP_ROTATIONLIMIT).append('=').append(_rotationLimit).append('\n'); rv.setProperty(PROP_ROTATIONLIMIT, Integer.toString(_rotationLimit));
buf.append(PROP_DEFAULTLEVEL).append('=').append(Log.toLevelString(_defaultLimit)).append('\n'); rv.setProperty(PROP_DEFAULTLEVEL, Log.toLevelString(_defaultLimit));
buf.append(PROP_DISPLAYONSCREENLEVEL).append('=').append(Log.toLevelString(_onScreenLimit)).append('\n'); rv.setProperty(PROP_DISPLAYONSCREENLEVEL, Log.toLevelString(_onScreenLimit));
buf.append(PROP_CONSOLEBUFFERSIZE).append('=').append(_consoleBufferSize).append('\n'); rv.setProperty(PROP_CONSOLEBUFFERSIZE, Integer.toString(_consoleBufferSize));
buf.append("# log limit overrides:\n");
TreeMap limits = new TreeMap();
for (LogLimit lim : _limits) { for (LogLimit lim : _limits) {
limits.put(lim.getRootName(), Log.toLevelString(lim.getLimit())); rv.setProperty(PROP_RECORD_PREFIX + 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');
} }
return buf.toString(); return rv;
} }
/** /**

View File

@ -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 2011-06-05 zzz
* Console: Tag stat descriptions at declaration rather than in Strings.java * Console: Tag stat descriptions at declaration rather than in Strings.java
* Data: Remove duplicate signature verification code * 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 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. little or no performance difference between the two versions for 32 bit processors.
See http://zzz.i2p/topics/306 for discussion and test results. 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. with PIC libs built with GMP 5.0.2. License is LGPLv3.
Built by sponge with GCC 4.4.4, downloaded from Built by sponge with GCC 4.4.4, downloaded from
http://sponge.i2p/files/jbigi/gmp-5.0.2/ http://sponge.i2p/files/jbigi/gmp-5.0.2/

View File

@ -130,13 +130,28 @@
<parsable targetfile="$INSTALL_PATH/eepget" type="shell" os="unix|mac" /> <parsable targetfile="$INSTALL_PATH/eepget" type="shell" os="unix|mac" />
<parsable targetfile="$INSTALL_PATH/runplain.sh" 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 --> <!-- 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" /> <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> <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" /> <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> <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" /> <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" /> <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> <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" /> <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> <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" /> <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> <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" /> <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> <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" /> <executable targetfile="$INSTALL_PATH/installer/delete.jar" type="jar" stage="postinstall" keep="true" failure="warn"> <os family="windows" />

View File

@ -39,6 +39,10 @@ Updates May/June 2011:
- jcpuid.c updated to be compatible with -fPIC - jcpuid.c updated to be compatible with -fPIC
- 32 bit libjcpuid-linux-x86.so updated, compiled with -fPIC. - 32 bit libjcpuid-linux-x86.so updated, compiled with -fPIC.
- 64 bit libjcpuid-linux-x86_64.so added, 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 - See also javadoc and code in CPUID.java
jbigi: jbigi:
- k62 and k63 are identical for all except windows; exception added to - 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, - 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. except for athlon64 and pentium4, which use GMP 5.0.2.
- All 64 bit linux files updated with 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 - All 32 bit freebsd files updated with GMP 4.3.2, compiled with -fPIC.
libjbigi-windows-athlon.dll. NativeBigInteger now uses athlon as - All 64 bit freebsd files are new and were linked with GMP 5.0.2.
a fallback for all 64-bit processors. - 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, - 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 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. and the 64 bit file is libjbigi-linux-athlon64_64.so.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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

View File

@ -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
}
/**

View File

@ -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
}
}

Binary file not shown.

View File

@ -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.

Binary file not shown.

View File

@ -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"

View File

@ -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%
)

View File

@ -16,11 +16,11 @@ if [ ! "X$1" = "X" ]; then
cd $1 cd $1
fi fi
chmod 744 ./i2prouter chmod 755 ./i2prouter
# chmod 744 ./install_i2p_service_unix # chmod 755 ./install_i2p_service_unix
chmod 744 ./osid chmod 755 ./osid
chmod 744 ./runplain.sh chmod 755 ./runplain.sh
# chmod 744 ./uninstall_i2p_service_unix # 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." 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 fi
OS_ARCH=`uname -m` OS_ARCH=`uname -m`
X86_64=`echo "$OS_ARCH" | grep x86_64` X86_64=`echo "${OS_ARCH}" | grep x86_64`
case $HOST_OS in case $HOST_OS in
debian | fedora | gentoo | linux | mandrake | redhat | suse ) debian | fedora | gentoo | linux | mandrake | redhat | suse )
if [ "X$X86_64" = "X" ]; then if [ "X$X86_64" = "X" ]; then
wrapperpath="./lib/wrapper/linux" wrapperpath="./lib/wrapper/linux"
cp $wrapperpath/libwrapper.so ./lib/ cp ${wrapperpath}/libwrapper.so ./lib/
else else
wrapperpath="./lib/wrapper/linux64" wrapperpath="./lib/wrapper/linux64"
cp $wrapperpath/libwrapper.so ./lib cp ${wrapperpath}/libwrapper.so ./lib
fi fi
;; ;;
freebsd ) freebsd )
wrapperpath="./lib/wrapper/freebsd" if [ ! `uname -m |grep amd64` ]; then
cp $wrapperpath/libwrapper.so ./lib/ wrapperpath="./lib/wrapper/freebsd"
cp ${wrapperpath}/libwrapper.so ./lib/
else
wrapperpath="./lib/wrapper/freebsd64"
cp ${wrapperpath}/libwrapper.so ./lib/
fi
;; ;;
osx ) osx )
wrapperpath="./lib/wrapper/macosx" wrapperpath="./lib/wrapper/macosx"
cp $wrapperpath/libwrapper.jnilib ./lib/ cp ${wrapperpath}/libwrapper.jnilib ./lib/
;; ;;
solaris ) solaris )
wrapperpath="./lib/wrapper/solaris" wrapperpath="./lib/wrapper/solaris"
cp $wrapperpath/libwrapper.so ./lib/ cp ${wrapperpath}/libwrapper.so ./lib/
;; ;;
* ) * )
echo "$ERROR_MSG" echo "${ERROR_MSG}"
exit 1 exit 1
;; ;;
esac esac
cp $wrapperpath/wrapper.jar ./lib/ #cp $wrapperpath/wrapper.jar ./lib/
cp $wrapperpath/i2psvc . cp $wrapperpath/i2psvc .
chmod 744 ./eepget chmod 755 ./eepget
chmod 744 ./i2psvc chmod 755 ./i2psvc
rm -rf ./icons rm -rf ./icons
rm -rf ./lib/wrapper rm -rf ./lib/wrapper
rm -f ./lib/*.dll rm -f ./lib/*.dll

View File

@ -19,7 +19,7 @@ I2PTEMP="%SYSTEM_java_io_tmpdir"
PREFERv4="false" PREFERv4="false"
CP= 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 JAVA=java
JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt" JAVAOPTS="-Djava.net.preferIPv4Stack=${PREFERv4} -Djava.library.path=${I2P}:${I2P}/lib -Di2p.dir.base=${I2P} -DloggerFilenameOverride=logs/log-router-@.txt"

View File

@ -1,41 +1,395 @@
Copyright (c) 1999, 2004 Tanuki Software ----------------------------------------------------------------------
----------------- -----------------
Tanuki Software, Ltd.
Community Software License Agreement
Version 1.1
Permission is hereby granted, free of charge, to any person IMPORTANT-READ CAREFULLY: This license agreement is a legal agreement
obtaining a copy of the Java Service Wrapper and associated between you ("Licensee") and Tanuki Software, Ltd. ("TSI"), which
documentation files (the "Software"), to deal in the Software includes computer software, associated media, printed materials, and
without restriction, including without limitation the rights may include online or electronic documentation ( Software ). PLEASE
to use, copy, modify, merge, publish, distribute, sub-license, READ THIS AGREEMENT CAREFULLY BEFORE YOU INSTALL, COPY, DOWNLOAD OR
and/or sell copies of the Software, and to permit persons to USE THE SOFTWARE ACCOMPANYING THIS PACKAGE.
whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be Section 1 - Grant of License
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, Community editions of the Software are made available on the GNU
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES General Public License, Version 2 ("GPLv2"), included in Section 4 of
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND this license document. All sections of the Community Software License
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT Agreement must be complied with in addition to those of the GPLv2.
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 Section 2 - Definitions
developed by Silver Egg Technology under the following license:
Copyright (c) 2001 Silver Egg Technology 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.
Permission is hereby granted, free of charge, to any person 2.2. "Documentation" shall mean the contents of the website
obtaining a copy of this software and associated documentation describing the functionality and use of the Software Program, located
files (the "Software"), to deal in the Software without at http://wrapper.tanukisoftware.org
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 2.3. "Product" shall mean the computer programs, that are provided by
included in all copies or substantial portions of the Software. 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.

View File

@ -53,7 +53,7 @@
</javac> </javac>
</target> </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" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
<arg value="list" /> <arg value="list" />
<arg value="changed" /> <arg value="changed" />
@ -65,6 +65,11 @@
<arg value="[:space:]" /> <arg value="[:space:]" />
<arg value="," /> <arg value="," />
</exec> </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" > <jar destfile="./build/router.jar" basedir="./build/obj" includes="**/*.class" >
<manifest> <manifest>
<attribute name="Build-Date" value="${build.timestamp}" /> <attribute name="Build-Date" value="${build.timestamp}" />

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */ /** deprecated */
public final static String ID = "Monotone"; public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION; public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 18; public final static long BUILD = 21;
/** for example "-test" */ /** for example "-test" */
public final static String EXTRA = ""; public final static String EXTRA = "";