Initial commit
This commit is contained in:
33
cmd/updater/main.go
Normal file
33
cmd/updater/main.go
Normal file
@ -0,0 +1,33 @@
|
||||
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()
|
||||
}
|
Reference in New Issue
Block a user