Release 4.0.0+1: rebrand Navis → EvilFox; centralized Remnawave auto-provisioning (panel credentials baked into binary); remove Remnawave API UI; Windows 4.0.0.1.
Keep dist/navis-release/ path and ship Navis.exe as a same-hash alias of EvilFox.exe so 3.x clients can still update from the Windows branch feed.
This commit is contained in:
@@ -16,9 +16,12 @@ import (
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// finishUpdateFlag must stay "--navis-finish-update" forever: older installed
|
||||
// builds (3.x) launch the freshly downloaded binary with exactly this flag,
|
||||
// so renaming it would break their update handoff.
|
||||
const finishUpdateFlag = "--navis-finish-update"
|
||||
|
||||
// Apply downloads the new build and replaces the running Navis.exe after this process exits.
|
||||
// Apply downloads the new build and replaces the running EvilFox.exe after this process exits.
|
||||
func Apply(ctx context.Context, manifestURL string) (string, error) {
|
||||
if IsStorePackaged() {
|
||||
return "", fmt.Errorf("обновления устанавливаются через Microsoft Store")
|
||||
@@ -27,7 +30,7 @@ func Apply(ctx context.Context, manifestURL string) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
pending := filepath.Join(filepath.Dir(exe), "Navis-pending.exe")
|
||||
pending := filepath.Join(filepath.Dir(exe), "EvilFox-pending.exe")
|
||||
_ = os.Remove(pending)
|
||||
if err := os.Rename(tmp, pending); err != nil {
|
||||
if err2 := copyFile(tmp, pending); err2 != nil {
|
||||
@@ -58,7 +61,7 @@ func Apply(ctx context.Context, manifestURL string) (string, error) {
|
||||
return latest, nil
|
||||
}
|
||||
|
||||
// MaybeFinishUpdate handles: Navis-pending.exe --navis-finish-update <pid> <targetExe>
|
||||
// MaybeFinishUpdate handles: EvilFox-pending.exe --navis-finish-update <pid> <targetExe>
|
||||
// Replaces targetExe in-place with this binary, then relaunches it.
|
||||
func MaybeFinishUpdate(args []string) bool {
|
||||
if len(args) < 3 || args[0] != finishUpdateFlag {
|
||||
@@ -109,6 +112,7 @@ func CleanupStaleDownloads() {
|
||||
_ = os.Remove(filepath.Join(dir, base+".new"))
|
||||
_ = os.Remove(filepath.Join(dir, "Navis-update.part"))
|
||||
_ = os.Remove(filepath.Join(dir, ".navis-update-download"))
|
||||
_ = os.Remove(filepath.Join(dir, "Navis-pending.exe"))
|
||||
}
|
||||
|
||||
func replaceExecutable(src, dst string) error {
|
||||
|
||||
Reference in New Issue
Block a user