[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-115.7.0esr-13.5-1] 3 commits: fixup! Bug 9173: Change the default Firefox profile directory to be relative.



Title: GitLab

Pier Angelo Vendrame pushed to branch mullvad-browser-115.7.0esr-13.5-1 at The Tor Project / Applications / Mullvad Browser

Commits:

  • 3ea5b1dc
    by Pier Angelo Vendrame at 2024-02-07T15:27:23+00:00
    fixup! Bug 9173: Change the default Firefox profile directory to be relative.
    
    Add a method to query whether the browser is in portable mode.
    
  • 7c5facb8
    by Pier Angelo Vendrame at 2024-02-07T15:27:23+00:00
    fixup! Bug 4234: Use the Firefox Update Process for Base Browser.
    
    Allow running the postupdate process and change the update directory
    for when not running in portable mode.
    
  • 438c7fe9
    by Pier Angelo Vendrame at 2024-02-07T15:27:23+00:00
    fixup! MB 112: Updater customization for Mullvad Browser
    
    MB 200: Enable system installs for Mullvad Browser
    
    Customize the post update executable name, to avoid any confusion with
    Mozilla's helper.exe, since we intend using a much simpler post update
    binary.
    

4 changed files:

Changes:

  • browser/installer/windows/nsis/updater_append.ini
    ... ... @@ -7,6 +7,8 @@
    7 7
     [PostUpdateWin]
    
    8 8
     ; ExeRelPath is the path to the PostUpdateWin executable relative to the
    
    9 9
     ; application executable.
    
    10
    -ExeRelPath=uninstall\helper.exe
    
    10
    +ExeRelPath=postupdate.exe
    
    11 11
     ; ExeArg is the argument to pass to the PostUpdateWin exe
    
    12
    +; We do not need any argument, but an empty string here will make updater.exe
    
    13
    +; not run this step.
    
    12 14
     ExeArg=/PostUpdate

  • toolkit/mozapps/update/updater/updater.cpp
    ... ... @@ -2807,7 +2807,7 @@ int LaunchCallbackAndPostProcessApps(int argc, NS_tchar** argv,
    2807 2807
     #endif
    
    2808 2808
     
    
    2809 2809
       if (argc > callbackIndex) {
    
    2810
    -#if defined(XP_WIN) && !defined(BASE_BROWSER_UPDATE)
    
    2810
    +#if defined(XP_WIN)
    
    2811 2811
         if (gSucceeded) {
    
    2812 2812
           if (!LaunchWinPostProcess(gInstallDirPath, gPatchDirPath)) {
    
    2813 2813
             fprintf(stderr, "The post update process was not launched");
    

  • toolkit/xre/nsIXREDirProvider.idl
    ... ... @@ -20,4 +20,9 @@ interface nsIXREDirProvider : nsISupports
    20 20
        * Gets the hash for the current installation directory.
    
    21 21
        */
    
    22 22
       AString getInstallHash();
    
    23
    +
    
    24
    +  /**
    
    25
    +   * Tells whether the browser has been started in portable mode.
    
    26
    +   */
    
    27
    +  readonly attribute bool isPortableMode;
    
    23 28
     };

  • toolkit/xre/nsXREDirProvider.cpp
    ... ... @@ -1109,7 +1109,14 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
    1109 1109
       rv = GetUserDataDirectory(getter_AddRefs(updRoot), false);
    
    1110 1110
       NS_ENSURE_SUCCESS(rv, rv);
    
    1111 1111
     #  else
    
    1112
    -  rv = GetUserDataDirectoryHome(getter_AddRefs(updRoot), false);
    
    1112
    +  bool isPortable = true;
    
    1113
    +  rv = GetIsPortableMode(&isPortable);
    
    1114
    +  NS_ENSURE_SUCCESS(rv, rv);
    
    1115
    +  if (isPortable) {
    
    1116
    +    rv = GetUserDataDirectoryHome(getter_AddRefs(updRoot), false);
    
    1117
    +  } else {
    
    1118
    +    rv = GetUserDataDirectory(getter_AddRefs(updRoot), true);
    
    1119
    +  }
    
    1113 1120
       NS_ENSURE_SUCCESS(rv, rv);
    
    1114 1121
     #  endif
    
    1115 1122
       rv = updRoot->AppendNative("UpdateInfo"_ns);
    
    ... ... @@ -1324,6 +1331,20 @@ nsresult nsXREDirProvider::GetPortableDataDir(nsIFile** aFile,
    1324 1331
     }
    
    1325 1332
     #endif
    
    1326 1333
     
    
    1334
    +NS_IMETHODIMP nsXREDirProvider::GetIsPortableMode(bool* aIsPortableMode) {
    
    1335
    +#ifdef RELATIVE_DATA_DIR
    
    1336
    +  if (gDataDirPortable) {
    
    1337
    +    *aIsPortableMode = *gDataDirPortable;
    
    1338
    +  } else {
    
    1339
    +    nsCOMPtr<nsIFile> dir;
    
    1340
    +    GetPortableDataDir(getter_AddRefs(dir), *aIsPortableMode);
    
    1341
    +  }
    
    1342
    +#else
    
    1343
    +  *aIsPortableMode = false;
    
    1344
    +#endif
    
    1345
    +  return NS_OK;
    
    1346
    +}
    
    1347
    +
    
    1327 1348
     nsresult nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile,
    
    1328 1349
                                                         bool aLocal) {
    
    1329 1350
       // Copied from nsAppFileLocationProvider (more or less)
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits