Skip to content

Commit b725193

Browse files
committed
feat(setup): add code signing configuration and status display
- Add SigningDefaults to GlobalDefaults for macOS/Windows/Linux signing config - Add signing status section to doctor command with platform detection - Add --json flag to doctor command for machine-readable output - Add /api/signing and /api/signing/status endpoints to setup wizard - Add SigningStep component with platform tabs and status indicators - Wire signing step into wizard flow after projects step The signing step shows detected signing identities from: - macOS: keychain codesigning identities, notarization config - Windows: certificate file/store/cloud, SignTool availability - Linux: GPG keys from keyring or config
1 parent 18ea7fe commit b725193

File tree

19 files changed

+1154
-227
lines changed

19 files changed

+1154
-227
lines changed

v3/UNRELEASED_CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ After processing, the content will be moved to the main changelog and this file
2121
- Add universal link support for macOS by @APshenkin in [PR](https://github.com/wailsapp/wails/pull/4712)
2222
- Refactor binding transport layer by @APshenkin in [PR](https://github.com/wailsapp/wails/pull/4702)
2323
- Add aria-label identifiers to the helloworld templates so that the example app can be easily tested by Appium test clients by @chinenual in [PR](https://github.com/wailsapp/wails/pull/4760)
24+
- Add code signing configuration to GlobalDefaults for all platforms (macOS, Windows, Linux)
25+
- Add signing status section to `wails3 doctor` command showing configured signing identities
26+
- Add `--json` flag to `wails3 doctor` for machine-readable output
27+
- Add signing step to setup wizard with platform-specific status display
2428

2529
## Changed
2630
<!-- Changes in existing functionality -->

v3/cmd/wails3/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ func main() {
4949
pkg.Action(func() error {
5050
return commands.Package(&pkgFlags, pkg.OtherArgs())
5151
})
52-
app.NewSubCommandFunction("doctor", "System status report", commands.Doctor)
52+
doctorCmd := app.NewSubCommand("doctor", "System status report")
53+
var doctorFlags flags.Doctor
54+
doctorCmd.AddFlags(&doctorFlags)
55+
doctorCmd.Action(func() error {
56+
return commands.Doctor(&doctorFlags)
57+
})
5358
app.NewSubCommandFunction("releasenotes", "Show release notes", commands.ReleaseNotes)
5459

5560
task := app.NewSubCommand("task", "Run and list tasks")

v3/internal/commands/doctor.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ package commands
22

33
import (
44
"github.com/wailsapp/wails/v3/internal/doctor"
5+
"github.com/wailsapp/wails/v3/internal/flags"
56
)
67

7-
type DoctorOptions struct{}
8-
9-
func Doctor(_ *DoctorOptions) error {
10-
return doctor.Run()
8+
func Doctor(options *flags.Doctor) error {
9+
return doctor.Run(options.JSON)
1110
}

v3/internal/defaults/defaults.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ type GlobalDefaults struct {
1818

1919
// Default project settings
2020
Project ProjectDefaults `json:"project" yaml:"project"`
21+
22+
// Code signing configuration (optional)
23+
Signing SigningDefaults `json:"signing,omitempty" yaml:"signing,omitempty"`
2124
}
2225

2326
// AuthorDefaults contains the author's information
@@ -38,6 +41,41 @@ type ProjectDefaults struct {
3841
UseInterfaces bool `json:"useInterfaces" yaml:"useInterfaces"`
3942
}
4043

44+
// SigningDefaults contains code signing configuration for all platforms
45+
type SigningDefaults struct {
46+
Darwin DarwinSigningDefaults `json:"darwin,omitempty" yaml:"darwin,omitempty"`
47+
Windows WindowsSigningDefaults `json:"windows,omitempty" yaml:"windows,omitempty"`
48+
Linux LinuxSigningDefaults `json:"linux,omitempty" yaml:"linux,omitempty"`
49+
}
50+
51+
// DarwinSigningDefaults contains macOS code signing configuration
52+
type DarwinSigningDefaults struct {
53+
Identity string `json:"identity,omitempty" yaml:"identity,omitempty"`
54+
TeamID string `json:"teamID,omitempty" yaml:"teamID,omitempty"`
55+
KeychainProfile string `json:"keychainProfile,omitempty" yaml:"keychainProfile,omitempty"`
56+
Entitlements string `json:"entitlements,omitempty" yaml:"entitlements,omitempty"`
57+
P12Path string `json:"p12Path,omitempty" yaml:"p12Path,omitempty"`
58+
APIKeyPath string `json:"apiKeyPath,omitempty" yaml:"apiKeyPath,omitempty"`
59+
APIKeyID string `json:"apiKeyID,omitempty" yaml:"apiKeyID,omitempty"`
60+
APIIssuerID string `json:"apiIssuerID,omitempty" yaml:"apiIssuerID,omitempty"`
61+
}
62+
63+
// WindowsSigningDefaults contains Windows code signing configuration
64+
type WindowsSigningDefaults struct {
65+
CertificatePath string `json:"certificatePath,omitempty" yaml:"certificatePath,omitempty"`
66+
Thumbprint string `json:"thumbprint,omitempty" yaml:"thumbprint,omitempty"`
67+
TimestampServer string `json:"timestampServer,omitempty" yaml:"timestampServer,omitempty"`
68+
CloudProvider string `json:"cloudProvider,omitempty" yaml:"cloudProvider,omitempty"`
69+
CloudKeyID string `json:"cloudKeyID,omitempty" yaml:"cloudKeyID,omitempty"`
70+
}
71+
72+
// LinuxSigningDefaults contains Linux package signing configuration
73+
type LinuxSigningDefaults struct {
74+
GPGKeyPath string `json:"gpgKeyPath,omitempty" yaml:"gpgKeyPath,omitempty"`
75+
GPGKeyID string `json:"gpgKeyID,omitempty" yaml:"gpgKeyID,omitempty"`
76+
SignRole string `json:"signRole,omitempty" yaml:"signRole,omitempty"`
77+
}
78+
4179
// Default returns sensible defaults for first-time users
4280
func Default() GlobalDefaults {
4381
return GlobalDefaults{

0 commit comments

Comments
 (0)