[cmds] Move new UI to a zip for windows

This commit is contained in:
Vladimir Stoilov
2024-07-16 11:26:20 +03:00
parent 090a5e6508
commit c868598deb
3 changed files with 77 additions and 11 deletions

View File

@@ -64,7 +64,7 @@ type Options struct {
// This is a temp value that will be used to test the new UI in beta.
var app2Options = Options{
Name: "Portmaster App2",
Identifier: "app2/portmaster",
Identifier: "app2/portmaster-app",
AllowDownload: false,
AllowHidingWindow: false,
RestartOnFail: true,
@@ -73,7 +73,7 @@ var app2Options = Options{
func init() {
// Make sure the new UI has a proper extension.
if onWindows {
app2Options.Identifier += ".exe"
app2Options.Identifier += ".zip"
}
registerComponent([]Options{
@@ -92,12 +92,6 @@ func init() {
AllowHidingWindow: false,
RestartOnFail: true,
},
{
Name: "Portmaster App2",
Identifier: "app2/portmaster",
AllowDownload: false,
AllowHidingWindow: false,
},
{
Name: "Portmaster Notifier",
Identifier: "notifier/portmaster-notifier",
@@ -116,6 +110,26 @@ func init() {
RestartOnFail: true,
},
})
if onWindows {
registerComponent([]Options{
{
Name: "Portmaster App2",
Identifier: "app2/portmaster-app.zip",
AllowDownload: false,
AllowHidingWindow: false,
},
})
} else {
registerComponent([]Options{
{
Name: "Portmaster App2",
Identifier: "app2/portmaster-app",
AllowDownload: false,
AllowHidingWindow: false,
},
})
}
}
func registerComponent(opts []Options) {