FemaInstaller/cmd/updater/main.go

34 lines
747 B
Go

package main
import (
_ "embed"
"fyne.io/fyne/v2/app"
"log"
"gitea.unprism.ru/KRBL/FemaInstaller/internal/ui"
"gitea.unprism.ru/KRBL/FemaInstaller/internal/updater"
"gitea.unprism.ru/KRBL/FemaInstaller/pkg/config"
)
//go:embed build
var binaryData []byte
func main() {
// Load configuration
configPath := updater.GetConfigFilePath()
cfg, err := config.LoadUpdaterConfig(configPath)
if err != nil {
log.Fatalf("Ошибка загрузки конфигурации: %v", err)
}
// Create application
myApp := app.New()
// Create updater
femaUpdater := updater.NewUpdater(cfg, binaryData)
// Create and show updater window
updaterWindow := ui.NewUpdaterWindow(myApp, cfg, femaUpdater.Update)
updaterWindow.ShowAndRun()
}