@echo off
if not exist target mkdir target
if not exist target\classes mkdir target\classes


echo compile classes
javac -nowarn -d target\classes -sourcepath jvm -cp "c:\users\sayho\desktop\0\lib\jni4net.j-0.8.6.0.jar"; "jvm\javatwain\IJavaProxy.java" "jvm\javatwain\IJavaProxy_.java" "jvm\javatwain\INativeProxy.java" "jvm\javatwain\INativeProxy_.java" "jvm\javatwain\DotNetScanner.java" 
IF %ERRORLEVEL% NEQ 0 goto end


echo JavaTwain.j4n.jar 
jar cvf JavaTwain.j4n.jar  -C target\classes "javatwain\IJavaProxy.class"  -C target\classes "javatwain\IJavaProxy_.class"  -C target\classes "javatwain\__IJavaProxy.class"  -C target\classes "javatwain\INativeProxy.class"  -C target\classes "javatwain\INativeProxy_.class"  -C target\classes "javatwain\__INativeProxy.class"  -C target\classes "javatwain\DotNetScanner.class"  > nul 
IF %ERRORLEVEL% NEQ 0 goto end


echo JavaTwain.j4n.dll 
csc /nologo /warn:0 /t:library /out:JavaTwain.j4n.dll /recurse:clr\*.cs  /reference:"C:\Users\sayho\Desktop\0\work\JavaTwain.dll" /reference:"C:\Users\sayho\Desktop\0\lib\jni4net.n-0.8.6.0.dll"
IF %ERRORLEVEL% NEQ 0 goto end


:end
