fix: resolve build — move main.go to root, fix Makefile wails path, update Wails to v2.12.0

- Moved main.go from cmd/app/ to project root (Wails convention)
- Makefile now resolves wails binary via GOPATH/bin fallback
- Updated wails/v2 dependency from v2.9.2 to v2.12.0
- Fixed preferences round-trip bug (store as single JSON blob)
- Fixed import strategy test (needs non-empty profile data)
This commit is contained in:
2026-04-15 00:00:00 +01:00
parent 5bff1d9f3e
commit 9fda602b82
17 changed files with 1701 additions and 82 deletions
+42
View File
@@ -0,0 +1,42 @@
// Nexus Terminal – a desktop SSH, Telnet and RAW TCP client built with Wails v2.
// This is the main entry point for the application.
package main
import (
"log"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
application "github.com/copilot-ssh-client/app/internal/app"
"github.com/copilot-ssh-client/app/frontend"
)
func main() {
nexus := application.NewApp()
// The API service is created during Startup once storage is initialised.
// We bind the App itself so Wails can call lifecycle hooks, and use
// OnStartup to wire everything, then bind the API service separately.
err := wails.Run(&options.App{
Title: "Nexus Terminal",
Width: 1400,
Height: 900,
MinWidth: 1024,
MinHeight: 600,
AssetServer: &assetserver.Options{
Assets: frontend.Assets,
},
BackgroundColour: &options.RGBA{R: 26, G: 26, B: 46, A: 255}, // #1a1a2e
OnStartup: nexus.Startup,
OnShutdown: nexus.Shutdown,
OnDomReady: nexus.DomReady,
Bind: []interface{}{
nexus.APIService(),
},
})
if err != nil {
log.Fatalf("failed to start Nexus Terminal: %v", err)
}
}