Initial commit
This commit is contained in:
10985
cmd/installer/defaultSettings.json
Normal file
10985
cmd/installer/defaultSettings.json
Normal file
File diff suppressed because it is too large
Load Diff
24
cmd/installer/main.go
Normal file
24
cmd/installer/main.go
Normal 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
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()
|
||||
}
|
6
cmd/updater/updater_config.json
Normal file
6
cmd/updater/updater_config.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"ip": "192.168.111.111",
|
||||
"port": "22",
|
||||
"login": "root",
|
||||
"password": "orangepi"
|
||||
}
|
Reference in New Issue
Block a user