[windows-x] Huge updates to devmode, runtime, build command.

This commit is contained in:
Lea Anthony
2021-08-22 23:05:22 +10:00
parent 31468aa177
commit c3c88f5e27
59 changed files with 2153 additions and 921 deletions

View File

@@ -201,7 +201,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
commands := slicer.String([]string{"build"})
// Add better debugging flags
if options.Mode == Debug {
if options.Mode == Dev {
commands.Add("-gcflags")
commands.Add(`"all=-N -l"`)
}
@@ -222,9 +222,6 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
tags.Add(options.WebView2Strategy)
}
if options.Mode == Debug {
tags.Add("debug")
}
tags.Deduplicate()
// Add the output type build tag
@@ -517,7 +514,8 @@ func (b *BaseBuilder) BuildFrontend(outputLogger *clilogger.CLILogger) error {
func (b *BaseBuilder) ExtractAssets() (*html.AssetBundle, error) {
// Read in html
return html.NewAssetBundle(b.projectData.HTML)
//return html.NewAssetBundle(b.projectData.HTML)
return nil, nil
}
func upsertEnv(env []string, key string, update func(v string) string) []string {

View File

@@ -19,8 +19,8 @@ import (
type Mode int
const (
// Debug mode
Debug Mode = iota
// Dev mode
Dev Mode = iota
// Production mode
Production
)
@@ -31,7 +31,7 @@ type Options struct {
UserTags []string // Tags to pass to the Go compiler
Logger *clilogger.CLILogger // All output to the logger
OutputType string // EG: desktop, server....
Mode Mode // release or debug or dev
Mode Mode // release or dev
ProjectData *project.Project // The project data
Pack bool // Create a package for the app after building
Platform string // The platform to build for