Skip to content

Commit

Permalink
embed the extension inside the application, write it out if it's not …
Browse files Browse the repository at this point in the history
…present.
  • Loading branch information
idk committed Mar 30, 2020
1 parent c38e5ba commit 9f4efbc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I2P-Configuration-for-Chromium
i2pchromium.exe
i2pchromium-darwin
i2pchromium
Binary file modified I2P-Configuration-for-Chromium
Binary file not shown.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

all:
GOOS=windows go build -o i2pchromium.exe
GOOS=darwin go build -o i2pchromium-darwin
GOOS=linux go build -o i2pchromium
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func main() {
log.Println("Extension error, embedded extension not read.")
} else {
if _, err := os.Stat("i2pchrome.js"); os.IsNotExist(err) {
os.MkdirAll("i2pchrome.js", os.ModePerm)
os.MkdirAll("i2pchrome.js", FS.Mode())
for _, val := range embedded {
//log.Println(val.Name())
ioutil.WriteFile("i2pchrome.js"+val.Name(), val.Sys().([]byte), val.Mode())
Expand Down

0 comments on commit 9f4efbc

Please sign in to comment.