mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
check if xgo and docker are installed
This commit is contained in:
@@ -103,6 +103,16 @@ func BuildApplication(binaryName string, forceRebuild bool, buildMode string, pa
|
||||
if !fs.DirExists(buildDirectory) {
|
||||
fs.MkDir(buildDirectory)
|
||||
}
|
||||
|
||||
// Check Docker
|
||||
if err := CheckIfInstalled("docker"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Check xgo
|
||||
if err := CheckIfInstalled("xgo"); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
// Check Mewn is installed
|
||||
err := CheckMewn(projectOptions.Verbose)
|
||||
@@ -320,6 +330,15 @@ func CheckWindres() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// CheckIfInstalled returns if application is installed
|
||||
func CheckIfInstalled(application string) (err error) {
|
||||
programHelper := NewProgramHelper()
|
||||
if !programHelper.IsInstalled(application) {
|
||||
return fmt.Errorf("%s not installed. Ensure you have installed %s correctly", application, application)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// InstallFrontendDeps attempts to install the frontend dependencies based on the given options
|
||||
func InstallFrontendDeps(projectDir string, projectOptions *ProjectOptions, forceRebuild bool, caller string) error {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user