myapp

package module
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2025 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearBackupAPP added in v1.0.2

func ClearBackupAPP(t time.Duration)

func GetExecutablePath

func GetExecutablePath() (file string, err error)

func StartProcessDetached

func StartProcessDetached(execFile string) error

func UpgradeApp added in v1.0.2

func UpgradeApp(downloadUrl string, dlProcessCb func(percent float64, step UpgradeStep)) error

升级APP : 下载 -> 重命令当前进程文件 -> 解压 到当前进程位置 -> 删除下载文件 -> 重启下截文件 -> 退出当前进程

Types

type UpgradeStep added in v1.0.2

type UpgradeStep int
const (
	StepDownload       UpgradeStep = 1  //下载
	StepDownloadOK     UpgradeStep = 10 //下载
	StepDownloadFail   UpgradeStep = 11 //下载
	StepRename         UpgradeStep = 2  //重命令当前进程文件
	StepUnzip          UpgradeStep = 3  //解压下载文件
	StepRemoveDownload UpgradeStep = 4  //删除下载文件
	StepRestart        UpgradeStep = 5  //重启下截文件
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL