A repurposable application-downloader and -launcher
trivrost needs certain resource files generated with go generate and then can be built using go build. Depending on the operating system and for extra debug information, additional flags are required. For convenience a Makefile is provided with several make targets. The default target detects the OS and will build all project components and can be run using just make inside the project root.
The resulting binaries are placed under the out/update_files/<windows|linux|darwin>/ subdirectory.
In this document, we will focus on how to get the project to build, i.e. successfully run just make, disregarding its configuration for now. Additional make-targets are mentioned further below.
gitgo >= v1.16goversioninfo (Make sure to add $GOPATH/bin to your $PATH)upxlibgtk-3-devbuild-essentialgo get -d -u github.com/setlog/trivrost
.go-files.cd ${GOPATH}/github.com/setlog/trivrostmake copy-test-filesmakex86_64.win32.seh.bin folder of MinGW to your %PATH%.make on Windows; getting away from this is an open issue)
go get -d -u github.com/setlog/trivrost
.go-files.ls -la at any time to see what’s in the current directory.cd ${GOPATH}/github.com/setlog/trivrost (Note how after entering the command, the working directory starts with /cygdrive/, under which Cygwin mimics your Windows drives.)make copy-test-filesmakeRun make help to see all available targets.
To force trivrost to spawn a console which shows log output when starting on Windows, set environment variable TRIVROST_FORCECONSOLE to anything non-empty.
You can run make bundle to build an archive of the program for distribution. Requires zip on MacOS and tar everywhere else.
On Windows, you can sign the binary by running make sign. For this to work, install signtool from the Windows SDK and put a base64-encoded p12 certificate into the environment variable CERT_FILE and its password into CERT_KEY.
It is possible to create an MSI package with bundles which get installed system-wide and cannot be updated. The bundles that should be prebundled need a JSON-array under the key Tags containing an element called "msi" in the deployment-config. The launcher will no longer be able to update itself and store those bundles under a directory called systembundles under the ‘Program Files’ directory. (Usually: C:\Program Files\Vendor\Product). We call this a system mode installation.
make bundle-msi ARCH=368 DEPLOYMENT_CONFIG=<path to file> or make bundle-msi ARCH=amd64 DEPLOYMENT_CONFIG=<path to file>release_files directory and can be signed using make sign-msi.make sign-msi target. It will always sign the 32bit and 64bit version and requires a 64bit system.