Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
3e5b9c049d | |||
e5d36aff8f | |||
fa3fa165b1 | |||
5211c6d7e0 | |||
ce6a31166b | |||
842f4bb992 | |||
5fefdab16d | |||
53d4cf8146 | |||
6daeaf8297 | |||
8645f69067 | |||
4f22360b2f | |||
ccfe0af3f6 |
@ -80,6 +80,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
Fri, August 20
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
Chromium is now a first-class citizen
|
||||
</li>
|
||||
</ul>
|
||||
<h2>
|
||||
Fri, August 19
|
||||
</h2>
|
||||
|
@ -1,3 +1,8 @@
|
||||
Fri, August 20
|
||||
--------------
|
||||
|
||||
- Chromium is now a first-class citizen
|
||||
|
||||
Fri, August 19
|
||||
--------------
|
||||
|
||||
|
35
README.md
35
README.md
@ -9,7 +9,7 @@ A port of the batch scripts from i2p.firefox to Java.
|
||||
```sh
|
||||
|
||||
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.9/i2pfirefox.zip
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
|
||||
unzip i2pfirefox.zip
|
||||
./i2pfirefox.cmd
|
||||
|
||||
@ -18,6 +18,27 @@ unzip i2pfirefox.zip
|
||||
./i2pchromium.cmd
|
||||
```
|
||||
|
||||
### Build Dependencies
|
||||
|
||||
You will need `ant`, `java` and for building the Chromium profile, a Go application
|
||||
called `crx3` which is used to interact with the Chrome app store. I've been using Java 17
|
||||
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
||||
|
||||
```sh
|
||||
sudo apt-get install openjdk-17* ant golang-go
|
||||
go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
||||
```
|
||||
|
||||
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
|
||||
about it. Once you have that installed, when building, make sure to add `$GOPATH/bin/`
|
||||
to your `$PATH`.
|
||||
|
||||
```sh
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
```
|
||||
|
||||
Will almost always work.
|
||||
|
||||
### Building
|
||||
|
||||
This is not actually a plugin yet, but it will be soon. The important bit is the jar.
|
||||
@ -43,6 +64,7 @@ add a UI element that triggers something along the lines of this:
|
||||
|
||||
```java
|
||||
|
||||
// Firefox Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PFirefox");
|
||||
@ -51,4 +73,15 @@ if (i2pIsRunning()) {
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
|
||||
// Chromium Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
```
|
||||
|
||||
to add a browser management tool to it.
|
||||
|
16
build.xml
16
build.xml
@ -24,11 +24,7 @@
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="i2pChromiumBaseProfileZip">
|
||||
<exec executable="rm" failonerror="false" dir="src">
|
||||
<arg value="-rf" />
|
||||
<arg value="i2p.chromium.base.profile.zip" />
|
||||
</exec>
|
||||
<target name="i2pChromiumBaseProfile">
|
||||
<exec executable="crx3" failonerror="true">
|
||||
<arg value="download"/>
|
||||
<arg value="ikdjcmomgldfciocnpekfndklkfgglpe" />
|
||||
@ -50,6 +46,13 @@
|
||||
<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"/>
|
||||
@ -66,7 +69,8 @@
|
||||
<arg value="-r"/>
|
||||
<arg value="i2pfirefox.zip"/>
|
||||
<arg value="src/build/i2pfirefox.jar"/>
|
||||
<arg value="i2pbrowser.cmd"/>
|
||||
<arg value="i2pfirefox.cmd"/>
|
||||
<arg value="i2pchromium.cmd"/>
|
||||
<arg value="LICENSE.md"/>
|
||||
<arg value="README.md"/>
|
||||
</exec>
|
||||
|
56
index.html
56
index.html
@ -94,14 +94,54 @@
|
||||
</h3>
|
||||
<pre><code>
|
||||
mkdir ~/tmp-i2pfirefox && cd ~/tmp-i2pfirefox
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.8/i2pfirefox.zip
|
||||
wget https://github.com/eyedeekay/i2p.plugins.firefox/releases/download/0.0.10/i2pfirefox.zip
|
||||
unzip i2pfirefox.zip
|
||||
./i2pbrowser.cmd
|
||||
./i2pfirefox.cmd
|
||||
|
||||
#or if you want to use a Chromium
|
||||
|
||||
./test-chromium.sh
|
||||
./i2pchromium.cmd
|
||||
</code></pre>
|
||||
<h3>
|
||||
Build Dependencies
|
||||
</h3>
|
||||
<p>
|
||||
You will need
|
||||
<code>
|
||||
ant
|
||||
</code>
|
||||
,
|
||||
<code>
|
||||
java
|
||||
</code>
|
||||
and for building the Chromium profile, a Go application
|
||||
called
|
||||
<code>
|
||||
crx3
|
||||
</code>
|
||||
which is used to interact with the Chrome app store. I’ve been using Java 17
|
||||
on Debian mostly, on Debian and Ubuntu, install the dependencies with:
|
||||
</p>
|
||||
<pre><code>sudo apt-get install openjdk-17* ant golang-go
|
||||
go install github.com/mediabuyerbot/go-crx3/crx3@latest
|
||||
</code></pre>
|
||||
<p>
|
||||
For Fedora, use Yum, for Arch use pacman or something else but make sure to tell everyone
|
||||
about it. Once you have that installed, when building, make sure to add
|
||||
<code>
|
||||
$GOPATH/bin/
|
||||
</code>
|
||||
to your
|
||||
<code>
|
||||
$PATH
|
||||
</code>
|
||||
.
|
||||
</p>
|
||||
<pre><code>export PATH=$PATH:$HOME/go/bin
|
||||
</code></pre>
|
||||
<p>
|
||||
Will almost always work.
|
||||
</p>
|
||||
<h3>
|
||||
Building
|
||||
</h3>
|
||||
@ -127,12 +167,22 @@ java -cp ./src/build/i2pfirefox.jar net.i2p.i2pfirefox.I2PFirefox
|
||||
add a UI element that triggers something along the lines of this:
|
||||
</p>
|
||||
<pre><code>
|
||||
// Firefox Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PFirefox");
|
||||
I2PFirefox i2pFirefox = new I2PFirefox();
|
||||
i2pFirefox.launch();
|
||||
}
|
||||
</code></pre>
|
||||
<pre><code>
|
||||
// Chromium Example
|
||||
if (i2pIsRunning()) {
|
||||
logger.warning("I2P is already running");
|
||||
System.out.println("I2PChromium");
|
||||
I2PChromium i2pChromium = new I2PChromium();
|
||||
i2pChromium.launch();
|
||||
}
|
||||
</code></pre>
|
||||
<p>
|
||||
to add a browser management tool to it.
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
GITHUB_USER=eyedeekay
|
||||
GITHUB_REPO=i2p.plugins.firefox
|
||||
GITHUB_NAME="Which fixes some Chromium issues identified by xip"
|
||||
GITHUB_NAME="Which fixes another tiny bug that was bothering me"
|
||||
GITHUB_DESCRIPTION=$(cat CHANGES.md)
|
||||
GITHUB_TAG=0.0.9
|
||||
GITHUB_TAG=0.0.12
|
||||
ant distclean
|
||||
ant jar freeZip
|
||||
github-release release --user "${GITHUB_USER}" \
|
||||
@ -13,6 +13,11 @@ github-release release --user "${GITHUB_USER}" \
|
||||
--description "${GITHUB_DESCRIPTION}" \
|
||||
--tag "${GITHUB_TAG}"; true
|
||||
sleep 2s
|
||||
github-release edit --user "${GITHUB_USER}" \
|
||||
--repo "${GITHUB_REPO}" \
|
||||
--name "${GITHUB_NAME}" \
|
||||
--description "${GITHUB_DESCRIPTION}" \
|
||||
--tag "${GITHUB_TAG}"; true
|
||||
github-release upload --user "${GITHUB_USER}" \
|
||||
--repo "${GITHUB_REPO}" \
|
||||
--tag "${GITHUB_TAG}" \
|
||||
|
@ -339,8 +339,10 @@ public class I2PChromium {
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/ublock.js").getAbsolutePath()
|
||||
+","+
|
||||
new File(I2PChromiumProfileBuilder.profileDirectory(),"extensions/scriptsafe.js").getAbsolutePath();*/
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+19] = args[i];
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+20] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PChromiumProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
|
@ -294,8 +294,10 @@ public class I2PFirefox {
|
||||
newArgs[0] = firefox;
|
||||
newArgs[1] = "--profile";
|
||||
newArgs[2] = I2PFirefoxProfileBuilder.profileDirectory();
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
if (args.length > 0) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
newArgs[i+3] = args[i];
|
||||
}
|
||||
}
|
||||
return new ProcessBuilder(newArgs).directory(I2PFirefoxProfileBuilder.runtimeDirectory(true));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user