rip out turtle specific options
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (push) Has been cancelled

This commit is contained in:
2025-07-20 14:54:38 -07:00
parent 488d10cb8b
commit 9b04ad7fd0
18 changed files with 164 additions and 954 deletions

View File

@@ -6,7 +6,6 @@ import (
"strings"
"time"
"turtlesilicon/pkg/patching"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/service"
"turtlesilicon/pkg/utils"
@@ -23,7 +22,7 @@ var (
// UpdateAllStatuses updates all UI components based on current application state
func UpdateAllStatuses() {
updateCrossoverStatus()
updateTurtleWoWStatus()
updateEpochStatus()
updatePlayButtonState()
updateServiceStatus()
@@ -76,20 +75,20 @@ func updateCrossoverStatus() {
crossoverStatusLabel.Refresh()
}
// updateTurtleWoWStatus updates TurtleWoW path and patch status
func updateTurtleWoWStatus() {
if paths.TurtlewowPath == "" {
turtlewowPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
paths.PatchesAppliedTurtleWoW = false // Reset if path is cleared
// updateEpochStatus updates TurtleWoW path and patch status
func updateEpochStatus() {
if paths.EpochPath == "" {
epochPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
paths.PatchesAppliedEpoch = false // Reset if path is cleared
} else {
turtlewowPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: paths.TurtlewowPath, Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
epochPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: paths.EpochPath, Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
// Check if all required files exist
winerosettaDllPath := filepath.Join(paths.TurtlewowPath, "winerosetta.dll")
d3d9DllPath := filepath.Join(paths.TurtlewowPath, "d3d9.dll")
libSiliconPatchDllPath := filepath.Join(paths.TurtlewowPath, "libSiliconPatch.dll")
rosettaX87DirPath := filepath.Join(paths.TurtlewowPath, "rosettax87")
dllsTextFile := filepath.Join(paths.TurtlewowPath, "dlls.txt")
winerosettaDllPath := filepath.Join(paths.EpochPath, "winerosetta.dll")
d3d9DllPath := filepath.Join(paths.EpochPath, "d3d9.dll")
libSiliconPatchDllPath := filepath.Join(paths.EpochPath, "libSiliconPatch.dll")
rosettaX87DirPath := filepath.Join(paths.EpochPath, "rosettax87")
dllsTextFile := filepath.Join(paths.EpochPath, "dlls.txt")
rosettaX87ExePath := filepath.Join(rosettaX87DirPath, "rosettax87")
libRuntimeRosettaX87Path := filepath.Join(rosettaX87DirPath, "libRuntimeRosettax87")
@@ -99,13 +98,8 @@ func updateTurtleWoWStatus() {
contentStr := string(fileContent)
winerosettaPresent := strings.Contains(contentStr, "winerosetta.dll")
// Check if libSiliconPatch should be present based on user preference
prefs, _ := utils.LoadPrefs()
libSiliconPatchRequired := prefs.EnableLibSiliconPatch
libSiliconPatchPresent := strings.Contains(contentStr, "libSiliconPatch.dll")
// Validate dlls.txt: winerosetta must be present, libSiliconPatch based on setting
if winerosettaPresent && (!libSiliconPatchRequired || libSiliconPatchPresent) {
if winerosettaPresent {
dllsFileValid = true
}
}
@@ -114,29 +108,21 @@ func updateTurtleWoWStatus() {
// Check if patched files have the correct size (matches bundled versions)
winerosettaDllCorrectSize := utils.CompareFileWithBundledResource(winerosettaDllPath, "winerosetta/winerosetta.dll")
d3d9DllCorrectSize := utils.CompareFileWithBundledResource(d3d9DllPath, "winerosetta/d3d9.dll")
libSiliconPatchCorrectSize := utils.CompareFileWithBundledResource(libSiliconPatchDllPath, "winerosetta/libSiliconPatch.dll")
rosettaX87CorrectSize := utils.CompareFileWithBundledResource(rosettaX87ExePath, "rosettax87/rosettax87")
libRuntimeRosettaX87CorrectSize := utils.CompareFileWithBundledResource(libRuntimeRosettaX87Path, "rosettax87/libRuntimeRosettax87")
// Check if shadowLOD setting is applied (only if user has enabled it in graphics settings)
prefs, _ := utils.LoadPrefs()
shadowLODRequiredAndApplied := true // Default to true if not required
if prefs.SetShadowLOD0 {
shadowLODRequiredAndApplied = patching.CheckShadowLODSetting()
}
if utils.PathExists(winerosettaDllPath) && utils.PathExists(d3d9DllPath) && utils.PathExists(libSiliconPatchDllPath) &&
utils.DirExists(rosettaX87DirPath) && utils.PathExists(rosettaX87ExePath) &&
utils.PathExists(libRuntimeRosettaX87Path) && dllsFileValid &&
winerosettaDllCorrectSize && d3d9DllCorrectSize && libSiliconPatchCorrectSize &&
rosettaX87CorrectSize && libRuntimeRosettaX87CorrectSize && shadowLODRequiredAndApplied {
paths.PatchesAppliedTurtleWoW = true
winerosettaDllCorrectSize && d3d9DllCorrectSize &&
rosettaX87CorrectSize && libRuntimeRosettaX87CorrectSize {
paths.PatchesAppliedEpoch = true
}
}
turtlewowPathLabel.Refresh()
epochPathLabel.Refresh()
if paths.PatchesAppliedTurtleWoW {
turtlewowStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
if paths.PatchesAppliedEpoch {
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
if patchTurtleWoWButton != nil {
patchTurtleWoWButton.Disable()
}
@@ -144,9 +130,9 @@ func updateTurtleWoWStatus() {
unpatchTurtleWoWButton.Enable()
}
} else {
turtlewowStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
if patchTurtleWoWButton != nil {
if paths.TurtlewowPath != "" {
if paths.EpochPath != "" {
patchTurtleWoWButton.Enable()
} else {
patchTurtleWoWButton.Disable()
@@ -156,13 +142,13 @@ func updateTurtleWoWStatus() {
unpatchTurtleWoWButton.Disable()
}
}
turtlewowStatusLabel.Refresh()
epochStatusLabel.Refresh()
}
// updatePlayButtonState enables/disables play and launch buttons based on current state
func updatePlayButtonState() {
launchEnabled := paths.PatchesAppliedTurtleWoW && paths.PatchesAppliedCrossOver &&
paths.TurtlewowPath != "" && paths.CrossoverPath != "" && service.IsServiceRunning()
launchEnabled := paths.PatchesAppliedEpoch && paths.PatchesAppliedCrossOver &&
paths.EpochPath != "" && paths.CrossoverPath != "" && service.IsServiceRunning()
if launchButton != nil {
if launchEnabled {
@@ -239,7 +225,7 @@ func updateServiceStatus() {
serviceStatusLabel.Refresh()
}
if startServiceButton != nil {
if paths.TurtlewowPath != "" && paths.PatchesAppliedTurtleWoW {
if paths.EpochPath != "" && paths.PatchesAppliedEpoch {
startServiceButton.Enable()
} else {
startServiceButton.Disable()