I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
build.xml 54.8 KiB
Newer Older
	</target>
<!-- build a portable archive -->
walking's avatar
walking committed

<!-- *0* Since we simply pack all files in folder "build/" into our archieve, 
		we need to make sure its small, with NO redundent jars or wars.
		thus cleaning is required before each build-->
	<target name="buildSmallOnly" depends="pkg-portable-clean,buildSmall"/>
<!-- *1* preparing the jars by OS dependent de-bloating -->
walking's avatar
walking committed
	<target name="preppkg-portable-win32-jbigi" depends="buildSmallOnly">
		<!-- rip the non-windows stuff out of jbigi.jar -->
		<mkdir dir="tmpextract" />
		<unjar src="build/jbigi.jar" dest="tmpextract/" />
		<jar destfile="build/jbigi.jar" >
			<fileset dir="tmpextract/" includes="*windows*" />
		</jar>
		<delete dir="tmpextract/" />
	</target>
walking's avatar
walking committed
	<target name="preppkg-portable-linux-jbigi"  depends="buildSmallOnly">
		<!-- rip the non-linux stuff out of jbigi.jar -->
		<mkdir dir="tmpextract" />
		<unjar src="build/jbigi.jar" dest="tmpextract/" />
walking's avatar
walking committed
		<jar destfile="build/jbigi.jar" >
			<fileset dir="tmpextract/" includes="*linux*" />
		</jar>
		<delete dir="tmpextract/" />
	</target>
walking's avatar
walking committed

<!-- *2* os independent procedure  -->
	<target name="preppkg-portable-basic" >
walking's avatar
walking committed
		<mkdir dir="pkg-temp" />
			<!-- non OS dependent configurations only, dont add *nux/win stuff here -->
walking's avatar
walking committed
			<copy todir="pkg-temp">
				<fileset dir="installer/resources/portable/configs/" />
			</copy>
walking's avatar
walking committed
			<copy file="installer/resources/blocklist.txt" todir="pkg-temp/" />
			<copy file="installer/resources/hosts.txt" todir="pkg-temp/" />
			<copy file="installer/resources/readme.license.txt" todir="pkg-temp/" />
		<mkdir dir="pkg-temp/addressbook" />
			<copy file="apps/addressbook/subscriptions.txt" todir="pkg-temp/addressbook/" />
			<copy file="apps/addressbook/myhosts.txt"  todir="pkg-temp/addressbook/" />
			<!-- config.txt is in installer/resources/portable -->
walking's avatar
walking committed
		<mkdir dir="pkg-temp/docs" />
			<copy file="installer/resources/initialNews.xml" tofile="pkg-temp/docs/news.xml" overwrite="true" />
			<copy file="installer/resources/readme/readme.html" tofile="pkg-temp/docs/readme.html" />
			<copy file="installer/resources/startconsole.html" todir="pkg-temp/docs/" />
			<copy file="installer/resources/start.ico" todir="pkg-temp/docs/" />
			<copy file="installer/resources/console.ico" todir="pkg-temp/docs/" />
			<!-- HTTP Header files, english only,
				if you need a different lang do it in a seperate target -->
walking's avatar
walking committed
			<copy todir="pkg-temp/docs/" >
				<fileset dir="installer/resources/proxy/"  includes="**-header.ht" />
			</copy>
walking's avatar
walking committed
			<!-- Theme light only -->
			<copy todir="pkg-temp/docs/themes/console/light/" overwrite="true" >
				<fileset dir="installer/resources/themes/console/light/" includes="**.css" />
			</copy>
			<copy file="installer/resources/themes/console/light/console_big.css" todir="portable/docs/themes/console/light/" />
walking's avatar
walking committed
			<copy todir="pkg-temp/docs/themes/console/images/" >
				<fileset dir="installer/resources/themes/console/images/" />
			</copy>
walking's avatar
walking committed
			<!-- FLAGs for language icon (not for ip)-->
			<copy todir="pkg-temp/docs/icons/flags" >
				<fileset dir="installer/resources/icons/flags/" includes="cn.png,de.png,fr.png,nl.png,ru.png,se.png,us.png" />
			</copy>
walking's avatar
walking committed
		<mkdir dir="pkg-temp/webapps" />
			<copy todir="pkg-temp/webapps/">
				<fileset dir="build/" includes="**.war" />
			</copy>
walking's avatar
walking committed
		<mkdir dir="pkg-temp/lib" />
			<copy todir ="pkg-temp/lib/" >
				<fileset dir="build/" includes="**.jar" />
			</copy>
			<!-- 3rd party jars from apps/  -->
				<!-- jrobin - without jobin , you lost graph and get a lot error entry in logs -->
			<copy file="apps/jrobin/jrobin-1.4.0.jar" tofile="pkg-temp/lib/jrobin.jar" />
	</target>
<!-- *3* os dependent procedure/commands -->
walking's avatar
walking committed
	<target name = "preppkg-portable-win32" depends="preppkg-portable-win32-jbigi,preppkg-portable-basic">
			<!-- systray4.j  - why do we need trayicons for portable version ? dependency hardcoded in console -->
walking's avatar
walking committed
		<copy file="apps/systray/java/lib/systray4j.dll" 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-->
walking's avatar
walking committed
		<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/win32/I2Psvc.exe" tofile="pkg-temp/i2psvc.ex_" />
			<!--  copy the unpack/start batchfiles -->
		<copy todir="pkg-temp">
			<fileset dir="installer/resources/portable/win32/" />
		</copy>
	</target>
walking's avatar
walking committed
<!-- *4* command for windows package -->
	<target name = "pkg-portable-win32"	depends="preppkg-portable-win32, pack200" >
		<!-- i need the portable\ folder in .zip so basedir is set to . -->
		<move file="pkg-temp" tofile="portable"/>
		<zip destfile="portable-win32.zip" basedir="." level="9" includes="portable\**" />
		<checksum file="portable-win32.zip" forceOverwrite="yes"/>
		<move file="portable" tofile="pkg-temp"/>
	</target>
</project>