187 lines
8.6 KiB
XML
Executable File
187 lines
8.6 KiB
XML
Executable File
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<project basedir="." default="all" name="i2pfirefox">
|
|
<property file="override.properties"/>
|
|
|
|
<target name="all" depends="clean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip,plugin" />
|
|
|
|
<target name="war" >
|
|
<ant dir="src" target="build" />
|
|
</target>
|
|
|
|
<target name="jar" depends="distclean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip">
|
|
<ant dir="src" target="jar" />
|
|
</target>
|
|
|
|
<target name="i2pFirefoxBaseProfileZip">
|
|
<exec executable="rm" failonerror="false" dir="src">
|
|
<arg value="-rf" />
|
|
<arg value="i2p.firefox.base.profile.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true" dir="src">
|
|
<arg value="-r"/>
|
|
<arg value="i2p.firefox.base.profile.zip"/>
|
|
<arg value="i2p.firefox.base.profile"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="i2pChromiumBaseProfile">
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.base.profile/extensions/i2pchrome.js.crx" />
|
|
</exec>
|
|
<!--
|
|
TODO: I don't want to deal with licensing issues while on a headfull of cold
|
|
medicine and COVID. SO for now I'm only including a plugin written by a person
|
|
who I'm pretty sure isn't going to sue me for it(me). In order to more closely
|
|
mirror the behavior of the Firefox profile, we should at least include a script
|
|
blocking plugin, such as ScriptSafe. uBlock was also suggested and I tend to
|
|
agree. However, since we have to load extensions unpacked, they won't be updated
|
|
automatically. This is probably good for working against fingerprinting but it's
|
|
also more work should a plugin have a security vulnerability.
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="cjpalhdlnbpafiamejdnhcphjbkeiagm" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.base.profile/extensions/ublock.js.crx" />
|
|
</exec>
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="oiigbmnaadbkfbmpbfijlflahbdbdgdf" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.base.profile/extensions/scriptsafe.js.crx" />
|
|
</exec>-->
|
|
</target>
|
|
|
|
<target name="i2pChromiumBaseProfileZip">
|
|
<exec executable="rm" failonerror="false" dir="src">
|
|
<arg value="-rf" />
|
|
<arg value="i2p.chromium.base.profile.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true" dir="src">
|
|
<arg value="-r"/>
|
|
<arg value="i2p.chromium.base.profile.zip"/>
|
|
<arg value="i2p.chromium.base.profile"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="freeZip" depends="jar">
|
|
<exec executable="rm" failonerror="false" dir="src">
|
|
<arg value="-rf" />
|
|
<arg value="i2pbrowser.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true">
|
|
<arg value="-r"/>
|
|
<arg value="i2pfirefox.zip"/>
|
|
<arg value="src/build/i2pfirefox.jar"/>
|
|
<arg value="i2pfirefox.cmd"/>
|
|
<arg value="i2pchromium.cmd"/>
|
|
<arg value="LICENSE.md"/>
|
|
<arg value="README.md"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="plugin" depends="war">
|
|
<delete>
|
|
<!-- in installer but not update -->
|
|
<fileset dir="plugin/" includes="i2ptunnel.config i2pfirefox.config eepsite/docroot/index.html eepsite/docroot/robots.txt" />
|
|
</delete>
|
|
<delete dir="plugin/eepsite/docroot/torrents/" />
|
|
<!-- get version number -->
|
|
<buildnumber file="scripts/build.number" />
|
|
<property name="release.number" value="0.0.6" />
|
|
|
|
<!-- make the update xpi2p -->
|
|
<!-- this contains everything except i2ptunnel.config -->
|
|
<copy file="LICENSE.md" todir="plugin/" overwrite="true" />
|
|
<copy file="README.md" todir="plugin/" overwrite="true" />
|
|
<copy file="CHANGES.md" todir="plugin/" overwrite="true" />
|
|
<copy file="scripts/firefox.css" todir="plugin/eepsite/docroot/" overwrite="true" />
|
|
<copy file="scripts/firefox-purple.css" todir="plugin/eepsite/docroot/" overwrite="true" />
|
|
<copy file="scripts/favicon.png" todir="plugin/eepsite/docroot/" overwrite="true" />
|
|
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="update-only=true" />
|
|
</exec>
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
</exec>
|
|
<!--<exec executable="pack200" failonerror="true">
|
|
<arg value="-r" />
|
|
<arg value="plugin/lib/i2pfirefox.jar" />
|
|
<arg value="src/build/i2pfirefox.jar" />
|
|
</exec>
|
|
<exec executable="pack200" failonerror="true">
|
|
<arg value="-r" />
|
|
<arg value="plugin/eepsite/webapps/firefox.war" />
|
|
<arg value="src/build/firefox.war.jar" />
|
|
</exec>-->
|
|
<input message="Enter su3 signing key password:" addproperty="release.password.su3" />
|
|
<fail message="You must enter a password." >
|
|
<condition>
|
|
<equals arg1="${release.password.su3}" arg2=""/>
|
|
</condition>
|
|
</fail>
|
|
<!-- this will fail if no su3 keys exist, as it needs the password twice -->
|
|
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
|
<arg value="plugin" />
|
|
</exec>
|
|
<move file="i2pfirefox.xpi2p" tofile="i2pfirefox-update.xpi2p" overwrite="true" />
|
|
<move file="i2pfirefox.su3" tofile="i2pfirefox-update.su3" overwrite="true" />
|
|
|
|
<!-- make the install xpi2p -->
|
|
<copy file="scripts/plugin.config" todir="plugin/" overwrite="true" />
|
|
<!-- Files in installer but not update. Be sure to Add to delete fileset above and clean target below -->
|
|
<copy file="scripts/i2ptunnel.config" todir="plugin/" overwrite="true" />
|
|
<copy file="scripts/i2pfirefox.config" todir="plugin/" overwrite="true" />
|
|
<copy file="scripts/robots.txt" todir="plugin/eepsite/docroot/" overwrite="true" />
|
|
<mkdir dir="plugin/eepsite/docroot/torrents/" />
|
|
<exec executable="echo" osfamily="unix" failonerror="true" output="plugin/plugin.config" append="true">
|
|
<arg value="version=${release.number}-b${build.number}" />
|
|
</exec>
|
|
<exec executable="scripts/makeplugin.sh" inputstring="${release.password.su3}" failonerror="true" >
|
|
<arg value="plugin" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="distclean" depends="clean" />
|
|
|
|
<target name="clean" >
|
|
<ant dir="src" target="clean" />
|
|
<defaultexcludes remove="**/*~"/>
|
|
<delete>
|
|
<fileset dir="." includes="*/*.~ **/*.*~ */**/*.*~ *.*~" />
|
|
</delete>
|
|
<delete dir="i2p.firefox.base.profile" />
|
|
<delete dir="i2p.firefox.profile" />
|
|
<delete dir="src/i2p.firefox.profile.zip" />
|
|
<delete dir="i2p.chromium.base.profile" />
|
|
<delete dir="i2p.chromium.profile" />
|
|
<delete dir="src/i2p.chromium.profile.zip" />
|
|
<delete file="plugin/i2ptunnel.config" />
|
|
<delete file="plugin/plugin.config" />
|
|
<delete file="plugin/i2pfirefox.config" />
|
|
<delete file="plugin/eepsite/docroot/index.html" />
|
|
<delete file="plugin/eepsite/docroot/robots.txt" />
|
|
<delete file="plugin/eepsite/docroot/firefox.css" />
|
|
<delete file="plugin/eepsite/docroot/firefox-purple.css" />
|
|
<delete file="plugin/eepsite/docroot/favicon.png" />
|
|
<delete file="plugin/lib/i2pfirefox.jar" />
|
|
<delete file="plugin/eepsite/webapps/firefox.war" />
|
|
<delete file="plugin/CHANGES.md" />
|
|
<delete file="plugin/LICENSE.md" />
|
|
<delete file="plugin/README.md" />
|
|
<delete file="i2pfirefox.xpi2p" />
|
|
<delete file="i2pfirefox-update.xpi2p" />
|
|
<delete file="i2pfirefox.su3" />
|
|
<delete file="i2pfirefox-update.su3" />
|
|
<delete file="plugin.zip" />
|
|
<delete dir="plugin/eepsite/docroot/torrents/" />
|
|
</target>
|
|
|
|
</project>
|