Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
snakem982 committed Dec 9, 2024
1 parent c20e714 commit d2aeb3f
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions backend/system/update/update_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
package update

import (
"fmt"
"os"
"os/exec"
"pandora-box/backend/constant"
"pandora-box/backend/tools"
"time"
)

func IsNeedUpdate() (bool, string) {
Expand All @@ -22,20 +18,5 @@ func IsNeedUpdate() (bool, string) {
}

func Replace() bool {
err := os.Rename("./cms-test.exe", "./cms-test-temp.exe")
if err != nil {
fmt.Print(err)
return false
}
time.Sleep(5 * time.Second)
os.Rename("./cms.exe", "./cms-test.exe")
time.Sleep(2 * time.Second)
os.Remove("./cms-test-temp.exe")
time.Sleep(5 * time.Second)

// 到程序安装路径下去执行启动命令(预防相对路径方式启动)
daemon := "timeout /T 3 & E:\\cms\\cms-test.exe 2>&1 &"
_ = exec.Command("cmd.exe", "/C", daemon).Start()

return false
}

0 comments on commit d2aeb3f

Please sign in to comment.