Here is the long awaited upgrade of the wrapper.

The aging v3.1.x of the java wrapper is being replaced in this
checkin with the latest (current) stable release, 3.5.9.

There is now only one copy of wrapper.jar, located in wrapper/all.
The build.xml scripts have been changed to reflect this new path.

All binaries--with the exception of solaris (I don't have 
SPARC hardware)--have been stripped.

FreeBSD x64 is being included in this release.

I have only included the x86 macosx wrapper due to not having a
system to test the x64 code on. On the plus side, the wrapper is 
universal (a FAT powerpc & Intel Mac) binary. No more prompting
to install Rosetta!
This commit is contained in:
kytv
2011-06-07 14:53:10 +00:00
parent 57fc896e59
commit b2e8d3cedf
24 changed files with 34 additions and 170 deletions

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>

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>
@ -211,7 +211,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 +243,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

@ -337,7 +337,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/" />
@ -434,6 +434,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>
@ -454,6 +457,7 @@
<copy file="installer/resources/postinstall.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>
@ -873,7 +877,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 +1183,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">

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

View File

@ -21,7 +21,7 @@ set INSTALL_PATH="%1"
copy "%INSTALL_PATH%lib\wrapper\win32\I2Psvc.exe" "%INSTALL_PATH%" 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.dll" "%INSTALL_PATH%lib"
copy "%INSTALL_PATH%lib\wrapper\win32\wrapper.jar" "%INSTALL_PATH%lib" copy "%INSTALL_PATH%lib\wrapper\all\wrapper.jar" "%INSTALL_PATH%lib"
if "%OS%"=="Windows_NT" ( if "%OS%"=="Windows_NT" (

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