Merge branch 'msix'
|
@ -9,6 +9,7 @@ patches/hide-passwordmgr.patch
|
||||||
patches/librewolf-pref-pane.patch
|
patches/librewolf-pref-pane.patch
|
||||||
patches/librewolf-prefs.patch
|
patches/librewolf-prefs.patch
|
||||||
patches/mozilla_dirs.patch
|
patches/mozilla_dirs.patch
|
||||||
|
patches/msix.patch
|
||||||
patches/remove_addons.patch
|
patches/remove_addons.patch
|
||||||
patches/rfp-performance-api.patch
|
patches/rfp-performance-api.patch
|
||||||
patches/sed-patches/allow-searchengines-non-esr.patch
|
patches/sed-patches/allow-searchengines-non-esr.patch
|
||||||
|
|
263
patches/msix.patch
Normal file
|
@ -0,0 +1,263 @@
|
||||||
|
# LibreWolf msix.patch
|
||||||
|
#
|
||||||
|
# Author: Malte Jürgens <maltejur@dismail.de>
|
||||||
|
# Description: Allows us to build a msix for the Microsoft Store
|
||||||
|
# Last Updated: 2023-01-26
|
||||||
|
# License: MPL 2.0
|
||||||
|
--- a/browser/installer/windows/msix/AppxManifest.xml.in
|
||||||
|
+++ b/browser/installer/windows/msix/AppxManifest.xml.in
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
-- License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||||
|
-- You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
+<!-- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy
|
||||||
|
+of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
<!-- #filter substitution -->
|
||||||
|
<Package
|
||||||
|
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||||
|
@@ -14,7 +13,8 @@
|
||||||
|
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||||
|
IgnorableNamespaces="uap uap2 uap3 uap10 rescap">
|
||||||
|
|
||||||
|
- <Identity Name="@APPX_IDENTITY@" Publisher="@APPX_PUBLISHER@" Version="@APPX_VERSION@" ProcessorArchitecture="@APPX_ARCH@" />
|
||||||
|
+ <Identity Name="@APPX_IDENTITY@" Publisher="@APPX_PUBLISHER@" Version="@APPX_VERSION@"
|
||||||
|
+ ProcessorArchitecture="@APPX_ARCH@" />
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>@APPX_DISPLAYNAME@</DisplayName>
|
||||||
|
<PublisherDisplayName>@APPX_PUBLISHER_DISPLAY_NAME@</PublisherDisplayName>
|
||||||
|
@@ -25,27 +25,34 @@
|
||||||
|
</uap10:PackageIntegrity>
|
||||||
|
</Properties>
|
||||||
|
<Resources>
|
||||||
|
-@APPX_RESOURCE_LANGUAGE_LIST@
|
||||||
|
+ @APPX_RESOURCE_LANGUAGE_LIST@
|
||||||
|
</Resources>
|
||||||
|
<Dependencies>
|
||||||
|
- <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.1" />
|
||||||
|
+ <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0"
|
||||||
|
+ MaxVersionTested="10.0.19041.1" />
|
||||||
|
</Dependencies>
|
||||||
|
<Capabilities>
|
||||||
|
<rescap:Capability Name="runFullTrust" />
|
||||||
|
</Capabilities>
|
||||||
|
<Applications>
|
||||||
|
- <Application Id="App" Executable="VFS\ProgramFiles\@APPX_INSTDIR@\@MOZ_APP_NAME@.exe" EntryPoint="Windows.FullTrustApplication">
|
||||||
|
- <uap:VisualElements BackgroundColor="#20123A" DisplayName="@MOZ_APP_DISPLAYNAME@" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="@MOZ_APP_DISPLAYNAME@">
|
||||||
|
- <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
|
||||||
|
+ <Application Id="App" Executable="VFS\ProgramFiles\@APPX_INSTDIR@\@MOZ_APP_NAME@.exe"
|
||||||
|
+ EntryPoint="Windows.FullTrustApplication">
|
||||||
|
+ <uap:VisualElements BackgroundColor="#FFFFFF" DisplayName="@MOZ_APP_DISPLAYNAME@"
|
||||||
|
+ Square150x150Logo="Assets\Square150x150Logo.png"
|
||||||
|
+ Square44x44Logo="Assets\Square44x44Logo.png" Description="@MOZ_APP_DISPLAYNAME@">
|
||||||
|
+ <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"
|
||||||
|
+ Square310x310Logo="Assets\LargeTile.png" Square71x71Logo="Assets\SmallTile.png">
|
||||||
|
<uap:ShowNameOnTiles>
|
||||||
|
- <uap:ShowOn Tile="square150x150Logo"/>
|
||||||
|
- <uap:ShowOn Tile="wide310x150Logo"/>
|
||||||
|
- <uap:ShowOn Tile="square310x310Logo"/>
|
||||||
|
+ <uap:ShowOn Tile="square150x150Logo" />
|
||||||
|
+ <uap:ShowOn Tile="wide310x150Logo" />
|
||||||
|
+ <uap:ShowOn Tile="square310x310Logo" />
|
||||||
|
</uap:ShowNameOnTiles>
|
||||||
|
</uap:DefaultTile>
|
||||||
|
</uap:VisualElements>
|
||||||
|
<Extensions>
|
||||||
|
- <uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication" Executable="VFS\ProgramFiles\@APPX_INSTDIR@\@MOZ_APP_NAME@.exe">
|
||||||
|
+ <uap3:Extension Category="windows.appExecutionAlias"
|
||||||
|
+ EntryPoint="Windows.FullTrustApplication"
|
||||||
|
+ Executable="VFS\ProgramFiles\@APPX_INSTDIR@\@MOZ_APP_NAME@.exe">
|
||||||
|
<uap3:AppExecutionAlias>
|
||||||
|
<desktop:ExecutionAlias Alias="@MOZ_APP_NAME@.exe" />
|
||||||
|
</uap3:AppExecutionAlias>
|
||||||
|
@@ -54,9 +61,10 @@
|
||||||
|
<uap3:FileTypeAssociation Name="htm">
|
||||||
|
<uap:SupportedFileTypes>
|
||||||
|
<!-- Keep synchronized with
|
||||||
|
- https://searchfox.org/mozilla-central/source/browser/installer/windows/nsis/shared.nsh
|
||||||
|
- and `os.environment.launched_to_handle` and `os.environment.invoked_to_handle` telemetry in
|
||||||
|
- https://searchfox.org/mozilla-central/source/browser/components/BrowserContentHandler.jsm. -->
|
||||||
|
+ https://searchfox.org/mozilla-central/source/browser/installer/windows/nsis/shared.nsh
|
||||||
|
+ and `os.environment.launched_to_handle` and `os.environment.invoked_to_handle`
|
||||||
|
+ telemetry in
|
||||||
|
+ https://searchfox.org/mozilla-central/source/browser/components/BrowserContentHandler.jsm. -->
|
||||||
|
<uap:FileType>.avif</uap:FileType>
|
||||||
|
<uap:FileType>.htm</uap:FileType>
|
||||||
|
<uap:FileType>.html</uap:FileType>
|
||||||
|
@@ -95,44 +103,18 @@
|
||||||
|
<com:Extension Category="windows.comServer">
|
||||||
|
<com:ComServer>
|
||||||
|
<com:SurrogateServer DisplayName="NotificationServer"
|
||||||
|
- AppId="@MOZ_INOTIFICATIONACTIVATION_CLSID@">
|
||||||
|
+ AppId="@MOZ_INOTIFICATIONACTIVATION_CLSID@">
|
||||||
|
<com:Class Id="@MOZ_INOTIFICATIONACTIVATION_CLSID@"
|
||||||
|
- Path="VFS\ProgramFiles\@APPX_INSTDIR@\notificationserver.dll"
|
||||||
|
- ThreadingModel="Both" />
|
||||||
|
+ Path="VFS\ProgramFiles\@APPX_INSTDIR@\notificationserver.dll"
|
||||||
|
+ ThreadingModel="Both" />
|
||||||
|
</com:SurrogateServer>
|
||||||
|
</com:ComServer>
|
||||||
|
</com:Extension>
|
||||||
|
<desktop:Extension Category="windows.toastNotificationActivation">
|
||||||
|
- <desktop:ToastNotificationActivation ToastActivatorCLSID="@MOZ_INOTIFICATIONACTIVATION_CLSID@" />
|
||||||
|
+ <desktop:ToastNotificationActivation
|
||||||
|
+ ToastActivatorCLSID="@MOZ_INOTIFICATIONACTIVATION_CLSID@" />
|
||||||
|
</desktop:Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
- <Extensions>
|
||||||
|
- <!-- These COM registrations allow Windows/MSAA to access Firefox accessibility features. -->
|
||||||
|
- <com:Extension Category="windows.comInterface">
|
||||||
|
- <com:ComInterface>
|
||||||
|
- <com:ProxyStub DisplayName="AccessibleHandler"
|
||||||
|
- Id="@MOZ_IGECKOBACKCHANNEL_IID@"
|
||||||
|
- Path="VFS\ProgramFiles\@APPX_INSTDIR@\AccessibleHandler.dll" />
|
||||||
|
- <com:ProxyStub DisplayName="AccessibleMarshal"
|
||||||
|
- Id="1814ceeb-49e2-407f-af99-fa755a7d2607"
|
||||||
|
- Path="VFS\ProgramFiles\@APPX_INSTDIR@\AccessibleMarshal.dll" />
|
||||||
|
- <com:Interface Id="@MOZ_IGECKOBACKCHANNEL_IID@"
|
||||||
|
- ProxyStubClsid="@MOZ_IGECKOBACKCHANNEL_IID@" />
|
||||||
|
- <com:Interface Id="@MOZ_IHANDLERCONTROL_IID@"
|
||||||
|
- ProxyStubClsid="@MOZ_IGECKOBACKCHANNEL_IID@"
|
||||||
|
- AsynchronousInterface="@MOZ_ASYNCIHANDLERCONTROL_IID@" />
|
||||||
|
- <com:Interface Id="@MOZ_ASYNCIHANDLERCONTROL_IID@"
|
||||||
|
- ProxyStubClsid="@MOZ_IGECKOBACKCHANNEL_IID@"
|
||||||
|
- SynchronousInterface="@MOZ_IHANDLERCONTROL_IID@" />
|
||||||
|
- <com:Interface Id="4e747be5-2052-4265-8af0-8ecad7aad1c0"
|
||||||
|
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
|
||||||
|
- <com:Interface Id="1814ceeb-49e2-407f-af99-fa755a7d2607"
|
||||||
|
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
|
||||||
|
- <com:Interface Id="0d68d6d0-d93d-4d08-a30d-f00dd1f45b24"
|
||||||
|
- ProxyStubClsid="1814ceeb-49e2-407f-af99-fa755a7d2607" />
|
||||||
|
- </com:ComInterface>
|
||||||
|
- </com:Extension>
|
||||||
|
- </Extensions>
|
||||||
|
-</Package>
|
||||||
|
+</Package>
|
||||||
|
\ No newline at end of file
|
||||||
|
--- a/python/mozbuild/mozbuild/mach_commands.py
|
||||||
|
+++ b/python/mozbuild/mozbuild/mach_commands.py
|
||||||
|
@@ -2325,7 +2325,7 @@ def repackage_msi(
|
||||||
|
@CommandArgument(
|
||||||
|
"--vendor",
|
||||||
|
type=str,
|
||||||
|
- default="Mozilla",
|
||||||
|
+ default=None,
|
||||||
|
required=False,
|
||||||
|
help="The vendor to use in the Package/Identity/Name string to use in the App Manifest."
|
||||||
|
+ " Defaults to 'Mozilla'.",
|
||||||
|
@@ -2462,7 +2462,7 @@ def repackage_msix(
|
||||||
|
command_context.topsrcdir,
|
||||||
|
channel=channel,
|
||||||
|
arch=arch,
|
||||||
|
- displayname=identity_name,
|
||||||
|
+ identity=identity_name,
|
||||||
|
vendor=vendor,
|
||||||
|
publisher=publisher,
|
||||||
|
publisher_display_name=publisher_display_name,
|
||||||
|
--- a/python/mozbuild/mozbuild/repackaging/msix.py
|
||||||
|
+++ b/python/mozbuild/mozbuild/repackaging/msix.py
|
||||||
|
@@ -97,7 +97,7 @@ def find_sdk_tool(binary, log=None):
|
||||||
|
finder = FileFinder(sdk)
|
||||||
|
|
||||||
|
# TODO: handle running on ARM.
|
||||||
|
- is_64bits = sys.maxsize > 2 ** 32
|
||||||
|
+ is_64bits = sys.maxsize > 2**32
|
||||||
|
arch = "x64" if is_64bits else "x86"
|
||||||
|
|
||||||
|
for p, f in finder.find(
|
||||||
|
@@ -122,68 +122,19 @@ def get_embedded_version(version, buildid):
|
||||||
|
the dotted quad to be identically 0, so we enforce that here.
|
||||||
|
"""
|
||||||
|
|
||||||
|
- # It's irritating to roll our own version parsing, but the tree doesn't seem
|
||||||
|
- # to contain exactly what we need at this time.
|
||||||
|
- version = version.rsplit("esr", 1)[0]
|
||||||
|
- alpha = "a" in version
|
||||||
|
-
|
||||||
|
- tail = None
|
||||||
|
- if "a" in version:
|
||||||
|
- head, tail = version.rsplit("a", 1)
|
||||||
|
- if tail != "1":
|
||||||
|
- # Disallow anything beyond `X.Ya1`.
|
||||||
|
- raise ValueError(
|
||||||
|
- f"Alpha version not of the form X.0a1 is not supported: {version}"
|
||||||
|
- )
|
||||||
|
- tail = buildid
|
||||||
|
- elif "b" in version:
|
||||||
|
- head, tail = version.rsplit("b", 1)
|
||||||
|
- if len(head.split(".")) > 2:
|
||||||
|
- raise ValueError(
|
||||||
|
- f"Beta version not of the form X.YbZ is not supported: {version}"
|
||||||
|
- )
|
||||||
|
- elif "rc" in version:
|
||||||
|
- head, tail = version.rsplit("rc", 1)
|
||||||
|
- if len(head.split(".")) > 2:
|
||||||
|
- raise ValueError(
|
||||||
|
- f"Release candidate version not of the form X.YrcZ is not supported: {version}"
|
||||||
|
- )
|
||||||
|
- else:
|
||||||
|
- head = version
|
||||||
|
-
|
||||||
|
- components = (head.split(".") + ["0", "0", "0"])[:3]
|
||||||
|
- if tail:
|
||||||
|
- components[2] = tail
|
||||||
|
-
|
||||||
|
- if alpha:
|
||||||
|
- # Nightly builds are all `X.0a1`, which isn't helpful. Include build ID
|
||||||
|
- # to disambiguate. But each part of the dotted quad is 16 bits, so we
|
||||||
|
- # have to squash.
|
||||||
|
- if components[1] != "0":
|
||||||
|
- # Disallow anything beyond `X.0a1`.
|
||||||
|
- raise ValueError(
|
||||||
|
- f"Alpha version not of the form X.0a1 is not supported: {version}"
|
||||||
|
- )
|
||||||
|
+ [ver, rel] = version.split("-")
|
||||||
|
|
||||||
|
- # Last two digits only to save space. Nightly builds in 2066 and 2099
|
||||||
|
- # will be impacted, but future us can deal with that.
|
||||||
|
- year = buildid[2:4]
|
||||||
|
- if year[0] == "0":
|
||||||
|
- # Avoid leading zero, like `.0YMm`.
|
||||||
|
- year = year[1:]
|
||||||
|
- month = buildid[4:6]
|
||||||
|
- day = buildid[6:8]
|
||||||
|
- if day[0] == "0":
|
||||||
|
- # Avoid leading zero, like `.0DHh`.
|
||||||
|
- day = day[1:]
|
||||||
|
- hour = buildid[8:10]
|
||||||
|
+ ver_parts = ver.split(".")
|
||||||
|
+ ver_parts += ["0"] * (3 - len(ver_parts))
|
||||||
|
|
||||||
|
- components[1] = "".join((year, month))
|
||||||
|
- components[2] = "".join((day, hour))
|
||||||
|
-
|
||||||
|
- version = "{}.{}.{}.0".format(*components)
|
||||||
|
-
|
||||||
|
- return version
|
||||||
|
+ return ".".join(
|
||||||
|
+ [
|
||||||
|
+ ver_parts[0],
|
||||||
|
+ str(100 * int(ver_parts[1]) + int(ver_parts[2])),
|
||||||
|
+ str(int(rel) * 100),
|
||||||
|
+ "0",
|
||||||
|
+ ]
|
||||||
|
+ )
|
||||||
|
|
||||||
|
|
||||||
|
def get_appconstants_sys_mjs_values(finder, *args):
|
||||||
|
@@ -417,12 +368,7 @@ def repackage_msix(
|
||||||
|
)
|
||||||
|
|
||||||
|
first = next(values)
|
||||||
|
- if not displayname:
|
||||||
|
- displayname = "Mozilla {}".format(first)
|
||||||
|
-
|
||||||
|
- if channel == "beta":
|
||||||
|
- # Release (official) and Beta share branding. Differentiate Beta a little bit.
|
||||||
|
- displayname += " Beta"
|
||||||
|
+ displayname = displayname or first
|
||||||
|
|
||||||
|
second = next(values)
|
||||||
|
vendor = vendor or second
|
BIN
themes/browser/branding/librewolf/msix/Assets/Document44x44.png
Normal file
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 12 KiB |