Initial commit

This commit is contained in:
2025-04-25 03:07:02 +03:00
commit 88a1f0f50f
16 changed files with 11945 additions and 0 deletions

File diff suppressed because it is too large Load Diff

24
cmd/installer/main.go Normal file
View File

@ -0,0 +1,24 @@
package main
import (
_ "embed"
"fyne.io/fyne/v2/app"
"gitea.unprism.ru/KRBL/FemaInstaller/internal/installer"
"gitea.unprism.ru/KRBL/FemaInstaller/internal/ui"
)
//go:embed defaultSettings.json
var defaultSettings string
func main() {
// Create application
myApp := app.New()
// Create installer
femaInstaller := installer.NewInstaller(defaultSettings)
// Create and show main window
mainWindow := ui.NewMainWindow(myApp, femaInstaller.Install)
mainWindow.ShowAndRun()
}

33
cmd/updater/main.go Normal file
View 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()
}

View File

@ -0,0 +1,6 @@
{
"ip": "192.168.111.111",
"port": "22",
"login": "root",
"password": "orangepi"
}