Simply new UI component in portmaster-start
This commit is contained in:
@@ -109,27 +109,8 @@ func init() {
|
|||||||
PIDFile: true,
|
PIDFile: true,
|
||||||
RestartOnFail: true,
|
RestartOnFail: true,
|
||||||
},
|
},
|
||||||
|
app2Options,
|
||||||
})
|
})
|
||||||
|
|
||||||
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) {
|
func registerComponent(opts []Options) {
|
||||||
@@ -352,12 +333,13 @@ func persistOutputStreams(opts *Options, version string, cmd *exec.Cmd) (chan st
|
|||||||
}
|
}
|
||||||
|
|
||||||
func execute(opts *Options, args []string) (cont bool, err error) {
|
func execute(opts *Options, args []string) (cont bool, err error) {
|
||||||
if !forceOldUI && registry.UsePreReleases && opts.ShortIdentifier == "app" {
|
// Auto-upgrade to new UI if in beta and new UI is not disabled or failed.
|
||||||
// Check if new ui was already tried.
|
if opts.ShortIdentifier == "app" &&
|
||||||
if !fallBackToOldUI {
|
registry.UsePreReleases &&
|
||||||
opts = &app2Options
|
!forceOldUI &&
|
||||||
log.Println("Using new UI")
|
!fallBackToOldUI {
|
||||||
}
|
log.Println("auto-upgraded to new UI")
|
||||||
|
opts = &app2Options
|
||||||
}
|
}
|
||||||
|
|
||||||
file, err := registry.GetFile(
|
file, err := registry.GetFile(
|
||||||
|
|||||||
Reference in New Issue
Block a user