Merge pull request 'winUninstall' (#434) from winUninstall into trunk
continuous-integration/drone/push Build is passing Details

Reviewed-on: #434
Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
Dan Ballard 2022-04-21 18:40:31 +00:00
commit ffdc7b3262
2 changed files with 17 additions and 2 deletions

View File

@ -160,7 +160,13 @@ class CwtchFfi implements Cwtch {
}
} else if (Platform.isWindows) {
cwtchDir = envVars['CWTCH_DIR'] ?? path.join(envVars['UserProfile']!, ".cwtch");
bundledTor = "Tor\\Tor\\tor.exe";
String currentTor = path.join(Directory.current.absolute.path, "Tor\\Tor\\tor.exe");
if (await File(currentTor).exists()) {
bundledTor = currentTor;
} else {
String exeDir = path.dirname(Platform.resolvedExecutable);
bundledTor = path.join(exeDir, "Tor\\Tor\\tor.exe");
}
} else if (Platform.isMacOS) {
cwtchDir = envVars['CWTCH_HOME'] ?? path.join(envVars['HOME']!, "Library/Application Support/Cwtch");
if (await File("Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) {

View File

@ -50,7 +50,10 @@ ShowInstDetails show
!define MUI_WELCOMEPAGE_TITLE "Welcome to the Cwtch installer"
!define MUI_WELCOMEPAGE_TEXT "Cwtch (pronounced: kutch) is a Welsh word roughly meaning 'a hug that creates a safe space'$\n$\n\
Cwtch is a platform for building consentful, decentralized, untrusted infrastructure using metadata resistant group communication applications. Currently there is a selfnamed instant messaging prototype app that is driving development and testing. Many Further apps are planned as the platform matures."
Cwtch is a platform for building consentful, decentralized, untrusted infrastructure using metadata resistant group communication applications. Currently there is a selfnamed instant messaging prototype app that is driving development and testing. Many Further apps are planned as the platform matures.$\n$\n\
Please close any running copies of Cwtch before installing a new version."
; Detecting if Cwtch is running and reminding the user or closing it appears to require 3rd party plugins that take the form of decade+ old .dlls in zips from a wiki...
!define MUI_FINISHPAGE_TITLE "Enjoy Cwtch"
!define MUI_FINISHPAGE_RUN $INSTDIR/cwtch.exe
@ -96,10 +99,16 @@ Section
WriteUninstaller "$INSTDIR\uninstall.exe"
# https://nsis.sourceforge.io/Add_uninstall_information_to_Add/Remove_Programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cwtch" \
"DisplayName" "Cwtch"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cwtch" \
"UninstallString" "$\"$INSTDIR\uninstall.exe$\""
SectionEnd
Section "Uninstall"
RMDir /r /REBOOTOK "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\Cwtch\installLocation"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ImageMaker"
SectionEnd