mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 00:09:56 +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
|
nsis := false
|
||||||
command.BoolFlag("nsis", "Generate NSIS installer for Windows", &nsis)
|
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 {
|
command.Action(func() error {
|
||||||
|
|
||||||
quiet := verbosity == 0
|
quiet := verbosity == 0
|
||||||
@ -176,6 +179,7 @@ func AddBuildSubcommand(app *clir.Cli, w io.Writer) {
|
|||||||
CompressFlags: compressFlags,
|
CompressFlags: compressFlags,
|
||||||
UserTags: userTags,
|
UserTags: userTags,
|
||||||
WebView2Strategy: wv2rtstrategy,
|
WebView2Strategy: wv2rtstrategy,
|
||||||
|
TrimPath: trimpath,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start a new tabwriter
|
// Start a new tabwriter
|
||||||
|
@ -178,6 +178,10 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
|
|||||||
commands.Add("-a")
|
commands.Add("-a")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if options.TrimPath {
|
||||||
|
commands.Add("-trimpath")
|
||||||
|
}
|
||||||
|
|
||||||
var tags slicer.StringSlicer
|
var tags slicer.StringSlicer
|
||||||
tags.Add(options.OutputType)
|
tags.Add(options.OutputType)
|
||||||
tags.AddSlice(options.UserTags)
|
tags.AddSlice(options.UserTags)
|
||||||
|
@ -55,6 +55,7 @@ type Options struct {
|
|||||||
WailsJSDir string // Directory to generate the wailsjs module
|
WailsJSDir string // Directory to generate the wailsjs module
|
||||||
ForceBuild bool // Force
|
ForceBuild bool // Force
|
||||||
BundleName string // Bundlename for Mac
|
BundleName string // Bundlename for Mac
|
||||||
|
TrimPath bool // Use Go's trimpath compiler flag
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the project!
|
// 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 |
|
| -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 | |
|
| -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 |
|
| -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.
|
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