432 lines
19 KiB
XML
Executable File
432 lines
19 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="examples" >
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md"/>
|
|
<arg value="Example Commands:" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="=================" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="printf">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="These scripts are designed so that they can be executed on both Windows and Unix.\n\nThe top command is for Unixes and should work on most POSIX shells. After it runs, the script will terminate preventing Windows commands from running.\n\nThe second and third command is for Windows and won't be reachable on
|
|
Linux(because the top command will be run and the script will exit).\n\nBoth determine the path to the script, use it to find the jar file, and execute a single command.\n\n" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Auto-Select in Persistent Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pbrowser.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Auto-Select in Private Browsing Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pbrowser-private.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Firefox in Persistent Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pfirefox.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Firefox in Private Browsing Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pfirefox-private.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Chromium in Persistent Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pchromium.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="Chromium in Private Browsing Mode" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```sh" />
|
|
</exec>
|
|
<exec executable="cat">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="i2pchromium-private.cmd" />
|
|
</exec>
|
|
<exec executable="echo">
|
|
<redirector output="USAGE.md" append="true"/>
|
|
<arg value="```" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="jar" depends="distclean,i2pFirefoxBaseProfileZip,i2pFirefoxUsabilityProfileZip,i2pChromiumBaseProfileZip">
|
|
<ant dir="src" target="jar" />
|
|
</target>
|
|
|
|
<target name="i2pFirefoxBaseProfileZip" depends="i2pFirefoxUsabilityProfileZip">
|
|
<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="i2pFirefoxUsabilityProfileZip">
|
|
<exec executable="rm" failonerror="false" dir="src">
|
|
<arg value="-rf" />
|
|
<arg value="i2p.firefox.usability.profile.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true" dir="src">
|
|
<arg value="-r"/>
|
|
<arg value="i2p.firefox.usability.profile.zip"/>
|
|
<arg value="i2p.firefox.usability.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="doojmbjmlfjjnbmnoijecmcbfeoakpjm" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.base.profile/extensions/noscript.js.crx" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="i2pChromiumUsabilityProfile">
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.usability.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.usability.profile/extensions/ublock.js.crx" />
|
|
</exec>
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="ammoloihpcbognfddfjcljgembpibcmb" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.usability.profile/extensions/jshelter.js.crx" />
|
|
</exec>
|
|
<exec executable="crx3" failonerror="true">
|
|
<arg value="download"/>
|
|
<arg value="njdfdhgcmkocbgbhcioffdbicglldapd" />
|
|
<arg value="-u=true"/>
|
|
<arg value="-o" />
|
|
<arg value="src/i2p.chromium.usability.profile/extensions/localcdn.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="i2pChromiumUsabilityProfileZip">
|
|
<exec executable="rm" failonerror="false" dir="src">
|
|
<arg value="-rf" />
|
|
<arg value="i2p.chromium.usability.profile.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true" dir="src">
|
|
<arg value="-r"/>
|
|
<arg value="i2p.chromium.usability.profile.zip"/>
|
|
<arg value="i2p.chromium.usability.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.20" />
|
|
|
|
<!-- 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>
|
|
<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="clangFmt">
|
|
<exec executable="clang-format">
|
|
<arg value="-i"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PBrowser.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PCommonBrowser.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PChromium.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileBuilder.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileChecker.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PChromiumProfileUnpacker.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefox.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileBuilder.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileChecker.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PFirefoxProfileUnpacker.java"/>
|
|
<arg value="src/java/net/i2p/i2pfirefox/I2PGenericUnsafeBrowser.java"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<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.usability.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>
|
|
<target name="jpackage" depends="jar">
|
|
<delete dir="i2pbrowser" />
|
|
<exec executable="jpackage" failonerror="true">
|
|
<arg value="--type"/> <arg value="app-image"/>
|
|
<arg value="--name"/> <arg value="i2pbrowser"/>
|
|
<arg value="--app-version"/> <arg value="${release_number}"/>
|
|
<arg value="--input"/> <arg value="src/build"/>
|
|
<arg value="--main-jar"/> <arg value="i2pfirefox.jar"/>
|
|
<arg value="--main-class"/> <arg value="net.i2p.i2pfirefox.I2PBrowser"/>
|
|
</exec>
|
|
<exec executable="rm" failonerror="true">
|
|
<arg value="-rf" />
|
|
<arg value="i2pbrowser.zip" />
|
|
</exec>
|
|
<exec executable="zip" failonerror="true">
|
|
<arg value="-r"/>
|
|
<arg value="i2pbrowser.zip"/>
|
|
<arg value="i2pbrowser"/>
|
|
</exec>
|
|
</target>
|
|
</project>
|