Clicker Game is a standalone Windows desktop game built with Go and GIU.
Install these tools before building:
- MSYS2
- Go and GCC from the MSYS2 MINGW64 environment
go-winresfor embedding the Windows icon and version metadata
Open MSYS2 MINGW64 and install the required packages:
pacman -S --needed git mingw-w64-x86_64-go mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2Install go-winres:
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
go install github.com/tc-hib/go-winres@latestFrom MSYS2 MINGW64, open the repository folder and run:
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
CGO_ENABLED=1 go run -tags static .From MSYS2 MINGW64, open the repository folder and run:
export GOROOT=/mingw64/lib/go
export GOPATH=/mingw64
go-winres make
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -v -tags static \
-ldflags "-s -w -H=windowsgui -extldflags=-static" \
-o "ClickerGame.exe" .The built application will be created as:
ClickerGame.exe
Before creating a release, update both places:
appVersioninmain.goFileVersionandProductVersioninwinres/winres.json
Then rebuild ClickerGame.exe and upload it manually to your GitHub Releases page.
Scores are stored in the current Windows user's config directory:
%AppData%\Clicker Game\scores.json
Set CLICKER_DATA_DIR to store scores.json somewhere else.
Windows icon and metadata files live in:
winres/
Run go-winres make again after changing winres/winres.json or replacing the icon.