added autodelete WDB option
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
var EnableMetalHud = true // Default to enabled
|
||||
var CustomEnvVars = "" // Custom environment variables
|
||||
var EnableVanillaTweaks = false // Default to disabled
|
||||
var AutoDeleteWdb = false // Default to disabled
|
||||
|
||||
// Terminal state management
|
||||
var (
|
||||
@@ -177,6 +178,22 @@ func continueLaunch(myWindow fyne.Window, wowExePath string) {
|
||||
return
|
||||
}
|
||||
|
||||
// Auto-delete WDB directory if enabled
|
||||
if AutoDeleteWdb {
|
||||
wdbPath := filepath.Join(paths.TurtlewowPath, "WDB")
|
||||
if utils.DirExists(wdbPath) {
|
||||
debug.Printf("Auto-deleting WDB directory: %s", wdbPath)
|
||||
if err := os.RemoveAll(wdbPath); err != nil {
|
||||
debug.Printf("Warning: failed to auto-delete WDB directory: %v", err)
|
||||
// Don't block the launch, just log the error
|
||||
} else {
|
||||
debug.Printf("Successfully auto-deleted WDB directory")
|
||||
}
|
||||
} else {
|
||||
debug.Printf("WDB directory not found, nothing to delete")
|
||||
}
|
||||
}
|
||||
|
||||
// Since RosettaX87 service is already running, we can directly launch WoW
|
||||
debug.Println("RosettaX87 service is running. Proceeding to launch WoW.")
|
||||
|
||||
|
Reference in New Issue
Block a user