Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4545bc82c2 | |||
4e22ca8714 |
@@ -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.1"
|
Version = "1.0.3"
|
||||||
Build = 19
|
Build = 25
|
||||||
|
2
Makefile
2
Makefile
@@ -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" \
|
-ldflags="-s -w -X main.appVersion=$$(grep Version FyneApp.toml | cut -d'"' -f2)" \
|
||||||
-trimpath \
|
-trimpath \
|
||||||
-tags=release \
|
-tags=release \
|
||||||
-o epochsilicon .
|
-o epochsilicon .
|
||||||
|
8
main.go
8
main.go
@@ -11,19 +11,19 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var appVersion = semver.MustParse("1.0.1")
|
const appVersion = "1.0.2"
|
||||||
|
|
||||||
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.String())
|
PEWindow := PEApp.NewWindow("EpochSilicon v" + appVersion)
|
||||||
PEWindow.Resize(fyne.NewSize(650, 500))
|
PEWindow.Resize(fyne.NewSize(650, 500))
|
||||||
PEWindow.SetFixedSize(true)
|
PEWindow.SetFixedSize(true)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
prefs, _ := utils.LoadPrefs()
|
prefs, _ := utils.LoadPrefs()
|
||||||
updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(appVersion)
|
updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(semver.MustParse(appVersion))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debugf("Failed to check for updates: %v", err)
|
log.Debugf("Failed to check for updates: %v", err)
|
||||||
return
|
return
|
||||||
@@ -44,7 +44,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show enhanced update dialog
|
// Show enhanced update dialog
|
||||||
ui.ShowUpdateDialog(updateInfo, appVersion.String(), PEWindow)
|
ui.ShowUpdateDialog(updateInfo, appVersion, PEWindow)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
content := ui.CreateUI(PEWindow)
|
content := ui.CreateUI(PEWindow)
|
||||||
|
@@ -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
|
||||||
}
|
}
|
||||||
|
@@ -129,25 +129,6 @@ func QuotePathForShell(path string) string {
|
|||||||
return fmt.Sprintf(`"%s"`, path)
|
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
|
// UpdateInfo contains information about the latest release
|
||||||
type UpdateInfo struct {
|
type UpdateInfo struct {
|
||||||
TagName string `json:"tag_name"`
|
TagName string `json:"tag_name"`
|
||||||
|
Reference in New Issue
Block a user