windows build compatability
This commit is contained in:
parent
048bbc1e3e
commit
358cd7147b
3 changed files with 137 additions and 29 deletions
35
main.go
35
main.go
|
@ -67,16 +67,11 @@ func printHelp() {
|
|||
}
|
||||
|
||||
func main() {
|
||||
|
||||
path, err3 := spitfire.ResolvePath("/mozilla-central")
|
||||
// Check and set the MOZILLABUILD environment variable globally
|
||||
err2 := spitfire.SetGlobalEnv("MOZILLABUILD", path, "user") // For user
|
||||
if err2 != nil {
|
||||
log.Fatalf("Error setting global environment variable: %v", err2)
|
||||
}
|
||||
if err3 != nil {
|
||||
log.Fatalf("Error setting global environment variable: %v", err3)
|
||||
}
|
||||
// // Check system dependencies
|
||||
// err := spitfire.CheckSystemDependencies()
|
||||
// if err != nil {
|
||||
// log.Fatalf("System check failed: %v", err)
|
||||
// }
|
||||
|
||||
flag.Parse()
|
||||
|
||||
|
@ -90,26 +85,26 @@ func main() {
|
|||
}
|
||||
|
||||
// Save the initial directory
|
||||
var err error
|
||||
initialDir, err = os.Getwd()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to get current working directory: %v", err)
|
||||
var err2 error
|
||||
initialDir, err2 = os.Getwd()
|
||||
if err2 != nil {
|
||||
log.Fatalf("Failed to get current working directory: %v", err2)
|
||||
}
|
||||
fmt.Printf("Initial working directory: %s\n", initialDir)
|
||||
|
||||
// Convert buildPath and uploadPath to absolute paths
|
||||
if buildPath != "" {
|
||||
buildPath, err = spitfire.ResolvePath(buildPath)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to convert buildPath to absolute path: %v", err)
|
||||
buildPath, err2 = spitfire.ResolvePath(buildPath)
|
||||
if err2 != nil {
|
||||
log.Fatalf("Failed to convert buildPath to absolute path: %v", err2)
|
||||
}
|
||||
fmt.Printf("Resolved buildPath: %s\n", buildPath)
|
||||
}
|
||||
|
||||
if uploadPath != "" {
|
||||
uploadPath, err = spitfire.ResolvePath(uploadPath)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to convert uploadPath to absolute path: %v", err)
|
||||
uploadPath, err2 = spitfire.ResolvePath(uploadPath)
|
||||
if err2 != nil {
|
||||
log.Fatalf("Failed to convert uploadPath to absolute path: %v", err2)
|
||||
}
|
||||
fmt.Printf("Resolved uploadPath: %s\n", uploadPath)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue