diff --git a/app/config.sh b/app/config.sh index 487cd687d7..9725d34d8a 100644 --- a/app/config.sh +++ b/app/config.sh @@ -3,7 +3,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Version of Gecko to build with GECKO_VERSION_MAC="115.4.0esr" GECKO_VERSION_LINUX="115.5.0esr" -GECKO_VERSION_WIN="102.13.0esr" +GECKO_VERSION_WIN="115.5.0esr" RUST_VERSION=1.69.0 # URL prefix for custom builds of Firefox components diff --git a/app/win/mozconfig b/app/win/mozconfig index 5f138b328f..a87dbccc83 100644 --- a/app/win/mozconfig +++ b/app/win/mozconfig @@ -1,29 +1,29 @@ -# Set Z_ARCH=win32 on command line to build and package win32 -if [ "$Z_ARCH" == "win32" ]; then - ac_add_options --target=i686-pc-mingw32 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1804548 - ac_add_options --without-wasm-sandboxed-libraries -fi - -ac_add_options --enable-bootstrap -mk_add_options AUTOCLOBBER=1 - -# These don't all affect the stub, but they can't hurt, and we'll want them if -# we switch to custom XUL builds -ac_add_options MOZ_ENABLE_JS_DUMP=1 -ac_add_options MOZ_ENABLE_FORKSERVER= -ac_add_options MOZ_TELEMETRY_REPORTING= -ac_add_options MOZ_DATA_REPORTING= -ac_add_options --disable-tests -ac_add_options --disable-debug -ac_add_options --disable-debug-symbols -ac_add_options --disable-webrtc -ac_add_options --disable-eme -ac_add_options --enable-official-branding - -export MOZILLA_OFFICIAL=1 -export RELEASE_OR_BETA=1 -MOZ_REQUIRE_SIGNING= - -# Build updater without MAR signature verification -ac_add_options --disable-verify-mar +# Set Z_ARCH=win32 on command line to build and package win32 +if [ "$Z_ARCH" == "win32" ]; then + ac_add_options --target=i686-pc-mingw32 + # https://bugzilla.mozilla.org/show_bug.cgi?id=1804548 + ac_add_options --without-wasm-sandboxed-libraries +fi + +ac_add_options --enable-bootstrap +mk_add_options AUTOCLOBBER=1 + +# These don't all affect the stub, but they can't hurt, and we'll want them if +# we switch to custom XUL builds +ac_add_options MOZ_ENABLE_JS_DUMP=1 +ac_add_options MOZ_ENABLE_FORKSERVER= +ac_add_options MOZ_TELEMETRY_REPORTING= +ac_add_options MOZ_DATA_REPORTING= +ac_add_options --disable-tests +ac_add_options --disable-debug +ac_add_options --disable-debug-symbols +ac_add_options --disable-webrtc +ac_add_options --disable-eme +ac_add_options --enable-official-branding + +export MOZILLA_OFFICIAL=1 +export RELEASE_OR_BETA=1 +MOZ_REQUIRE_SIGNING= + +# Build updater without MAR signature verification +ac_add_options --enable-unverified-updates diff --git a/app/win/mozilla-115.patch b/app/win/mozilla-115.patch new file mode 100644 index 0000000000..36ff1134cf --- /dev/null +++ b/app/win/mozilla-115.patch @@ -0,0 +1,82 @@ +diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp +--- a/browser/app/nsBrowserApp.cpp ++++ b/browser/app/nsBrowserApp.cpp +@@ -154,19 +154,30 @@ static bool IsArg(const char* arg, const + #endif + + return false; + } + + Bootstrap::UniquePtr gBootstrap; + + static int do_main(int argc, char* argv[], char* envp[]) { ++ // Allow profile downgrade for Zotero ++ _putenv_s("MOZ_ALLOW_DOWNGRADE", "1"); ++ // Don't create dedicated profile (default-esr) ++ _putenv_s("MOZ_LEGACY_PROFILES", "1"); ++ + // Allow firefox.exe to launch XULRunner apps via -app + // Note that -app must be the *first* argument. +- const char* appDataFile = getenv("XUL_APP_FILE"); ++ UniqueFreePtr iniPath = BinaryPath::GetApplicationIni(); ++ if (!iniPath) { ++ Output("Couldn't find application.ini.\n"); ++ return 255; ++ ++ } ++ char *appDataFile = iniPath.get(); + if ((!appDataFile || !*appDataFile) && (argc > 1 && IsArg(argv[1], "app"))) { + if (argc == 2) { + Output("Incorrect number of arguments passed to -app"); + return 255; + } + appDataFile = argv[2]; + + char appEnv[MAXPATHLEN]; +diff --git a/xpcom/build/BinaryPath.h b/xpcom/build/BinaryPath.h +--- a/xpcom/build/BinaryPath.h ++++ b/xpcom/build/BinaryPath.h +@@ -283,16 +283,43 @@ class BinaryPath { + if (NS_FAILED(Get(path))) { + return nullptr; + } + UniqueFreePtr result; + result.reset(strdup(path)); + return result; + } + ++ static UniqueFreePtr GetApplicationIni() { ++ char path[MAXPATHLEN]; ++ if (NS_FAILED(Get(path))) { ++ return nullptr; ++ } ++ ++ char *c = path + strlen(path); ++ while (c >= path && *c != '\\' && *c != '/') { ++ *c = NULL; ++ c--; ++ } ++ ++ if (c < path) { ++ return nullptr; ++ } ++ ++ char iniPath[MAXPATHLEN]; ++ int n = snprintf(iniPath, MAXPATHLEN, "%s\\app\\application.ini", path); ++ if (n < 0 || n >= MAXPATHLEN) { ++ return nullptr; ++ } ++ ++ UniqueFreePtr result; ++ result.reset(strdup(iniPath)); ++ return result; ++ } ++ + #ifdef MOZILLA_INTERNAL_API + static nsresult GetFile(nsIFile** aResult) { + nsCOMPtr lf; + # ifdef XP_WIN + wchar_t exePath[MAXPATHLEN]; + nsresult rv = GetW(exePath); + # else + char exePath[MAXPATHLEN]; diff --git a/app/win/zotero.exe.tar.xz b/app/win/zotero.exe.tar.xz index 8498d348a0..eaf36223a3 100644 --- a/app/win/zotero.exe.tar.xz +++ b/app/win/zotero.exe.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3eac8ba79ffd188c0175d70651533fd16efcd415e0761b8223023026380efec5 -size 364660 +oid sha256:601b33fd33765e0c29ed347c47cae850fce1f13e85f109e6a9ed8c9e8b564615 +size 421268