mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[windows] Better wails doctor installation details
This commit is contained in:
@@ -36,7 +36,6 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
w.Init(os.Stdout, 8, 8, 0, '\t', 0)
|
||||
|
||||
// Write out the system information
|
||||
fmt.Fprintf(w, "\n")
|
||||
fmt.Fprintf(w, "System\n")
|
||||
fmt.Fprintf(w, "------\n")
|
||||
fmt.Fprintf(w, "%s\t%s\n", "OS:", info.OS.Name)
|
||||
@@ -117,14 +116,15 @@ func AddSubcommand(app *clir.Cli, w io.Writer) error {
|
||||
|
||||
if len(dependenciesMissing) == 0 && dependenciesAvailableRequired == 0 {
|
||||
logger.Println("Your system is ready for Wails development!")
|
||||
logger.Println("")
|
||||
}
|
||||
|
||||
if dependenciesAvailableRequired != 0 {
|
||||
logger.Println("Install required packages using: " + info.Dependencies.InstallAllRequiredCommand())
|
||||
logger.Println("Required package(s) installation details: \n" + info.Dependencies.InstallAllRequiredCommand())
|
||||
}
|
||||
|
||||
if dependenciesAvailableOptional != 0 {
|
||||
logger.Println("Install optional packages using: " + info.Dependencies.InstallAllOptionalCommand())
|
||||
logger.Println("Optional package(s) installation details: \n" + info.Dependencies.InstallAllOptionalCommand())
|
||||
}
|
||||
|
||||
if len(externalPackages) > 0 {
|
||||
|
||||
@@ -21,7 +21,6 @@ type PackageManager interface {
|
||||
InstallCommand(*Package) string
|
||||
}
|
||||
|
||||
|
||||
// Dependancy represents a system package that we require
|
||||
type Dependancy struct {
|
||||
Name string
|
||||
@@ -36,7 +35,6 @@ type Dependancy struct {
|
||||
// DependencyList is a list of Dependency instances
|
||||
type DependencyList []*Dependancy
|
||||
|
||||
|
||||
// InstallAllRequiredCommand returns the command you need to use to install all required dependencies
|
||||
func (d DependencyList) InstallAllRequiredCommand() string {
|
||||
|
||||
@@ -64,7 +62,7 @@ func (d DependencyList) InstallAllOptionalCommand() string {
|
||||
if dependency.PackageName != "" {
|
||||
if !dependency.Installed && dependency.Optional {
|
||||
if result == "" {
|
||||
result = dependency.InstallCommand
|
||||
result = " - " + dependency.Name + ": " + dependency.InstallCommand + "\n"
|
||||
} else {
|
||||
result += " " + dependency.PackageName
|
||||
}
|
||||
@@ -74,4 +72,3 @@ func (d DependencyList) InstallAllOptionalCommand() string {
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user