mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 04:29:35 +08:00
Fix frameworkspinner
Fix BoxString for frameworks
This commit is contained in:
parent
a28315f38b
commit
7c15b780e2
@ -1,5 +1,11 @@
|
|||||||
package frameworks
|
package frameworks
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
|
||||||
|
"github.com/gobuffalo/packr"
|
||||||
|
)
|
||||||
|
|
||||||
// Framework has details about a specific framework
|
// Framework has details about a specific framework
|
||||||
type Framework struct {
|
type Framework struct {
|
||||||
Name string
|
Name string
|
||||||
@ -11,3 +17,12 @@ type Framework struct {
|
|||||||
// FrameworkToUse is the framework we will use when building
|
// FrameworkToUse is the framework we will use when building
|
||||||
// Set by `wails init`, used by `wails build`
|
// Set by `wails init`, used by `wails build`
|
||||||
var FrameworkToUse *Framework
|
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 := spinner.New()
|
||||||
frameworkSpinner.SetSpinSpeed(50)
|
frameworkSpinner.SetSpinSpeed(50)
|
||||||
if projectOptions.Framework != nil {
|
if projectOptions.Framework != nil {
|
||||||
|
frameworkSpinner.Start()
|
||||||
frameworkSpinner.Success("Compiling support for " + projectOptions.Framework.Name)
|
frameworkSpinner.Success("Compiling support for " + projectOptions.Framework.Name)
|
||||||
buildTags = append(buildTags, projectOptions.Framework.BuildTag)
|
buildTags = append(buildTags, projectOptions.Framework.BuildTag)
|
||||||
}
|
}
|
||||||
@ -219,7 +220,7 @@ func init() {
|
|||||||
|
|
||||||
// Release mode
|
// Release mode
|
||||||
if releaseMode {
|
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())
|
err = program.RunCommandArray(buildCommand.AsSlice())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user