itchio / butler

🎩 Command-line itch.io helper
MIT License
744 stars 53 forks source link

Collect MSI logs by default, relay & respect exit codes as specified in info.json #110

Closed fasterthanlime closed 7 years ago

fasterthanlime commented 7 years ago

install_prereqs_windows.go is in pretty good shape right now, but I don't see any exit code handling.

As far as I can tell, cmd.Run() will return an error if there's a non-zero exit code (even though, with MSIs/.exe installers, many exit codes might indicate success, not just 0). The redist file format already accomodates for that: https://github.com/itchio/butler/blob/master/redist/types.go

Additionally, I want MSI installs (which are particularly fiddly) to collect logs by default and the itch app to relay those (in case it failed) in the cave logs so that when reported by the automatic installer, we can see what was going on.

See https://github.com/itchio/itch/issues/1304 and https://github.com/itchio/itch-compatibility-watchlist/issues/1049

fasterthanlime commented 7 years ago

Battle plan:

Use https://github.com/winlabs/gowin32/ to use the win32 API for MSIs directly.