Skip to content

The only downloader you need. 下载器的集大成者。

feat(installer): 卸载时清理 AppData & 默认注册 ghostdownloader:// 协议

XiaoYouChR72f7fb7e8edb
diff --git a/app/config/cfg.py b/app/config/cfg.py
index c2c47044..9ca27618 100644
--- a/app/config/cfg.py
+++ b/app/config/cfg.py
@@ -261,7 +261,7 @@ class Config(QConfig):
shouldDraftTakenDownload = ConfigItem(
"Browser", "EnableRaiseWindowWhenReceiveMsg", False, BoolValidator()
)
- isUrlSchemeRegistered = ConfigItem("Browser", "UrlSchemeRegistered", False, BoolValidator())
+ isUrlSchemeRegistered = ConfigItem("Browser", "UrlSchemeRegistered", True, BoolValidator())
# Aria2 RPC 兼容
isAria2RpcEnabled = ConfigItem("Aria2Rpc", "Enabled", False, BoolValidator())
diff --git a/app/view/windows/oobe_window.py b/app/view/windows/oobe_window.py
index f9512ed0..6842d020 100644
--- a/app/view/windows/oobe_window.py
+++ b/app/view/windows/oobe_window.py
@@ -716,7 +716,7 @@ class AdvancedOptionsPage(QWidget):
if config is not None and config.associateUriSchemes is not None:
cfg.set(config.associateUriSchemes, self.uriSchemeCard.isChecked())
- if self.urlSchemeCard is not None and self.urlSchemeCard.isChecked() != cfg.isUrlSchemeRegistered.value:
+ if self.urlSchemeCard is not None:
from app.platform.url_scheme import registerUrlScheme, unregisterUrlScheme
if self.urlSchemeCard.isChecked():
registerUrlScheme()
@@ -897,8 +897,6 @@ class OobeWindow(FluentWidget):
if self._currentIndex == 3:
self._installSelectedRuntimes()
- if self._currentIndex == 4:
- self.advancedOptionsPage.save()
self._currentIndex += 1
self.stackedWidget.setCurrentIndex(self._currentIndex)
@@ -945,6 +943,7 @@ class OobeWindow(FluentWidget):
if self._isFinished:
return
self._isFinished = True
+ self.advancedOptionsPage.save()
cfg.set(cfg.hasCompletedOobe, True)
self.finished.emit()
self.close()
diff --git a/scripts/Ghost-Downloader-3.iss b/scripts/Ghost-Downloader-3.iss
index 20268010..9d23c1e5 100644
--- a/scripts/Ghost-Downloader-3.iss
+++ b/scripts/Ghost-Downloader-3.iss
@@ -73,5 +73,8 @@ Root: HKCU; Subkey: "Software\Classes\ed2k"; Flags: dontcreatekey uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\ftp"; Flags: dontcreatekey uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\ftps"; Flags: dontcreatekey uninsdeletekey
+[UninstallDelete]
+Type: filesandordirs; Name: "{localappdata}\GhostDownloader"
+
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent