sanbornm / go-selfupdate

Enable your Go applications to self update
MIT License
1.53k stars 176 forks source link

windows needs to install bzip2 first? #59

Open lzytaro opened 2 months ago

lzytaro commented 2 months ago

command in powershell:

PS E:\go_project\src\test_selfupdate\go-selfupdate\example> .\go-selfupdate.exe hello-updater.exe 1.3
panic: exec: "bzip2": executable file not found in %PATH%

goroutine 1 [running]:
main.createUpdate({0xc0000b0030, 0x11}, {0x3b49a2, 0xd})
        E:/go_project/src/test_selfupdate/go-selfupdate/cmd/go-selfupdate/main.go:121 +0xa6b
main.main()
        E:/go_project/src/test_selfupdate/go-selfupdate/cmd/go-selfupdate/main.go:182 +0x29a
sanbornm commented 2 months ago

Dang, I didn't realize it shelled out to bzip2. Looks like it should probably be fixed upstream here: https://github.com/kr/binarydist/issues/5 Fix: https://github.com/kr/binarydist/pull/9/files or install bzip2 on Windows.

gedw99 commented 1 month ago

Stuffbin is kind of another option .

https://github.com/knadh/stuffbin

Been using this and it’s solid.

in this case the things needed can be pushed into the binary after the build , and then pulled out of the binary before the client side unpacking .

it’s a different take on go embed ..