mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 03:29:03 +08:00
feature: show detected os
This commit is contained in:
parent
ea5e06aabd
commit
6ecdb43148
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
|
||||||
"github.com/wailsapp/wails/cmd"
|
"github.com/wailsapp/wails/cmd"
|
||||||
@ -26,6 +27,17 @@ Create your first project by running 'wails init'.`
|
|||||||
if runtime.GOOS != "windows" {
|
if runtime.GOOS != "windows" {
|
||||||
successMessage = "🚀 " + successMessage
|
successMessage = "🚀 " + successMessage
|
||||||
}
|
}
|
||||||
|
switch runtime.GOOS {
|
||||||
|
case "darwin":
|
||||||
|
logger.Yellow("Detected Platform: OSX")
|
||||||
|
case "windows":
|
||||||
|
logger.Yellow("Detected Platform: Windows")
|
||||||
|
case "linux":
|
||||||
|
logger.Yellow("Detected Platform: Linux")
|
||||||
|
default:
|
||||||
|
return fmt.Errorf("Platform %s is currently not supported", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
logger.Yellow("Checking for prerequisites...")
|
logger.Yellow("Checking for prerequisites...")
|
||||||
// Check we have a cgo capable environment
|
// Check we have a cgo capable environment
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user