6 Commits

Author SHA1 Message Date
0b80c2d713 log to file 2025-07-24 08:29:34 -07:00
caf2004388 more logs 2025-07-24 07:23:29 -07:00
67daf7027d updater error logs 2025-07-24 06:54:44 -07:00
087923a13f more logging changes 2025-07-24 06:21:56 -07:00
a1f46438d0 start custom logger 2025-07-23 08:59:16 -07:00
8b5be228fe change to zerolog 2025-07-23 08:46:53 -07:00
8 changed files with 28 additions and 28 deletions

View File

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

1
go.mod
View File

@@ -7,7 +7,6 @@ toolchain go1.24.5
require (
fyne.io/fyne/v2 v2.6.1
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/zalando/go-keyring v0.2.6
gopkg.in/natefinch/lumberjack.v2 v2.2.1

2
go.sum
View File

@@ -8,8 +8,6 @@ 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=
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/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/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/danieljoos/wincred v1.2.2 h1:774zMFJrqaeYCK2W57BgAem/MLi6mtSE47MB6BOJ0i0=

View File

@@ -7,11 +7,10 @@ import (
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"github.com/Masterminds/semver/v3"
"strings"
)
const appVersion = "1.0.2"
const appVersion = "1.0.1"
func main() {
log.SetupLogging()
@@ -23,7 +22,7 @@ func main() {
go func() {
prefs, _ := utils.LoadPrefs()
updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(semver.MustParse(appVersion))
updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(appVersion)
if err != nil {
log.Debugf("Failed to check for updates: %v", err)
return

View File

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

View File

@@ -205,17 +205,6 @@ 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)
paths.DownloadingPatches = true
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() {
stats := epoch.Update(paths.EpochPath, true, true, false)
if stats.Error != nil {

View File

@@ -5,7 +5,6 @@ import (
"epochsilicon/pkg/log"
"errors"
"fmt"
"github.com/Masterminds/semver/v3"
"io"
"net/http"
"os"
@@ -129,6 +128,25 @@ func QuotePathForShell(path string) string {
return fmt.Sprintf(`"%s"`, path)
}
func CheckForUpdate(currentVersion string) (latestVersion, releaseNotes string, updateAvailable bool, err error) {
resp, err := http.Get("https://api.github.com/repos/tairasu/EpochSilicon/releases/latest")
if err != nil {
return "", "", false, err
}
defer resp.Body.Close()
var data struct {
TagName string `json:"tag_name"`
Body string `json:"body"`
}
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
return "", "", false, err
}
latest := strings.TrimPrefix(data.TagName, "v")
return latest, data.Body, latest != currentVersion, nil
}
// UpdateInfo contains information about the latest release
type UpdateInfo struct {
TagName string `json:"tag_name"`
@@ -143,7 +161,7 @@ type Asset struct {
}
// CheckForUpdateWithAssets returns update information including download assets
func CheckForUpdateWithAssets(currentVersion *semver.Version) (*UpdateInfo, bool, error) {
func CheckForUpdateWithAssets(currentVersion string) (*UpdateInfo, bool, error) {
resp, err := http.Get("https://git.burkey.co/api/v1/repos/eburk/epochsilicon/releases/latest")
if err != nil {
return nil, false, err
@@ -173,11 +191,8 @@ func CheckForUpdateWithAssets(currentVersion *semver.Version) (*UpdateInfo, bool
return nil, false, fmt.Errorf("failed to parse JSON response: %v. Response: %s", err, bodyStr[:min(200, len(bodyStr))])
}
latest, err := semver.NewVersion(updateInfo.TagName)
if err != nil {
return nil, false, fmt.Errorf("failed to parse semver: %v", err)
}
updateAvailable := latest.GreaterThan(currentVersion)
latest := strings.TrimPrefix(updateInfo.TagName, "v")
updateAvailable := latest != currentVersion
return &updateInfo, updateAvailable, nil
}