Files
wails/cmd/wails/0_setup.go
Byron 08fe7b64d6 Yaml bug (#207)
* test: azure pipeline

* fix: azure pipeline yaml

* feat: elementary support

* feat: opensuse support

* fix: 0_setup.go line 27

* fix: 0_setup.go line 27

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: opensuse yaml

* fix: yaml

* fix: yaml

* fix: yaml

* fix: opensuse yaml

* fix: opensuse

* fix: opensuse

* fix: opensuse

* fix: opensuse

* fix: string trim os osRelease field NAME

* fix: 0_setup.go if err typo

* test

* test

* fix: typo in linux.go

* test: remove quotes from opensuse case

* test: revert

* test: ""

* test: ""

* test: ""

* test: ""

* fix: replace trim with replace

* fix: drop 0_setup.go and run checks by system.go

* fix: elementary os yaml name

* fix: open suse yaml entry

* fix: commented out result.Release = version

* fix: commented out result.Release = version

* fix: revert Replace to Trim

* fix: Linux Mint yaml entry

* fix: capitalize distros entries

* fix: capitalize distros entries

* fix: capitalize distros entries

* test

* test

* fix: open suse yaml entry

* fix: yaml entris

* test

* test

* test

* test

* test

* test

* branch changing

* fix: bug in setup process

* debugging

* debugging

* debugging

* debugging

* fix: yaml entries & err == nil bug

* Update prerequisites.go

* fix: bug

* fix: 0_setup.go

* fix: yaml bug

* fix: yaml bug
2019-08-26 05:02:49 +10:00

59 lines
1.1 KiB
Go

package main
import (
"runtime"
"github.com/wailsapp/wails/cmd"
)
func init() {
commandDescription := `Sets up your local environment to develop Wails apps.`
setupCommand := app.Command("setup", "Setup the Wails environment").
LongDescription(commandDescription)
app.DefaultCommand(setupCommand)
setupCommand.Action(func() error {
logger.PrintBanner()
var err error
system := cmd.NewSystemHelper()
err = system.Initialise()
if err != nil {
return err
}
var successMessage = `Ready for take off!
Create your first project by running 'wails init'.`
if runtime.GOOS != "windows" {
successMessage = "🚀 " + successMessage
}
// Chrck for programs and libraries dependencies
errors, err := cmd.CheckDependencies(logger)
if err != nil {
return err
}
// Check Mewn
err = cmd.CheckMewn()
if err != nil {
return err
}
// Check for errors
// CheckDependencies() returns !errors
// so to get the right message in this
// check we have to do it in reversed
if errors {
logger.Yellow(successMessage)
}
return err
})
}