first epoch pass
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (pull_request) Has been cancelled

This commit is contained in:
2025-07-20 21:45:38 -07:00
parent 9b04ad7fd0
commit c735a3f90e
27 changed files with 216 additions and 402 deletions

View File

@@ -5,11 +5,11 @@ import (
"strings"
"time"
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/launcher"
"turtlesilicon/pkg/patching"
"turtlesilicon/pkg/service"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/debug"
"epochsilicon/pkg/launcher"
"epochsilicon/pkg/patching"
"epochsilicon/pkg/service"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
@@ -75,10 +75,10 @@ func createOptionsComponents() {
// createPatchingButtons creates all patching-related buttons
func createPatchingButtons(myWindow fyne.Window) {
patchTurtleWoWButton = widget.NewButton("Patch Epoch", func() {
patchEpochButton = widget.NewButton("Patch Epoch", func() {
patching.PatchEpoch(myWindow, UpdateAllStatuses)
})
unpatchTurtleWoWButton = widget.NewButton("Unpatch Epoch", func() {
unpatchEpochButton = widget.NewButton("Unpatch Epoch", func() {
patching.UnpatchEpoch(myWindow, UpdateAllStatuses)
})
patchCrossOverButton = widget.NewButton("Patch CrossOver", func() {
@@ -123,7 +123,7 @@ func createBottomBar(myWindow fyne.Window) fyne.CanvasObject {
// GitHub button
githubButton := widget.NewButton("GitHub", func() {
githubURL := "https://github.com/tairasu/TurtleSilicon"
githubURL := "https://github.com/tairasu/EpochSilicon"
parsedURL, err := url.Parse(githubURL)
if err != nil {
debug.Printf("Error parsing GitHub URL: %v", err)

View File

@@ -1,8 +1,8 @@
package ui
import (
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/paths"
"epochsilicon/pkg/debug"
"epochsilicon/pkg/paths"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/canvas"
@@ -13,11 +13,11 @@ import (
// createHeaderContainer creates the header with title and subtitle
func createHeaderContainer() fyne.CanvasObject {
// Main title
titleText := widget.NewRichTextFromMarkdown("# TurtleSilicon")
titleText := widget.NewRichTextFromMarkdown("# EpochSilicon")
titleText.Wrapping = fyne.TextWrapOff
// Subtitle
subtitleText := widget.NewLabel("A TurtleWoW launcher for Apple Silicon Macs")
subtitleText := widget.NewLabel("An Epoch launcher for Apple Silicon Macs")
subtitleText.Alignment = fyne.TextAlignCenter
// Create header container
@@ -57,14 +57,14 @@ func createLogoContainer() fyne.CanvasObject {
return logoContainer
}
// createPathSelectionForm creates the form for selecting CrossOver and TurtleWoW paths
// createPathSelectionForm creates the form for selecting CrossOver and Epoch paths
func createPathSelectionForm(myWindow fyne.Window) *widget.Form {
pathSelectionForm := widget.NewForm(
widget.NewFormItem("CrossOver Path:", container.NewBorder(nil, nil, nil, widget.NewButton("Set/Change", func() {
paths.SelectCrossOverPath(myWindow, crossoverPathLabel, UpdateAllStatuses)
}), crossoverPathLabel)),
widget.NewFormItem("TurtleWoW Path:", container.NewBorder(nil, nil, nil, widget.NewButton("Set/Change", func() {
paths.SelectTurtleWoWPath(myWindow, epochPathLabel, UpdateAllStatuses)
widget.NewFormItem("Epoch Path:", container.NewBorder(nil, nil, nil, widget.NewButton("Set/Change", func() {
paths.SelectEpochPath(myWindow, epochPathLabel, UpdateAllStatuses)
}), epochPathLabel)),
)
@@ -76,7 +76,7 @@ func createPatchOperationsLayout() fyne.CanvasObject {
patchOperationsLayout := container.NewVBox(
widget.NewSeparator(),
container.NewGridWithColumns(4,
widget.NewLabel("TurtleWoW Patch:"), epochStatusLabel, patchTurtleWoWButton, unpatchTurtleWoWButton,
widget.NewLabel("Epoch Patch:"), epochStatusLabel, patchEpochButton, unpatchEpochButton,
),
container.NewGridWithColumns(4,
widget.NewLabel("CrossOver Patch:"), crossoverStatusLabel, patchCrossOverButton, unpatchCrossOverButton,

View File

@@ -13,8 +13,8 @@ import (
"howett.net/plist"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/paths"
"epochsilicon/pkg/utils"
)
// showOptionsPopup creates and shows an integrated popup window for options
@@ -32,7 +32,6 @@ func showOptionsPopup() {
widget.NewSeparator(),
metalHudCheckbox,
showTerminalCheckbox,
vanillaTweaksCheckbox,
autoDeleteWdbCheckbox,
widget.NewSeparator(),
container.NewBorder(nil, nil, nil, container.NewHBox(enableOptionAsAltButton, disableOptionAsAltButton), optionAsAltStatusLabel),
@@ -203,8 +202,8 @@ func showTroubleshootingPopup() {
rowCrossover := container.NewBorder(nil, nil, widget.NewLabel("CrossOver version:"), crossoverStatusShort, nil)
rowWDB := container.NewBorder(nil, nil, widget.NewLabel("Delete WDB directory (cache):"), wdbDeleteButton, nil)
rowWine := container.NewBorder(nil, nil, widget.NewLabel("Delete Wine prefixes (~/.wine & TurtleWoW/.wine):"), wineDeleteButton, nil)
appMgmtNote := widget.NewLabel("Please ensure TurtleSilicon is enabled in System Settings > Privacy & Security > App Management.")
rowWine := container.NewBorder(nil, nil, widget.NewLabel("Delete Wine prefixes (~/.wine & Epoch/.wine):"), wineDeleteButton, nil)
appMgmtNote := widget.NewLabel("Please ensure EpochSilicon is enabled in System Settings > Privacy & Security > App Management.")
appMgmtNote.Wrapping = fyne.TextWrapWord
appMgmtNote.TextStyle = fyne.TextStyle{Italic: true}

View File

@@ -1,14 +1,16 @@
package ui
import (
"epochsilicon/pkg/debug"
"git.burkey.co/eburk/epochcli/pkg/epoch"
"os"
"path/filepath"
"strings"
"time"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/service"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/paths"
"epochsilicon/pkg/service"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
@@ -75,7 +77,7 @@ func updateCrossoverStatus() {
crossoverStatusLabel.Refresh()
}
// updateEpochStatus updates TurtleWoW path and patch status
// updateEpochStatus updates Epoch path and patch status
func updateEpochStatus() {
if paths.EpochPath == "" {
epochPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
@@ -86,7 +88,6 @@ func updateEpochStatus() {
// Check if all required files exist
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")
@@ -98,7 +99,7 @@ func updateEpochStatus() {
contentStr := string(fileContent)
winerosettaPresent := strings.Contains(contentStr, "winerosetta.dll")
// Validate dlls.txt: winerosetta must be present, libSiliconPatch based on setting
// Validate dlls.txt: winerosetta must be present
if winerosettaPresent {
dllsFileValid = true
}
@@ -111,35 +112,46 @@ func updateEpochStatus() {
rosettaX87CorrectSize := utils.CompareFileWithBundledResource(rosettaX87ExePath, "rosettax87/rosettax87")
libRuntimeRosettaX87CorrectSize := utils.CompareFileWithBundledResource(libRuntimeRosettaX87Path, "rosettax87/libRuntimeRosettax87")
if utils.PathExists(winerosettaDllPath) && utils.PathExists(d3d9DllPath) && utils.PathExists(libSiliconPatchDllPath) &&
if utils.PathExists(winerosettaDllPath) && utils.PathExists(d3d9DllPath) &&
utils.DirExists(rosettaX87DirPath) && utils.PathExists(rosettaX87ExePath) &&
utils.PathExists(libRuntimeRosettaX87Path) && dllsFileValid &&
winerosettaDllCorrectSize && d3d9DllCorrectSize &&
rosettaX87CorrectSize && libRuntimeRosettaX87CorrectSize {
paths.PatchesAppliedEpoch = true
}
// Check for Epoch-specific files, set PatchesAppliedEpoch to false if not updated
stats, err := epoch.Update(paths.EpochPath, false, true, true)
if err != nil {
paths.PatchesAppliedEpoch = false
debug.Printf("Failed to get download Epoch patches: %v", err)
}
if stats.Outdated > 0 {
paths.PatchesAppliedEpoch = false
}
}
epochPathLabel.Refresh()
if paths.PatchesAppliedEpoch {
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
if patchTurtleWoWButton != nil {
patchTurtleWoWButton.Disable()
if patchEpochButton != nil {
patchEpochButton.Disable()
}
if unpatchTurtleWoWButton != nil {
unpatchTurtleWoWButton.Enable()
if unpatchEpochButton != nil {
unpatchEpochButton.Enable()
}
} else {
epochStatusLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not patched", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
if patchTurtleWoWButton != nil {
if patchEpochButton != nil {
if paths.EpochPath != "" {
patchTurtleWoWButton.Enable()
patchEpochButton.Enable()
} else {
patchTurtleWoWButton.Disable()
patchEpochButton.Disable()
}
}
if unpatchTurtleWoWButton != nil {
unpatchTurtleWoWButton.Disable()
if unpatchEpochButton != nil {
unpatchEpochButton.Disable()
}
}
epochStatusLabel.Refresh()

View File

@@ -1,8 +1,8 @@
package ui
import (
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/paths"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"

View File

@@ -5,8 +5,8 @@ import (
"strings"
"time"
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/debug"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"

View File

@@ -20,9 +20,9 @@ var (
launchButton *widget.Button
playButton *widget.Button
playButtonText *widget.RichText
patchTurtleWoWButton *widget.Button
patchEpochButton *widget.Button
patchCrossOverButton *widget.Button
unpatchTurtleWoWButton *widget.Button
unpatchEpochButton *widget.Button
unpatchCrossOverButton *widget.Button
startServiceButton *widget.Button
stopServiceButton *widget.Button
@@ -30,7 +30,6 @@ var (
// Option checkboxes
metalHudCheckbox *widget.Check
showTerminalCheckbox *widget.Check
vanillaTweaksCheckbox *widget.Check
autoDeleteWdbCheckbox *widget.Check
// Recommended settings button
@@ -45,19 +44,6 @@ var (
// Environment variables entry
envVarsEntry *widget.Entry
// Graphics settings checkboxes
reduceTerrainDistanceCheckbox *widget.Check
setMultisampleTo2xCheckbox *widget.Check
setShadowLOD0Checkbox *widget.Check
libSiliconPatchCheckbox *widget.Check
applyGraphicsSettingsButton *widget.Button
// Graphics settings help buttons
reduceTerrainDistanceHelpButton *widget.Button
setMultisampleTo2xHelpButton *widget.Button
setShadowLOD0HelpButton *widget.Button
libSiliconPatchHelpButton *widget.Button
// Window reference for popup functionality
currentWindow fyne.Window