create build directory if not exists

This commit is contained in:
konez2k
2020-02-20 16:46:18 +01:00
parent 3679114445
commit 89579db7fa

View File

@@ -90,10 +90,18 @@ func BuildApplication(binaryName string, forceRebuild bool, buildMode string, pa
}
}
// Check Mewn is installed
err := CheckMewn()
if err != nil {
return err
if projectOptions.CrossCompile {
// Check build directory
buildDirectory := filepath.Join(fs.Cwd(), "build")
if !fs.DirExists(buildDirectory) {
fs.MkDir(buildDirectory)
}
} else {
// Check Mewn is installed
err := CheckMewn()
if err != nil {
return err
}
}
compileMessage := "Packing + Compiling project"