embed the extension inside the application, write it out if it's not present.
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
I2P-Configuration-for-Chromium
|
||||
i2pchromium.exe
|
||||
i2pchromium-darwin
|
||||
i2pchromium
|
Binary file not shown.
5
Makefile
Normal file
5
Makefile
Normal 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
|
2
main.go
2
main.go
@ -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())
|
||||
|
Reference in New Issue
Block a user