2022-08-07 02:00:32 -04:00
<?xml version="1.0" encoding="ISO-8859-1"?>
<project basedir= "." default= "all" name= "i2pfirefox" >
<property file= "override.properties" />
2022-08-08 01:37:52 -04:00
<target name= "all" depends= "clean,i2pFirefoxBaseProfileZip,i2pChromiumBaseProfileZip,plugin" />
2022-08-07 02:00:32 -04:00
<target name= "war" >
<ant dir= "src" target= "build" />
</target>
2022-08-22 00:40:38 -04:00
<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 s c r i p t s a r e d e s i g n e d s o t h a t t h e y c a n b e e x e c u t e d o n b o t h W i n d o w s a n d U n i x . \ n \ n T h e t o p c o m m a n d i s f o r U n i x e s a n d s h o u l d w o r k o n m o s t P O S I X s h e l l s . A f t e r i t r u n s , t h e s c r i p t w i l l t e r m i n a t e p r e v e n t i n g W i n d o w s c o m m a n d s f r o m r u n n i n g . \ n \ n T h e s e c o n d a n d t h i r d c o m m a n d i s f o r W i n d o w s a n d w o n ' t b e r e a c h a b l e o n
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>
2022-08-31 20:58:42 -04:00
<target name= "jar" depends= "distclean,i2pFirefoxBaseProfileZip,i2pFirefoxUsabilityProfileZip,i2pChromiumBaseProfileZip" >
2022-08-08 20:10:10 -04:00
<ant dir= "src" target= "jar" />
</target>
2022-08-30 14:22:47 -04:00
<target name= "i2pFirefoxBaseProfileZip" depends= "i2pFirefoxUsabilityProfileZip" >
2022-08-07 19:35:30 -04:00
<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>
2022-08-30 14:22:47 -04:00
<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>
2022-08-07 19:35:30 -04:00
2022-08-20 22:47:51 -04:00
<target name= "i2pChromiumBaseProfile" >
2022-08-20 19:41:24 -04:00
<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>
2022-08-21 14:37:24 -04:00
<!--
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.
2022-08-31 15:11:53 -04:00
-->
<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" />
2022-08-31 15:16:31 -04:00
<arg value= "src/i2p.chromium.usability.profile/extensions/i2pchrome.js.crx" />
2022-08-31 15:11:53 -04:00
</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.
-->
2022-08-21 17:34:03 -04:00
<exec executable= "crx3" failonerror= "true" >
2022-08-20 19:50:55 -04:00
<arg value= "download" />
<arg value= "cjpalhdlnbpafiamejdnhcphjbkeiagm" />
<arg value= "-u=true" />
<arg value= "-o" />
2022-08-31 15:16:31 -04:00
<arg value= "src/i2p.chromium.usability.profile/extensions/ublock.js.crx" />
2022-08-20 19:50:55 -04:00
</exec>
<exec executable= "crx3" failonerror= "true" >
<arg value= "download" />
2022-08-31 15:11:53 -04:00
<arg value= "ammoloihpcbognfddfjcljgembpibcmb" />
2022-08-20 19:50:55 -04:00
<arg value= "-u=true" />
<arg value= "-o" />
2022-08-31 15:16:31 -04:00
<arg value= "src/i2p.chromium.usability.profile/extensions/jshelter.js.crx" />
2022-08-31 15:11:53 -04:00
</exec>
<exec executable= "crx3" failonerror= "true" >
<arg value= "download" />
<arg value= "njdfdhgcmkocbgbhcioffdbicglldapd" />
<arg value= "-u=true" />
<arg value= "-o" />
2022-08-31 15:16:31 -04:00
<arg value= "src/i2p.chromium.usability.profile/extensions/localcdn.js.crx" />
2022-08-31 15:11:53 -04:00
</exec>
2022-08-20 22:47:51 -04:00
</target>
<target name= "i2pChromiumBaseProfileZip" >
<exec executable= "rm" failonerror= "false" dir= "src" >
<arg value= "-rf" />
<arg value= "i2p.chromium.base.profile.zip" />
</exec>
2022-08-08 01:37:52 -04:00
<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>
2022-08-31 20:58:42 -04:00
<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>
2022-08-08 20:10:10 -04:00
<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" />
2022-08-19 18:30:14 -04:00
<arg value= "i2pfirefox.zip" />
2022-08-08 20:10:10 -04:00
<arg value= "src/build/i2pfirefox.jar" />
2022-08-20 20:53:31 -04:00
<arg value= "i2pfirefox.cmd" />
<arg value= "i2pchromium.cmd" />
2022-09-04 23:11:25 -04:00
<arg value= "i2pfirefox-private.cmd" />
<arg value= "i2pchromium-private.cmd" />
<arg value= "i2pfirefox-usability.cmd" />
<arg value= "i2pchromium-usability.cmd" />
<arg value= "i2pfirefox-usability-private.cmd" />
<arg value= "i2pchromium-usability-private.cmd" />
2022-08-08 20:10:10 -04:00
<arg value= "LICENSE.md" />
<arg value= "README.md" />
</exec>
</target>
2022-08-07 02:00:32 -04:00
<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" />
2022-09-05 10:20:55 -04:00
<property name= "release.number" value= "0.0.26" />
2022-08-07 02:00:32 -04:00
<!-- 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>
2022-08-31 14:22:18 -04:00
<target name= "distclean" depends= "clean" />
2022-08-30 15:49:44 -04:00
<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>
2022-08-07 02:00:32 -04:00
<target name= "clean" >
<ant dir= "src" target= "clean" />
<defaultexcludes remove= "**/*~" />
<delete >
<fileset dir= "." includes= "*/*.~ **/*.*~ */**/*.*~ *.*~" />
</delete>
2022-08-07 19:36:56 -04:00
<delete dir= "i2p.firefox.base.profile" />
2022-08-30 17:23:56 -04:00
<delete dir= "i2p.firefox.usability.profile" />
2022-08-07 19:36:56 -04:00
<delete dir= "i2p.firefox.profile" />
2022-08-07 19:41:27 -04:00
<delete dir= "src/i2p.firefox.profile.zip" />
2022-08-08 13:23:44 -04:00
<delete dir= "i2p.chromium.base.profile" />
<delete dir= "i2p.chromium.profile" />
<delete dir= "src/i2p.chromium.profile.zip" />
2022-08-07 02:00:32 -04:00
<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>
2022-09-01 15:01:52 -04:00
<target name= "jpackage" depends= "jar" >
2022-09-01 15:37:53 -04:00
<delete dir= "i2pbrowser" />
2022-09-01 15:01:52 -04:00
<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>
2022-09-01 15:44:04 -04:00
<exec executable= "rm" failonerror= "true" >
2022-09-01 15:01:52 -04:00
<arg value= "-rf" />
<arg value= "i2pbrowser.zip" />
</exec>
2022-09-01 15:44:04 -04:00
<exec executable= "zip" failonerror= "true" >
2022-09-01 15:01:52 -04:00
<arg value= "-r" />
<arg value= "i2pbrowser.zip" />
<arg value= "i2pbrowser" />
</exec>
</target>
2022-09-05 17:50:04 -04:00
<target name= "debian" depends= "jar" >
<exec executable= "bash" failonerror= "true" >
<arg value= "--verbose" />
<arg value= "-c" />
<arg value= "./debian.sh" />
</exec>
</target>
2022-08-07 02:00:32 -04:00
</project>