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

@@ -6,7 +6,7 @@ import (
"os"
"path/filepath"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/dialog"
@@ -53,14 +53,14 @@ func SelectCrossOverPath(myWindow fyne.Window, crossoverPathLabel *widget.RichTe
}, myWindow)
}
func SelectTurtleWoWPath(myWindow fyne.Window, turtlewowPathLabel *widget.RichText, updateAllStatuses func()) {
func SelectEpochPath(myWindow fyne.Window, epochPathLabel *widget.RichText, updateAllStatuses func()) {
dialog.ShowFolderOpen(func(uri fyne.ListableURI, err error) {
if err != nil {
dialog.ShowError(err, myWindow)
return
}
if uri == nil {
log.Println("TurtleWoW path selection cancelled.")
log.Println("Epoch path selection cancelled.")
updateAllStatuses()
return
}
@@ -68,20 +68,20 @@ func SelectTurtleWoWPath(myWindow fyne.Window, turtlewowPathLabel *widget.RichTe
if utils.DirExists(selectedPath) {
EpochPath = selectedPath
PatchesAppliedEpoch = false
log.Println("TurtleWoW path set to:", EpochPath)
log.Println("Epoch path set to:", EpochPath)
// Save to prefs
prefs, _ := utils.LoadPrefs()
prefs.EpochPath = selectedPath
utils.SavePrefs(prefs)
} else {
dialog.ShowError(fmt.Errorf("invalid selection: '%s' is not a valid directory", selectedPath), myWindow)
log.Println("Invalid TurtleWoW path selected:", selectedPath)
log.Println("Invalid Epoch path selected:", selectedPath)
}
updateAllStatuses()
}, myWindow)
}
func UpdatePathLabels(crossoverPathLabel, turtlewowPathLabel *widget.RichText) {
func UpdatePathLabels(crossoverPathLabel, EpochPathLabel *widget.RichText) {
if CrossoverPath == "" {
crossoverPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
} else {
@@ -90,11 +90,11 @@ func UpdatePathLabels(crossoverPathLabel, turtlewowPathLabel *widget.RichText) {
crossoverPathLabel.Refresh()
if EpochPath == "" {
turtlewowPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
EpochPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: "Not set", Style: widget.RichTextStyle{ColorName: theme.ColorNameError}}}
} else {
turtlewowPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: EpochPath, Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
EpochPathLabel.Segments = []widget.RichTextSegment{&widget.TextSegment{Text: EpochPath, Style: widget.RichTextStyle{ColorName: theme.ColorNameSuccess}}}
}
turtlewowPathLabel.Refresh()
EpochPathLabel.Refresh()
}
func CheckDefaultCrossOverPath() {