is this too much voodoo?
This commit is contained in:
parent
d17285d122
commit
58e18083a3
4 changed files with 141 additions and 14 deletions
17
installer.go
17
installer.go
|
@ -1,3 +1,5 @@
|
|||
//go:build !windows
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
@ -62,8 +64,8 @@ func (inst *Installer) StartDownloadDecompress() {
|
|||
}
|
||||
|
||||
spm.UpdateProgress(0, "Downloading specified packages...")
|
||||
if err := spm.AutoDownloadSpecified(specs); err != nil {
|
||||
fmt.Println("AutoDownloadSpecifiedPackages failed:", err)
|
||||
if err := spm.DownloadSpecified(specs); err != nil {
|
||||
fmt.Println("DownloadSpecifiedPackages failed:", err)
|
||||
inst.LastError = err
|
||||
return
|
||||
}
|
||||
|
@ -93,7 +95,7 @@ func (inst *Installer) FinalInstall() {
|
|||
inst.doFinalInstall()
|
||||
}
|
||||
|
||||
// doFinalInstall does the actual installation by invoking AutoInstallUpdates.
|
||||
// doFinalInstall does the actual installation by invoking InstallUpdates.
|
||||
func (inst *Installer) doFinalInstall() {
|
||||
inst.IsInstalling = true
|
||||
inst.PendingInstall = false // we are fulfilling the install now
|
||||
|
@ -105,14 +107,7 @@ func (inst *Installer) doFinalInstall() {
|
|||
}()
|
||||
|
||||
spm.UpdateProgress(0, "Installing updates...")
|
||||
if err := spm.AutoInstallUpdates(); err != nil {
|
||||
inst.LastError = err
|
||||
return
|
||||
}
|
||||
|
||||
// Register the app in Windows (i.e. create registry entries)
|
||||
spm.UpdateProgress(0, "Registering app...")
|
||||
if err := spm.RegisterApp(); err != nil {
|
||||
if err := spm.InstallUpdates(); err != nil {
|
||||
inst.LastError = err
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue