5 Commits

Author SHA1 Message Date
4e22ca8714 remove MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS 2025-07-24 10:38:26 -07:00
a973508d92 Fix chmodding 2025-07-24 09:03:44 -07:00
8edd61dbba fix updating (#8)
Fixes #6

Reviewed-on: #8
2025-07-24 15:48:21 +00:00
eafc55f67c fix dir perms (#7)
Fixes #4

Reviewed-on: #7
2025-07-24 15:40:04 +00:00
bc80ca2c9c Improve logging (#2)
Reviewed-on: #2
2025-07-24 15:30:33 +00:00
8 changed files with 29 additions and 10 deletions

View File

@@ -2,5 +2,5 @@
Icon = "Icon.png" Icon = "Icon.png"
Name = "EpochSilicon" Name = "EpochSilicon"
ID = "com.burkey.epochsilicon" ID = "com.burkey.epochsilicon"
Version = "1.0.0" Version = "1.0.1"
Build = 14 Build = 22

View File

@@ -20,7 +20,7 @@ build-release:
@rm -rf ./EpochSilicon.app @rm -rf ./EpochSilicon.app
@echo "Building optimized release version..." @echo "Building optimized release version..."
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build \ CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build \
-ldflags="-s -w -X main.appVersion=$$(grep Version FyneApp.toml | cut -d'"' -f2)" \ -ldflags="-s -w" \
-trimpath \ -trimpath \
-tags=release \ -tags=release \
-o epochsilicon . -o epochsilicon .

1
go.mod
View File

@@ -7,6 +7,7 @@ toolchain go1.24.5
require ( require (
fyne.io/fyne/v2 v2.6.1 fyne.io/fyne/v2 v2.6.1
git.burkey.co/eburk/epochcli v0.0.0-20250724135717-365171fddc6b git.burkey.co/eburk/epochcli v0.0.0-20250724135717-365171fddc6b
github.com/Masterminds/semver/v3 v3.4.0
github.com/rs/zerolog v1.34.0 github.com/rs/zerolog v1.34.0
github.com/zalando/go-keyring v0.2.6 github.com/zalando/go-keyring v0.2.6
gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/natefinch/lumberjack.v2 v2.2.1

2
go.sum
View File

@@ -8,6 +8,8 @@ git.burkey.co/eburk/epochcli v0.0.0-20250724135717-365171fddc6b h1:fPDSiwJI3PzaU
git.burkey.co/eburk/epochcli v0.0.0-20250724135717-365171fddc6b/go.mod h1:DgybCn9/LpJwvkrsyea9N2nWy/wuDgo6jkpOWYkTH3c= git.burkey.co/eburk/epochcli v0.0.0-20250724135717-365171fddc6b/go.mod h1:DgybCn9/LpJwvkrsyea9N2nWy/wuDgo6jkpOWYkTH3c=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0= github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0=

View File

@@ -7,16 +7,17 @@ import (
"epochsilicon/pkg/utils" "epochsilicon/pkg/utils"
"fyne.io/fyne/v2" "fyne.io/fyne/v2"
"fyne.io/fyne/v2/app" "fyne.io/fyne/v2/app"
"github.com/Masterminds/semver/v3"
"strings" "strings"
) )
const appVersion = "1.0.1" var appVersion = semver.MustParse("1.0.1")
func main() { func main() {
log.SetupLogging() log.SetupLogging()
PEApp := app.NewWithID("com.burkey.epochsilicon") PEApp := app.NewWithID("com.burkey.epochsilicon")
PEWindow := PEApp.NewWindow("EpochSilicon v" + appVersion) PEWindow := PEApp.NewWindow("EpochSilicon v" + appVersion.String())
PEWindow.Resize(fyne.NewSize(650, 500)) PEWindow.Resize(fyne.NewSize(650, 500))
PEWindow.SetFixedSize(true) PEWindow.SetFixedSize(true)
@@ -43,7 +44,7 @@ func main() {
} }
// Show enhanced update dialog // Show enhanced update dialog
ui.ShowUpdateDialog(updateInfo, appVersion, PEWindow) ui.ShowUpdateDialog(updateInfo, appVersion.String(), PEWindow)
}() }()
content := ui.CreateUI(PEWindow) content := ui.CreateUI(PEWindow)

View File

@@ -188,7 +188,7 @@ func continueLaunch(myWindow fyne.Window, wowExePath string) {
} }
// Prepare environment variables // Prepare environment variables
envVars := fmt.Sprintf(`WINEDLLOVERRIDES="d3d9=n,b" MTL_HUD_ENABLED=%s MVK_CONFIG_SYNCHRONOUS_QUEUE_SUBMITS=1 DXVK_ASYNC=1`, mtlHudValue) envVars := fmt.Sprintf(`WINEDLLOVERRIDES="d3d9=n,b" MTL_HUD_ENABLED=%s DXVK_ASYNC=1`, mtlHudValue)
if CustomEnvVars != "" { if CustomEnvVars != "" {
envVars = CustomEnvVars + " " + envVars envVars = CustomEnvVars + " " + envVars
} }

View File

@@ -205,6 +205,17 @@ func PatchEpoch(myWindow fyne.Window, updateAllStatuses func()) {
dialog.ShowInformation("Downloading patches", "Downloading patches for Project Epoch, this will take some time. Please wait until the status changes to \"Patched\"", myWindow) dialog.ShowInformation("Downloading patches", "Downloading patches for Project Epoch, this will take some time. Please wait until the status changes to \"Patched\"", myWindow)
paths.DownloadingPatches = true paths.DownloadingPatches = true
log.Debug("Attempting to download Epoch patches...") log.Debug("Attempting to download Epoch patches...")
// Ensure permissions on Data directory is correct
err := os.Chmod(filepath.Join(paths.EpochPath, "Data"), 0755)
if err != nil {
msg := fmt.Sprintf("Failed to set Data directory permissions: %v", err)
log.Error(msg)
dialog.ShowInformation("Error", msg, myWindow)
} else {
log.Debug("Successfully set Data directory permissions")
}
go func() { go func() {
stats := epoch.Update(paths.EpochPath, true, true, false) stats := epoch.Update(paths.EpochPath, true, true, false)
if stats.Error != nil { if stats.Error != nil {

View File

@@ -5,6 +5,7 @@ import (
"epochsilicon/pkg/log" "epochsilicon/pkg/log"
"errors" "errors"
"fmt" "fmt"
"github.com/Masterminds/semver/v3"
"io" "io"
"net/http" "net/http"
"os" "os"
@@ -161,7 +162,7 @@ type Asset struct {
} }
// CheckForUpdateWithAssets returns update information including download assets // CheckForUpdateWithAssets returns update information including download assets
func CheckForUpdateWithAssets(currentVersion string) (*UpdateInfo, bool, error) { func CheckForUpdateWithAssets(currentVersion *semver.Version) (*UpdateInfo, bool, error) {
resp, err := http.Get("https://git.burkey.co/api/v1/repos/eburk/epochsilicon/releases/latest") resp, err := http.Get("https://git.burkey.co/api/v1/repos/eburk/epochsilicon/releases/latest")
if err != nil { if err != nil {
return nil, false, err return nil, false, err
@@ -191,8 +192,11 @@ func CheckForUpdateWithAssets(currentVersion string) (*UpdateInfo, bool, error)
return nil, false, fmt.Errorf("failed to parse JSON response: %v. Response: %s", err, bodyStr[:min(200, len(bodyStr))]) return nil, false, fmt.Errorf("failed to parse JSON response: %v. Response: %s", err, bodyStr[:min(200, len(bodyStr))])
} }
latest := strings.TrimPrefix(updateInfo.TagName, "v") latest, err := semver.NewVersion(updateInfo.TagName)
updateAvailable := latest != currentVersion if err != nil {
return nil, false, fmt.Errorf("failed to parse semver: %v", err)
}
updateAvailable := latest.GreaterThan(currentVersion)
return &updateInfo, updateAvailable, nil return &updateInfo, updateAvailable, nil
} }