Bug 1501792 - Port bug 1458314 to TB: Move the update directory to an installation specific location. rs=jorgk f=rstrong
authorRichard Marti <richard.marti@gmail.com>
Wed, 24 Oct 2018 21:34:04 +0200
changeset 33623 13e1bf3609be5c2d39f126ad3df2e5aa39f78fdc
parent 33622 550ea359e239e322cef978fbb3dfd4e6fc5eec09
child 33624 9da5d0b8fa8046c88dcbc9154e67e00ba9693ce7
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersjorgk
bugs1501792, 1458314
Bug 1501792 - Port bug 1458314 to TB: Move the update directory to an installation specific location. rs=jorgk f=rstrong
mail/installer/windows/nsis/installer.nsi
mail/installer/windows/nsis/uninstaller.nsi
--- a/mail/installer/windows/nsis/installer.nsi
+++ b/mail/installer/windows/nsis/installer.nsi
@@ -245,17 +245,17 @@ Section "-InstallStartCleanup"
     ${DeleteFile} "$INSTDIR\${FileMainEXE}"
     ClearErrors
   ${EndIf}
 
   ; setup the application model id registration value
   ${InitHashAppModelId} "$INSTDIR" "Software\Mozilla\${AppName}\TaskBarIDs"
 
   ; Remove the updates directory
-  ${CleanUpdateDirectories} "Thunderbird" "Thunderbird\updates"
+  ${CleanUpdateDirectories} "Thunderbird" "Mozilla\updates"
 
   ; Upgrade the copies of the MAPI DLL's
   ${UpgradeMapiDLLs}
 
   ; Delete two files installed by Kaspersky Anti-Spam extension that are only
   ; compatible with Thunderbird 2 (bug 533692).
   ${If} ${FileExists} "$INSTDIR\components\klthbplg.dll"
     Delete /REBOOTOK "$INSTDIR\components\klthbplg.dll"
@@ -357,16 +357,22 @@ Section "-Application" APP_IDX
     ${EndIf}
   ${EndIf}
 
   ; Default for creating Desktop shortcut (1 = create, 0 = don't create)
   ${If} $AddDesktopSC == ""
     StrCpy $AddDesktopSC "1"
   ${EndIf}
 
+  ${CreateUpdateDir} "Mozilla"
+  ${If} ${Errors}
+    Pop $0
+    ${LogMsg} "** ERROR Failed to create update directory: $0"
+  ${EndIf}
+
   ${LogHeader} "Adding Registry Entries"
   SetShellVarContext current  ; Set SHCTX to HKCU
   ${RegCleanMain} "Software\Mozilla"
   ${RegCleanUninstall}
   ${UpdateProtocolHandlers}
 
   ClearErrors
   WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
--- a/mail/installer/windows/nsis/uninstaller.nsi
+++ b/mail/installer/windows/nsis/uninstaller.nsi
@@ -260,17 +260,17 @@ Section "Uninstall"
 
   ; Unregister resources associated with Win7 taskbar jump lists.
   ${If} ${AtLeastWin7}
   ${AndIf} "$AppUserModelID" != ""
     ApplicationID::UninstallJumpLists "$AppUserModelID"
   ${EndIf}
 
   ; Remove the updates directory
-  ${un.CleanUpdateDirectories} "Thunderbird" "Thunderbird\updates"
+  ${un.CleanUpdateDirectories} "Thunderbird" "Mozilla\updates"
 
   ; Remove any app model id's stored in the registry for this install path
   DeleteRegValue HKCU "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
   DeleteRegValue HKLM "Software\Mozilla\${AppName}\TaskBarIDs" "$INSTDIR"
 
   ClearErrors
   WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
   ${If} ${Errors}