mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 06:32:10 +08:00
Fix frameworkspinner
Fix BoxString for frameworks
This commit is contained in:
parent
a28315f38b
commit
7c15b780e2
@ -1,5 +1,11 @@
|
||||
package frameworks
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/gobuffalo/packr"
|
||||
)
|
||||
|
||||
// Framework has details about a specific framework
|
||||
type Framework struct {
|
||||
Name string
|
||||
@ -11,3 +17,12 @@ type Framework struct {
|
||||
// FrameworkToUse is the framework we will use when building
|
||||
// Set by `wails init`, used by `wails build`
|
||||
var FrameworkToUse *Framework
|
||||
|
||||
// BoxString extracts a string from a packr box
|
||||
func BoxString(box *packr.Box, filename string) string {
|
||||
result, err := box.FindString(filename)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ func init() {
|
||||
frameworkSpinner := spinner.New()
|
||||
frameworkSpinner.SetSpinSpeed(50)
|
||||
if projectOptions.Framework != nil {
|
||||
frameworkSpinner.Start()
|
||||
frameworkSpinner.Success("Compiling support for " + projectOptions.Framework.Name)
|
||||
buildTags = append(buildTags, projectOptions.Framework.BuildTag)
|
||||
}
|
||||
@ -219,7 +220,7 @@ func init() {
|
||||
|
||||
// Release mode
|
||||
if releaseMode {
|
||||
buildCommand.AddSlice([]string{"-ldflags","-X github.com/wailsapp/wails.DebugMode=false"})
|
||||
buildCommand.AddSlice([]string{"-ldflags", "-X github.com/wailsapp/wails.DebugMode=false"})
|
||||
}
|
||||
err = program.RunCommandArray(buildCommand.AsSlice())
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user