mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 12:30:48 +08:00
Initial commit (#1352)
This commit is contained in:
parent
781a0df72e
commit
e7aa74905a
@ -96,6 +96,9 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
||||
nsis := false
|
||||
command.BoolFlag("nsis", "Generate NSIS installer for Windows", &nsis)
|
||||
|
||||
trimpath := false
|
||||
command.BoolFlag("trimpath", "Remove all file system paths from the resulting executable", &trimpath)
|
||||
|
||||
command.Action(func() error {
|
||||
|
||||
quiet := verbosity == 0
|
||||
@ -176,6 +179,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
||||
CompressFlags: compressFlags,
|
||||
UserTags: userTags,
|
||||
WebView2Strategy: wv2rtstrategy,
|
||||
TrimPath: trimpath,
|
||||
}
|
||||
|
||||
// Start a new tabwriter
|
||||
|
@ -178,6 +178,10 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
||||
commands.Add("-a")
|
||||
}
|
||||
|
||||
if options.TrimPath {
|
||||
commands.Add("-trimpath")
|
||||
}
|
||||
|
||||
var tags slicer.StringSlicer
|
||||
tags.Add(options.OutputType)
|
||||
tags.AddSlice(options.UserTags)
|
||||
|
@ -55,6 +55,7 @@ type Options struct {
|
||||
WailsJSDir string // Directory to generate the wailsjs module
|
||||
ForceBuild bool // Force
|
||||
BundleName string // Bundlename for Mac
|
||||
TrimPath bool // Use Go's trimpath compiler flag
|
||||
}
|
||||
|
||||
// Build the project!
|
||||
|
@ -69,6 +69,7 @@ A list of community maintained templates can be found [here](../community/templa
|
||||
| -webview2 | WebView2 installer strategy: download,embed,browser,error | download |
|
||||
| -u | Updates your project's `go.mod` to use the same version of Wails as the CLI | |
|
||||
| -debug | Retains debug information in the application | false |
|
||||
| -trimpath | Remove all file system paths from the resulting executable. | false |
|
||||
|
||||
For a detailed description of the `webview2` flag, please refer to the [Windows](../guides/windows.mdx) Guide.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user