From a7597b2a6d2ce495a4ee442ea22533ed5c3ef60f Mon Sep 17 00:00:00 2001
From: aum <aum>
Date: Sun, 11 Apr 2004 10:31:41 +0000
Subject: [PATCH] Tested build process on windows. Updated README, and fixed
 build.bat, so windows build of i2psam.jar works.

---
 apps/sam/jython/build/README    | 40 ++++++++++++++++++++++++++++-----
 apps/sam/jython/build/build.bat | 22 +++++++++---------
 2 files changed, 46 insertions(+), 16 deletions(-)

diff --git a/apps/sam/jython/build/README b/apps/sam/jython/build/README
index 121a8d649a..e72bc479e9 100644
--- a/apps/sam/jython/build/README
+++ b/apps/sam/jython/build/README
@@ -11,17 +11,47 @@ You will need:
 
 Note that you don't need python to build the SAM server
 
+IMPORTANT - when installing jython, and run java on jython_n.n.class,
+make sure you run the java.exe that's in your SDK, not the one in your
+JRE.
+
+---------------------------------------------------------
+
 2) Preparation
 
 Edit the Makefile, and set JYTHONJAR to where your jython.jar lives
-Or, if on windows, edit build.bat and set the first field of CLASSPATH
-to where jython.jar lives
+
+Don't worry about this if your're on windows
+
+----------------------------------------------------------
 
 3) Building
 
-To build i2psam.jar, simply type 'make'.
-or if on Windows, type 'build.bat'
+To build i2psam.jar on regular *nix OSs, simply type 'make'.
+
+To build i2psam.jar on Windows, type 'build.bat'
+
+----------------------------------------------------------
 
 4) Installing
 
-Copy i2psam.jar to wherever the jar files live on your i2p installation
+Copy i2psam.jar to wherever the jar files live on your i2p installation,
+usually <i2pbasedir>/lib
+
+Find jython.jar, and copy it there too
+
+----------------------------------------------------------
+
+5) Running
+
+(assuming that you're putting the start script into your main i2p
+runtime directory, where the I2P jars live in a 'lib' subdirectory)
+
+You will need to launch i2psam.jar with a command like:
+
+ java -cp lib/jython.jar:lib/i2p.jar:lib/mstreaming.jar:lib/i2psam.jar i2psam
+
+or on windows,
+
+ java -cp lib\jython.jar;lib\i2p.jar;lib\mstreaming.jar;lib\i2psam.jar i2psam
+
diff --git a/apps/sam/jython/build/build.bat b/apps/sam/jython/build/build.bat
index dd6b154394..96971b79dd 100644
--- a/apps/sam/jython/build/build.bat
+++ b/apps/sam/jython/build/build.bat
@@ -1,11 +1,11 @@
-@echo off
-rem This makefile constructs the SAM Server i2psam.jar
-
-rem by default, it gets linked into a standalone .jar file, together
-rem with the I2P core classes, and the jython classes
-
-CLASSPATH=\path\to\my\jython.jar;..\..\..\..\build\i2p.jar;..\..\..\..\build\mstreaming.jar
-
-@echo Building i2psam.jar
-jythonc --jar i2psam.jar --all ..\src\i2psam.py
-
+@echo off
+rem This makefile constructs the SAM Server i2psam.jar
+rem Once you've built i2psam.jar, you'll need to copy it and
+rem jython.jar into the main jars directory
+
+@echo Building i2psam.jar
+@echo on
+set CLASSPATH=..\..\..\..\build\i2p.jar;..\..\..\..\build\mstreaming.jar
+
+@echo Building i2psam.jar
+jythonc --jar i2psam.jar ..\src\i2psam.py
-- 
GitLab