Commit Graph

179 Commits

Author SHA1 Message Date
Ben Hearsum
acc230a67b Bug 1794017: create a private browsing shortcut at install time r=bytesized,fluent-reviewers,flod
This is the same as the original patch, except for the added localization notes around the necessarily duplicated strings.

Differential Revision: https://phabricator.services.mozilla.com/D158800
2022-10-11 14:02:57 +00:00
Ben Hearsum
2f8dfb7913 Bug 1790809: stop creating private browsing shortcuts in the installer r=bytesized
It's important that this shortcut exists to avoid https://bugzilla.mozilla.org/show_bug.cgi?id=1762994. We were creating it in the installer to avoid first run I/O, with a fallback at runtime to catch zip builds and updates. Due to some of this code being in the installer and some of it in the browser, we ended up with two different strings. Unfortunately, this has resulted in a bug where we sometimes create two private shortcuts. This happens in at least two cases:
1) A localization has only translated one of those strings -- in which case we get an en-US string and a localized string
2) A localization has translated the strings differently -- in which case we get two localized, but slightly different, stings

Since the installer creation of the shortcut is an optimization, and the first run I/O is now on a background thread anyways, let's just get rid of the installer shortcut rather than trying to come up with a more complex fix for this.

Differential Revision: https://phabricator.services.mozilla.com/D157348
2022-09-14 19:25:16 +00:00
Ben Hearsum
8b2aa4c0eb Bug 1761291: use private browsing wrapper as target for Private Browsing shortcuts r=mhowell
This ensure the shortcuts will use the correct Visual Elements on the off chance they get pinned to the Start Menu.

Differential Revision: https://phabricator.services.mozilla.com/D151539
2022-08-03 13:49:05 +00:00
Nick Alexander
0052def849 Bug 1774082 - Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D152145
2022-08-02 19:40:38 +00:00
Iulian Moraru
c4ef492a26 Backed out 6 changesets (bug 1774083, bug 1774082) for causing xpcshell failures. CLOSED TREE
Backed out changeset 4056bc743e25 (bug 1774083)
Backed out changeset ad20680728cc (bug 1774083)
Backed out changeset 173c4519227f (bug 1774083)
Backed out changeset 54beca69e971 (bug 1774083)
Backed out changeset 1d9d80c75d9d (bug 1774082)
Backed out changeset 7b03aa4c49d1 (bug 1774082)
2022-08-02 02:46:47 +03:00
Nick Alexander
f8bd3c73a9 Bug 1774082 - Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D152145
2022-08-01 21:38:05 +00:00
Butkovits Atila
6fb2f0d42a Backed out 2 changesets (bug 1774082) for causing failure at test_windows_alert_service.js. CLOSED TREE
Backed out changeset a9553786b2ee (bug 1774082)
Backed out changeset da2ad41a6d10 (bug 1774082)
2022-08-01 01:40:13 +03:00
Nick Alexander
5e64346e20 Bug 1774082 - Make installer and uninstaller add/remove Toast Notification to/from registry. r=bhearsum,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D152145
2022-07-31 21:59:30 +00:00
Ben Hearsum
2d3e1f4c06 Bug 1778463: Firefox is pinned to the taskbar even though the "On my taskbar" checkbox is unchecked r=mhowell
The problem here ended up being that we lose the value of `AddTaskBarSC` once ExecCodeSegement is called -- which we do anytime we try to set ourselves as the default if the installer was run elevated.

Differential Revision: https://phabricator.services.mozilla.com/D151291
2022-07-11 12:09:06 +00:00
Ben Hearsum
61f736d38b Bug 1771951: add pin to taskbar support in the installer on Windows 10 & 11 r=mhowell
This patch starts pinning Firefox to the Taskbar by default on all supported Windows versions. The main addition here is a port of our existing taskbar pinning code for modern Windows 10 & 11 versions to an NSIS plugin (compiled version also included).

After discussion with a few stakeholders, we also decided that we will never pin during an update on Windows 10 or 11. (Arguably we could stop on Windows 7 & 8 as well - but I don't really see any harm in carrying forward our pre-existing behaviour there.) With this in mind, I dropped all the second pinning attempt code (which was only ever enabled for Windows 10).

Differential Revision: https://phabricator.services.mozilla.com/D148288
2022-06-27 16:31:36 +00:00
Cristian Tuns
438e10123e Backed out 2 changesets (bug 1771951) for causing build bustages on makensis.mk CLOSED TREE
Backed out changeset d5dc93904754 (bug 1771951)
Backed out changeset 9651db4a6e3f (bug 1771951)
2022-06-27 12:10:17 -04:00
Ben Hearsum
426b43c8c3 Bug 1771951: add pin to taskbar support in the installer on Windows 10 & 11 r=mhowell
This patch starts pinning Firefox to the Taskbar by default on all supported Windows versions. The main addition here is a port of our existing taskbar pinning code for modern Windows 10 & 11 versions to an NSIS plugin (compiled version also included).

After discussion with a few stakeholders, we also decided that we will never pin during an update on Windows 10 or 11. (Arguably we could stop on Windows 7 & 8 as well - but I don't really see any harm in carrying forward our pre-existing behaviour there.) With this in mind, I dropped all the second pinning attempt code (which was only ever enabled for Windows 10).

Differential Revision: https://phabricator.services.mozilla.com/D148288
2022-06-27 15:52:24 +00:00
smolnar
14540b8f53 Merge mozilla-central to autoland. a=merge 2022-06-23 18:59:00 +03:00
Ben Hearsum
03c5d6d051 Bug 1762994: ensure a Private Browsing shortcut exists as early as possible r=mhowell,fluent-reviewers
This fixes a bug where pinning a Private Browsing window to Taskbar with the windows context menu item pins regular Firefox instead. This happens because Windows cannot find an appropriate shortcut (presumably by looking for one with the right AUMID), and ends up creating its own instead -- with almost entirely incorrect metadata.

With this, we'll be creating one at a few points (if it doesn't already exist):
* Installer - for new installs
* Post-Update - to make sure we get one when people update to the first version where we pref this on
* Startup idle - for zip installs, and to handle any other possible case where the shortcut doesn't exist

Until we enable separation of Private Windows by default I've pref'ed off this behaviour (otherwise a user may pin the shortcut to the Taskbar, but the app will launch into a different icon).

Differential Revision: https://phabricator.services.mozilla.com/D147702
2022-06-23 15:15:42 +00:00
smolnar
c2405f3e49 Backed out 2 changesets (bug 1771951) for causing bug 1776170. CLOSED TREE
Backed out changeset 3a789d06604f (bug 1771951)
Backed out changeset 59eac90984cb (bug 1771951)
2022-06-23 15:14:20 +03:00
Ben Hearsum
787beefb48 Bug 1771951: add pin to taskbar support in the installer on Windows 10 & 11 r=mhowell
This patch starts pinning Firefox to the Taskbar by default on all supported Windows versions. The main addition here is a port of our existing taskbar pinning code for modern Windows 10 & 11 versions to an NSIS plugin (compiled version also included).

After discussion with a few stakeholders, we also decided that we will never pin during an update on Windows 10 or 11. (Arguably we could stop on Windows 7 & 8 as well - but I don't really see any harm in carrying forward our pre-existing behaviour there.) With this in mind, I dropped all the second pinning attempt code (which was only ever enabled for Windows 10).

Differential Revision: https://phabricator.services.mozilla.com/D148288
2022-06-22 14:19:50 +00:00
Ben Hearsum
bbfdf38c8b Bug 1616355: attribution postSigningData should be per installation r=nalexander
about:newtab#asrouter actually depends on the ability to be able to write to postSigningData at the moment, so this will break that in any circumstance where the running Firefox cannot write to the installation directory. This code is only used for dev & qa testing though, and I've been told this is OK (and we may change how it works to avoid writing the file at all).

Differential Revision: https://phabricator.services.mozilla.com/D144167
2022-05-03 20:04:28 +00:00
Nick Alexander
5c5236b92c Bug 1763824 - Always add/update FirefoxPDF-* ProgID in Windows PostUpdate. r=mhowell,bhearsum
This was simply an oversight on my part: I didn't appreciate that
freshly introduced ProgIDs need to be added or updated unconditionally
in PostUpdate.

I've tested this by copying the fresh `helper.exe` into an existing
installation directory, running `uninstall\helper.exe /PostUpdate`
manually, verifying the expected ProgIDs exist in HKCR, and then
verifying that "Make default" within Firefox succeeds.

At some point we should do the same for `FirefoxHTML-*` and
`FirefoxURL-*`, but this patch should be uplifted to Beta 100 and I
don't want to introduce additional risk.

Differential Revision: https://phabricator.services.mozilla.com/D143661
2022-04-14 21:12:39 +00:00
Nick Alexander
230c89fc1f Bug 1761389 - Add and use new PDF-specific document icon on Windows. r=bhearsum
The new icon is not channel-specific, but I've kept it in branding
since it's possible that we'll distinguish in the future.

Differential Revision: https://phabricator.services.mozilla.com/D142396
2022-04-01 20:29:18 +00:00
Nick Alexander
15e42e7551 Bug 1761389 - Pre: Use defines rather than inline numerals for icon indices. r=bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D142395
2022-04-01 20:29:18 +00:00
Nick Alexander
da773545fd Bug 1762100 - Part 2: Add and use FirefoxPDF-... file association. r=bhearsum
This is simply the mechanics of s/FirefoxHTML-.../FirefoxPDF-.../.  We
need this to alter the description ("Firefox PDF Document") and, in
subsequent commits, the display icon.

Generally I tried to keep alphabetical ordering: FirefoxHTML-...,
FirefoxPDF-..., FirefoxURL-...; and I generally tried to use the '-'
suffix to disambiguate the older FirefoxHTML from the newer suffixed
FirefoxHTML-... form.

Differential Revision: https://phabricator.services.mozilla.com/D142302
2022-03-30 03:41:59 +00:00
Ben Hearsum
1e7aeda5c7 No bug: remove dead installer code around Metro tiles. r=bytesized
This code used to eventually take some action (`RegisterStartMenuTile`) on Windows 8, but that was removed in https://hg.mozilla.org/mozilla-central/rev/bf1d0c9242d9 making this effectiely a no-op.

Differential Revision: https://phabricator.services.mozilla.com/D135065
2022-01-04 18:10:36 +00:00
Nick Alexander
43a36b7a80 Bug 1243603 - Telemetry for when Windows invokes Firefox to handle a registered file type or protocol. r=Gijs
The `-osint` flag is used as the signal that Windows is invoking
Firefox to handle a file type or protocol.  The `-osint` flag was
introduced in order to mitigate security breaches due to poor argument
quoting (by consumers invoking Firefox); to use it for this new
purpose, it must be preserved for downstream consumers to react to.
Alternately, some marker of the flag could be maintained.  Since the
flag needs to transit through the launcher process, I've elected to
simply not strip it as we validate command lines, and to accommodate
it further downstream.  (It looks like Thunderbird already
accommodates `-osint`: see
https://searchfox.org/comm-central/rev/3e8f926de9ea09945b237177eb6d489c70318f0e/mail/components/MessengerContentHandler.jsm#568.)

The telemetry in this patch achieves two purposes.  The first is to
count the number of times Firefox is invoked to handle a registered
file type or protocol: for this, a new keyed uint scalar was added.
File types start with a ".", just like on Windows; protocols
(equivalently, the schemes used to identify them) do not start with a
".".

The second is to identify times when Firefox is launched (i.e., it was
not already running) to handle a registered file type or protocol.

This generalizes the existing `os.environment.launch_method`,
introducing `os.environment.launched_to_handle` and
`os.environment.invoked_to_handle` string scalars, which record the
file type or protocol.

The command line state `STATE_INITIAL_LAUNCH` is used to discriminate
launching from invoking.

Differential Revision: https://phabricator.services.mozilla.com/D132288
2021-12-11 00:00:55 +00:00
Jon Bauman
96f5de07a4 Bug 1735898 - Register as an AVIF handler. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D129064
2021-10-20 20:23:22 +00:00
Adam Gashlin
7b358dc49a Bug 1730290 - Replace $LocalAppData in NSIS. r=bytesized,mhowell
1. $LocalAppData behavior changes in NSIS 3.02, previously it always
used CSIDL_LOCAL_APPDATA but it now depends on context, work around
that by directly calling SHGetSpecialFolderPathW.

2. Refactor several other calls to SHGetSpecialFolderPathW for
CSIDL_COMMON_APPDATA and CSIDL_PROGRAMS.

3. Remove broken default path fallback to $APPDATA. I was in this
code for 1. and realized it hadn't worked properly in the full
installer since bug 367539, and it must have never worked in the stub.

4. Remove unused CleanUpdateDirectories and DeleteRelativeProfiles
macros rather than trying to fix them.

Differential Revision: https://phabricator.services.mozilla.com/D125490
2021-09-14 21:10:26 +00:00
Nick Alexander
f3d0bf9240 Bug 1713393 - Remove version number from DisplayName in Firefox uninstall data on Windows. r=agashlin
The goal is to make it easier for admins to have a generic way to
locate Firefox for uninstall, without needing to know the target
version to uninstall.  The version in the `DisplayName` is extraneous:
it's in the `DisplayVersion` field, and users can see it when you
click on it in "Add/Remove Programs".  Automated consumers may prefer
to read the `Comments` field of the Firefox uninstall data instead,
which remains identical to the `DisplayName` before this change.

Differential Revision: https://phabricator.services.mozilla.com/D116648
2021-06-04 22:03:42 +00:00
Gabriele Svelto
1732fd5c52 Bug 1682511 - Add the WER module to the installer and record its path in the Windows registry r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D107637
2021-04-07 07:55:23 +00:00
Nick Alexander
bbb2425ab0 Bug 1691951 - Make Windows install not register "ftp" protocol handler. r=application-update-reviewers,bytesized
For all channels, this commit:

1. stops registering the ftp protocol handler at install time;
2. actively unregisters the ftp protocol handler at postupdate time;
3. stops unregistering the ftp protocol handler at uninstall time.

The rationale for 3) is that by the time a `helper.exe` with this
change is in place, the `postupdate` step has already run and
unregistered the ftp protocol handler.

Differential Revision: https://phabricator.services.mozilla.com/D104735
2021-02-22 17:52:24 +00:00
Adam Gashlin
4850365fd4 Bug 1681574: Remove the old update agent skeleton. r=nalexander
I'm keeping the --enable-update-agent config option and the corresponding
MOZ_UPDATE_AGENT config flag and define, as these should still be useful.

As we never shipped this there is no need to keep anything around to
clean up the scheduled tasks.

Differential Revision: https://phabricator.services.mozilla.com/D99574
2020-12-15 19:00:25 +00:00
Adam Gashlin
a1012d5f88 Bug 1681207: Remove unwanted WDBA shortcut on post update and uninstall. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D99303
2020-12-10 04:28:36 +00:00
Masatoshi Kimura
4a6722ac62 Bug 1652412 - Do not set as deault .pdf, .svg, ftp:, and mailto: handlers on Windows 7. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D98580
2020-12-03 23:05:01 +00:00
Kirk Steuber
17e54a282f Bug 1658711 - Ensure that the PostUpdate task is called reliably r=mhowell
The PostUpdate task must always be called as the unelevated user, even if we didn't use the service, in order to ensure that we register the WDBA. Additionally, the PostUpdate task should always be run synchronously so that the elevated and unelevated PostUpdate tasks are guaranteed to run in order. This is important since the elevated PostUpdate unregisters the task and the unelevated PostUpdate re-registers it.

Differential Revision: https://phabricator.services.mozilla.com/D87509
2020-08-18 22:40:28 +00:00
Molly Howell
907c514555 Bug 1638509 - Enable the limited PostUpdate to update the WDBA task. r=agashlin,bytesized
This also requires removing the registry value cleanup from the unregister-task
command and adding a new uninstall command which removes both the task and the
registry values, because this patch now runs unregister-task during updates to
remove the task before re-adding it, and that needs to leave the registry alone.

Differential Revision: https://phabricator.services.mozilla.com/D76354
2020-05-26 15:38:21 +00:00
Nick Alexander
fa5ee0a1f0 Bug 1629636 - Make Windows install not register "ftp" protocol handler for NIGHTLY_BUILD. r=mhowell
For builds with ftp disabled (see below), this commit:

1) stops registering the ftp protocol handler at install time;
2) actively unregisters the ftp protocol handler at postupdate time;
3) stops unregistering the ftp protocol handler at uninstall time.

The rationale for 3) is that by the time a `helper.exe` with this
change is in place, the postupdate step has already run and
unregistered the ftp protocol handler.  This could, of course, fail,
and a fallback would be nice.  However having a guarded block, just
like everywhere else, will make it much more likely that the complete
removal of the ftp protocol will also cull the uninstall code.  I
prefer making the latter cleanup more likely to be complete.

The bool pref that disables ftp functionality is
"network.ftp.enabled", and at this time that defaults to
!NIGHTLY_BUILD.  In the {un}install process, there's no way to inspect
that pref dynamically, so we use !NIGHTLY_BUILD as well.

This opens a race window for developers to change the pref default
without changing the {un}install conditional at the same time.  It
would be possible to close that window by introducing a new configure
subst but given the imminent removal of the ftp protocol entirely it
doesn't seem necessary.

Differential Revision: https://phabricator.services.mozilla.com/D74503
2020-05-20 22:49:44 +00:00
Nick Alexander
6e0903c2fb Bug 1506416 - Enable setting Firefox as default PDF reader on Windows. r=mhowell
Comparing to .webp, we already do two of three things needed.  This
arranges the last thing: registering the file association.

Differential Revision: https://phabricator.services.mozilla.com/D76244
2020-05-20 22:45:15 +00:00
Molly Howell
57baf00c3b Bug 1619122 - List more supported file types in our Applications registry key. r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D68062
2020-04-04 03:35:09 +00:00
Molly Howell
c3d5d57d92 Bug 1624388 - Properly expose default browser agent build flag to installer. r=bytesized,agashlin
Also fix two other installer problems that were getting missed because of this:
one build error in PostUpdate and one use of an uninitialized value in the
installer, causing it to record that it had not registered the task when it had.

Differential Revision: https://phabricator.services.mozilla.com/D67915
2020-03-23 20:21:36 +00:00
Molly Howell
bee2bd3df9 Bug 1602463 Part 4 - Register/unregister the default browser agent scheduled task during install/uninstall. r=agashlin,bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D61891
2020-03-16 18:32:58 +00:00
Mihai Alexandru Michis
583b30fd99 Backed out 5 changesets (bug 1602463) for causing diffoscope failures.
CLOSED TREE

Backed out changeset ff565862e785 (bug 1602463)
Backed out changeset 2583a2703658 (bug 1602463)
Backed out changeset 8f3de97c5d50 (bug 1602463)
Backed out changeset be11972a8149 (bug 1602463)
Backed out changeset 5a6058d8266c (bug 1602463)
2020-03-16 20:29:20 +02:00
Molly Howell
e3ab76a2c4 Bug 1602463 Part 4 - Register/unregister the default browser agent scheduled task during install/uninstall. r=agashlin,bytesized,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D61891
2020-03-16 15:12:33 +00:00
Adam Gashlin
f58dee5d28 Bug 1515451 Part 3 - Install, uninstall update agent r=mhowell
This was originally planned in bugs 1458282 and 1458283, but it
fits naturally in this patch series.

Differential Revision: https://phabricator.services.mozilla.com/D37141
2020-03-11 22:33:12 +00:00
Mihai Alexandru Michis
cc5ad52dd6 Backed out 3 changesets (bug 1515451) for causing sm failures in components/updateagent/Cargo.toml
CLOSED TREE

Backed out changeset 85ea1d36da66 (bug 1515451)
Backed out changeset 779bc1fa07ae (bug 1515451)
Backed out changeset 0c6771b60b76 (bug 1515451)
2020-03-11 22:03:19 +02:00
Adam Gashlin
94ca1fc5a6 Bug 1515451 Part 3 - Install, uninstall update agent r=mhowell
This was originally planned in bugs 1458282 and 1458283, but it
fits naturally in this patch series.

Differential Revision: https://phabricator.services.mozilla.com/D37141
2020-03-09 15:31:14 +00:00
Hal Wine
729f09eb1c Bug 675428 - register Firefox to handle mailto URLs in Windows r=mhowell
Allow Firefox to be specified as a handler for 'mailto:' urls on Windows.

Re commit of Phabricator differential D2247 -- that's too old to be reused.

Differential Revision: https://phabricator.services.mozilla.com/D65438
2020-03-10 19:06:29 +00:00
Molly Howell
0a2ed4a0ea Bug 1606596 - Install/uninstall an HKCR\Applications key for firefox.exe. r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D58994
2020-01-10 21:34:37 +00:00
Alex Henrie
5731265fe1 Bug 1607668 - Remove check for Windows XP's SharedAccess service. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D59076
2020-01-08 15:47:28 +00:00
Masatoshi Kimura
a48b54a512 Bug 1590693 - Unship empty chrome.manifest files. r=glandium
Bug 1295542 added empty chrome.manifest files to prevent malware from abusing
them. This workaround is no longer necessary because Firefox stopped reading
chrome.manifest outside omni.ja since bug 1543761.

Differential Revision: https://phabricator.services.mozilla.com/D55954
2019-12-12 11:13:42 +00:00
Molly Howell
1552f9ee7a Bug 1592968 Followup - Write the pinned to taskbar flag in a place the unelevated helper can write to. r=agashlin
The previous patch didn't work because the helper running as the unelevated
user is the only one that can read the pref out of its user registry hive,
which is where Firefox has to write it, but then since it's limited it can't
write to either the shortcut log or to HKLM. So everything has to happen in
HKCU so that the unelevated helper can both read and write where it needs to
read and write to.

Differential Revision: https://phabricator.services.mozilla.com/D53113
2019-11-15 00:31:07 +00:00
Molly Howell
65bc5bb695 Bug 1592968 - Use the registry to record creating a taskbar pin. r=agashlin
My initial idea of using the shortcuts log to store this information didn't
work out because the helper, when run by an updater which was run by the
maintenance service, doesn't get write permissions on that file.

Differential Revision: https://phabricator.services.mozilla.com/D52276
2019-11-14 21:10:07 +00:00
xueli
6f3fca8024 Bug 1570477 - Add webp handler to correct place. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D52737
2019-11-12 21:48:50 +00:00