mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-01 22:29:54 +08:00
Merge branch 'master' into fix-dev-skipmodtidy
This commit is contained in:
commit
00e2f16971
@ -85,6 +85,7 @@ func buildApplication(f *flags.Build) error {
|
|||||||
GarbleArgs: f.GarbleArgs,
|
GarbleArgs: f.GarbleArgs,
|
||||||
SkipBindings: f.SkipBindings,
|
SkipBindings: f.SkipBindings,
|
||||||
ProjectData: projectOptions,
|
ProjectData: projectOptions,
|
||||||
|
SkipEmbedCreate: f.SkipEmbedCreate,
|
||||||
}
|
}
|
||||||
|
|
||||||
tableData := pterm.TableData{
|
tableData := pterm.TableData{
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
package flags
|
package flags
|
||||||
|
|
||||||
type BuildCommon struct {
|
type BuildCommon struct {
|
||||||
LdFlags string `description:"Additional ldflags to pass to the compiler"`
|
LdFlags string `description:"Additional ldflags to pass to the compiler"`
|
||||||
Compiler string `description:"Use a different go compiler to build, eg go1.15beta1"`
|
Compiler string `description:"Use a different go compiler to build, eg go1.15beta1"`
|
||||||
SkipBindings bool `description:"Skips generation of bindings"`
|
SkipBindings bool `description:"Skips generation of bindings"`
|
||||||
RaceDetector bool `name:"race" description:"Build with Go's race detector"`
|
RaceDetector bool `name:"race" description:"Build with Go's race detector"`
|
||||||
SkipFrontend bool `name:"s" description:"Skips building the frontend"`
|
SkipFrontend bool `name:"s" description:"Skips building the frontend"`
|
||||||
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
|
Verbosity int `name:"v" description:"Verbosity level (0 = quiet, 1 = normal, 2 = verbose)"`
|
||||||
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
|
Tags string `description:"Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated"`
|
||||||
NoSyncGoMod bool `description:"Don't sync go.mod"`
|
NoSyncGoMod bool `description:"Don't sync go.mod"`
|
||||||
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
|
SkipModTidy bool `name:"m" description:"Skip mod tidy before compile"`
|
||||||
|
SkipEmbedCreate bool `description:"Skips creation of embed files"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c BuildCommon) Default() BuildCommon {
|
func (c BuildCommon) Default() BuildCommon {
|
||||||
|
@ -117,22 +117,23 @@ func (d *Dev) loadAndMergeProjectConfig() error {
|
|||||||
// GenerateBuildOptions creates a build.Options using the flags
|
// GenerateBuildOptions creates a build.Options using the flags
|
||||||
func (d *Dev) GenerateBuildOptions() *build.Options {
|
func (d *Dev) GenerateBuildOptions() *build.Options {
|
||||||
result := &build.Options{
|
result := &build.Options{
|
||||||
OutputType: "dev",
|
OutputType: "dev",
|
||||||
Mode: build.Dev,
|
Mode: build.Dev,
|
||||||
Devtools: true,
|
Devtools: true,
|
||||||
Arch: runtime.GOARCH,
|
Arch: runtime.GOARCH,
|
||||||
Pack: true,
|
Pack: true,
|
||||||
Platform: runtime.GOOS,
|
Platform: runtime.GOOS,
|
||||||
LDFlags: d.LdFlags,
|
LDFlags: d.LdFlags,
|
||||||
Compiler: d.Compiler,
|
Compiler: d.Compiler,
|
||||||
ForceBuild: d.ForceBuild,
|
ForceBuild: d.ForceBuild,
|
||||||
IgnoreFrontend: d.SkipFrontend,
|
IgnoreFrontend: d.SkipFrontend,
|
||||||
SkipBindings: d.SkipBindings,
|
SkipBindings: d.SkipBindings,
|
||||||
SkipModTidy: d.SkipModTidy,
|
SkipModTidy: d.SkipModTidy,
|
||||||
Verbosity: d.Verbosity,
|
Verbosity: d.Verbosity,
|
||||||
WailsJSDir: d.WailsJSDir,
|
WailsJSDir: d.WailsJSDir,
|
||||||
RaceDetector: d.RaceDetector,
|
RaceDetector: d.RaceDetector,
|
||||||
ProjectData: d.projectConfig,
|
ProjectData: d.projectConfig,
|
||||||
|
SkipEmbedCreate: d.SkipEmbedCreate,
|
||||||
}
|
}
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
@ -69,6 +69,7 @@ type Options struct {
|
|||||||
Obfuscated bool // Indicates that bound methods should be obfuscated
|
Obfuscated bool // Indicates that bound methods should be obfuscated
|
||||||
GarbleArgs string // The arguments for Garble
|
GarbleArgs string // The arguments for Garble
|
||||||
SkipBindings bool // Skip binding generation
|
SkipBindings bool // Skip binding generation
|
||||||
|
SkipEmbedCreate bool // Skip creation of embed files
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the project!
|
// Build the project!
|
||||||
@ -120,8 +121,10 @@ func Build(options *Options) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create embed directories if they don't exist
|
// Create embed directories if they don't exist
|
||||||
if err := CreateEmbedDirectories(cwd, options); err != nil {
|
if !options.SkipEmbedCreate {
|
||||||
return "", err
|
if err := CreateEmbedDirectories(cwd, options); err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate bindings
|
// Generate bindings
|
||||||
|
@ -73,6 +73,7 @@ If you are unsure about a template, inspect `package.json` and `wails.json` for
|
|||||||
| -race | Build with Go's race detector | |
|
| -race | Build with Go's race detector | |
|
||||||
| -s | Skip building the frontend | |
|
| -s | Skip building the frontend | |
|
||||||
| -skipbindings | Skip bindings generation | |
|
| -skipbindings | Skip bindings generation | |
|
||||||
|
| -skipembedcreate | Skip automatic creation of non-existent embed directories and gitkeep files | |
|
||||||
| -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | |
|
| -tags "extra tags" | Build tags to pass to Go compiler. Must be quoted. Space or comma (but not both) separated | |
|
||||||
| -trimpath | Remove all file system paths from the resulting executable. | |
|
| -trimpath | Remove all file system paths from the resulting executable. | |
|
||||||
| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | |
|
| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | |
|
||||||
@ -203,6 +204,7 @@ Your system is ready for Wails development!
|
|||||||
| -s | Skip building the frontend | false |
|
| -s | Skip building the frontend | false |
|
||||||
| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | |
|
| -save | Saves the given `assetdir`, `reloaddirs`, `wailsjsdir`, `debounce`, `devserver` and `frontenddevserverurl` flags in `wails.json` to become the defaults for subsequent invocations. | |
|
||||||
| -skipbindings | Skip bindings generation | |
|
| -skipbindings | Skip bindings generation | |
|
||||||
|
| -skipembedcreate | Skip automatic creation of non-existent embed directories and gitkeep files | |
|
||||||
| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | |
|
| -tags "extra tags" | Build tags to pass to compiler (quoted and space separated) | |
|
||||||
| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 |
|
| -v | Verbosity level (0 - silent, 1 - standard, 2 - verbose) | 1 |
|
||||||
| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` |
|
| -wailsjsdir | The directory to generate the generated Wails JS modules | Value in `wails.json` |
|
||||||
|
@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Added "Branding" section to `wails doctor` to correctly identify Windows 11 [#3891](https://github.com/wailsapp/wails/pull/3891) by [@ronen25](https://github.com/ronen25)
|
- Added "Branding" section to `wails doctor` to correctly identify Windows 11 [#3891](https://github.com/wailsapp/wails/pull/3891) by [@ronen25](https://github.com/ronen25)
|
||||||
|
- Added `-skipembedcreate` flag to build and dev command to improve compile and recompile speed [#4143](https://github.com/wailsapp/wails/pull/4143) by @josStorer
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed -m build flag for dev command not working when recompiling in [#4141](https://github.com/wailsapp/wails/pull/4141) by @josStorer
|
- Fixed -m build flag for dev command not working when recompiling in [#4141](https://github.com/wailsapp/wails/pull/4141) by @josStorer
|
||||||
|
Loading…
Reference in New Issue
Block a user