﻿TACImageViewer v1.2 - Build Instructions
========================================

Source language:
  Go

Confirmed build environment for the distributed binaries:
  Go 1.23.2
  Windows amd64 target
  CGO disabled

Command Prompt example:

  cd src
  set CGO_ENABLED=0
  set GOOS=windows
  set GOARCH=amd64

  go build -trimpath -ldflags="-H=windowsgui -s -w" -o ..\TACImageViewer_Helper.exe .\cmd\helper
  go build -trimpath -ldflags="-H=windowsgui -s -w" -o ..\TACImageViewer_Watcher.exe .\cmd\watcher

Notes:
- v1.2 combines the Enter and double-click hooks in TACImageViewer_Helper.exe.
- TACImageViewer_Watcher.exe monitors only TACImageViewer_Helper.exe.
- Recommended runtime layout is C:\TACImageViewer with Watcher, Helper, and INI in the same directory.
  Avoid using Program Files for the writable INI because Windows VirtualStore may redirect it for non-elevated processes.
- TACImageViewer_Helper.log is append-only across Helper restarts and records a session separator.
- If launching the configured viewer fails, Helper shows an error dialog and does not fall back to TAC's normal Open command.
- The public v1.2 Watcher waits 5 seconds between failed Helper start attempts and suppresses repeated identical start-error log entries.
- Rebuilt binaries can have different SHA-256 values from the distributed binaries.
- After rebuilding, test Enter, double-click, non-image behavior, folder behavior, viewer switching,
  viewer-launch failure, log append behavior, and Watcher start/stop before redistribution.
- go vet may report "possible misuse of unsafe.Pointer" for Win32 interop code that
  passes Windows handles/structures through syscall. Review such warnings, but do not
  treat a nonzero go vet result as proof that the Windows build itself failed.
