embed the extension inside the application, write it out if it's not present.

This commit is contained in:
idk
2020-03-29 20:50:47 -04:00
parent c38e5ba3f8
commit 9f4efbc908
4 changed files with 10 additions and 1 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
I2P-Configuration-for-Chromium
i2pchromium.exe
i2pchromium-darwin
i2pchromium

Binary file not shown.

5
Makefile Normal file
View File

@ -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

View File

@ -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())