View Single Post
  #8  
Old 22-04-2026, 11:12
wrathma wrathma is offline
Registered User
 
Join Date: Apr 2024
Location: Dhaka
Posts: 60
Thanks: 46
Thanked 40 Times in 23 Posts
wrathma is on a distinguished road
Quote:
Originally Posted by kj911 View Post
wempack-xdelta package: This doesn't run under Win7 x64 either. (Has anyone tested it under Win7, are you using the uploaded files or only Win10/11?)
that was my mistake. i compiled it with latest golang (v1.26.2) that doesnt
support windows 7. i tried to build it today with golang v1.20 on win10 and
the compiled exe works fine on windows 7. also one thing i noticed, that
xdelta or wemtool also doesnt work on windows xp (i might be missing out
something, check screenshots). i tried to compress the wem files in win 7 x64
vm it worked. then i generated a batch script and sent that to my win xp vm,
and then it gave me some errors that say xdelta wont work. unfortunately
thats something i cant fix.

Quote:
Originally Posted by kj911 View Post
Running the GO compiler with these switches, I managed to produce somewhat smaller EXEs. It should be 100% compatible with Win7 (also with 32-bit editions, theoretically going back to Vista, up to the early 32-bit version of Win10.) although, all "embedded binaries" are XP-compatible.
Code:
go build -a -gcflags=all="-l -B" -ldflags="-w -s" -o myapp main.go
UPD: Embedding binary files via alternative methods: https://github.com/samuelngs/binary-go workable from these "wem-(un)packer's" project?
i also used a similar build flag -
Code:
go build -ldflags="-s -w" -tags windows -trimpath -gcflags=all="-l -B" ...
i did not use -a because all it does is rebuild external packages (wempack doesnt
use any external packages). and for the alternative binary embedding method, i
dont see any reason touse it. i also used to use this binary-go library long ago but
recent golang updates made this one obsolete. now the functionality is built into
golang. this is what i use (you can see the first few lines of my code) -

Code:
//go:embed tools/ww2ogg.exe
var ww2ogg []byte

//go:embed tools/oggre_enc.exe
var oggre_enc []byte
it simply copies the raw data as a a binary stream while compiling the exe. and
when running the tool it simply copies the binary data from the exe to a temp
folder. see extractTools() from line 50-72 of wem-packer.go.




Last edited by wrathma; 22-04-2026 at 11:15. Reason: forgot to add screenshots
Reply With Quote