mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Support -debug for wails build
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
//go:build debug
|
||||
// +build debug
|
||||
|
||||
package appng
|
||||
|
||||
func IsDebug() bool {
|
||||
return true
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
//go:build !debug
|
||||
// +build !debug
|
||||
|
||||
package appng
|
||||
|
||||
func IsDebug() bool {
|
||||
return false
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func CreateApp(appoptions *options.App) (*App, error) {
|
||||
menuManager: menuManager,
|
||||
startupCallback: appoptions.OnStartup,
|
||||
shutdownCallback: appoptions.OnShutdown,
|
||||
debug: false,
|
||||
debug: IsDebug(),
|
||||
}
|
||||
|
||||
result.options = appoptions
|
||||
|
||||
@@ -236,6 +236,10 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
if options.Mode == Production || options.Mode == Debug {
|
||||
tags.Add("production")
|
||||
}
|
||||
// This mode allows you to debug a production build (not dev build)
|
||||
if options.Mode == Debug {
|
||||
tags.Add("debug")
|
||||
}
|
||||
|
||||
tags.Deduplicate()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user