Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stub executable for brave/Squirrel.Windows #1782

Closed
11 tasks done
bsclifton opened this issue Oct 22, 2018 · 5 comments
Closed
11 tasks done

Update stub executable for brave/Squirrel.Windows #1782

bsclifton opened this issue Oct 22, 2018 · 5 comments

Comments

@bsclifton
Copy link
Member

bsclifton commented Oct 22, 2018

This is a Windows specific task

When Squirrel updates are done for the browser-laptop product, replacement executables are downloaded (including the binary for the stub installer)

The proposed updates (below) will accomplish the following:

  • Folks that have default browser set as the Muon browser will now have Brave Core as the default
  • Existing shortcuts for the Muon product will launch into Brave Core (desktop, pinned to taskbar)
  • When automated install of brave-core is done, it can simply do an app.relaunch and the --import-from-muon (or similar) args should get propagated through to brave-core

This task involves the following steps:

  • Update our fork of Squirrel.Windows - the Squirrel stub executable needs to have the following logic:
    • check LOCAL install registry key at HKEY_CURRENT_USER\Software\BraveSoftware\Update\path
    • If key exists, modify path (to find application); replace Update\BraveUpdate.exe with Brave-Browser\Application\brave.exe
    • If this file exists, launch into this - DONE
    • If this key DOES NOT exist, check HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\BraveSoftware\Update\path
    • If key exists, modify path (to find application); replace Update\BraveUpdate.exe with Brave-Browser\Application\brave.exe
    • If this file exists, launch into this - DONE
    • If no registry keys were found, fall back to default behavior (load highest version app-X folder from directory stub installer lives in (ex: %USERPROFILE%\AppData\Local\brave\) - DONE
  • Update the executables in Muon Winstaller to have the new StubExecutable.exe
  • Update Muon Winstaller dependency in browser-laptop
  • Update product name (if possible) to Brave (old) or Brave (Muon)
@bsclifton bsclifton added this to the Muon => Brave Core migration milestone Oct 22, 2018
@bsclifton bsclifton self-assigned this Oct 22, 2018
bsclifton added a commit to brave/Squirrel.Windows that referenced this issue Oct 23, 2018
bsclifton added a commit to brave/Squirrel.Windows that referenced this issue Oct 23, 2018
Update logic in StubExecutable:
- Check for existence of brave-core (via registry) and launch
- If not found, fall back to existing logic for `app-x.x.x` folder

IncludePath for `Setup` project was modified to add path for `WinSock2.h`
@bsclifton
Copy link
Member Author

bsclifton commented Oct 23, 2018

Part one (Squirrel.Windows) implemented with brave/Squirrel.Windows#5

bsclifton added a commit to brave/muon-winstaller that referenced this issue Oct 23, 2018
Replace `StubExecutable.exe` with binary created with brave/Squirrel.Windows#5
@bsclifton
Copy link
Member Author

Part two (muon-winstaller) implemented with brave/muon-winstaller#7

bsclifton added a commit to brave/browser-laptop that referenced this issue Oct 23, 2018
(Work in progress - needs testing; doesn't use real muon-winstaller repo)
@bsclifton
Copy link
Member Author

For part four (product name), I have been able to successfully change the name that shows in Add / Remove Programs
screen shot 2018-10-23 at 10 55 52 am

However, I need to find the string that shows in the Default app settings screen (this is what it looks like now): 🙀
screen shot 2018-10-23 at 11 43 55 am

@bsclifton
Copy link
Member Author

bsclifton commented Oct 23, 2018

Found it! Key is located at HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCache\C:\Users\clifton\AppData\Local\Brave\Brave.exe.FriendlyAppName

screen shot 2018-10-23 at 1 13 39 pm

Changes to this will get overwritten though - so the proper way to make this change is to create a key like so:

[HKEY_CLASSES_ROOT\Applications\Brave.exe\shell\open]
"FriendlyAppName"="Brave (old)"

bsclifton added a commit to brave/browser-laptop that referenced this issue Oct 23, 2018
Updates friendly name of app (as shown in Default app settings) to `Brave (old)`
@bsclifton
Copy link
Member Author

bsclifton commented Oct 23, 2018

All work is complete here- contained in the following branch:
https://github.com/brave/browser-laptop/tree/muon-upgrade-windows

bsclifton added a commit to brave/browser-laptop that referenced this issue Oct 23, 2018
Updates friendly name of app (as shown in Default app settings) to `Brave (old)`
bsclifton added a commit to brave/Squirrel.Windows that referenced this issue Oct 25, 2018
bsclifton added a commit to brave/browser-laptop that referenced this issue Oct 26, 2018
(Work in progress - needs testing; doesn't use real muon-winstaller repo)
bsclifton added a commit to brave/browser-laptop that referenced this issue Oct 26, 2018
Updates friendly name of app (as shown in Default app settings) to `Brave (old)`
@bbondy bbondy removed this from the Muon => Brave Core migration milestone Oct 30, 2018
bsclifton added a commit to brave/browser-laptop that referenced this issue Nov 7, 2018
(Work in progress - needs testing; doesn't use real muon-winstaller repo)
bsclifton added a commit to brave/browser-laptop that referenced this issue Nov 7, 2018
- Updates friendly name of app (as shown in Default app settings) to `Brave (old)`

Fixes brave/brave-browser#1540
- Updated install script to check arch
- Added check for existing installs; install will be skipped if already installed
bsclifton added a commit to brave/browser-laptop that referenced this issue Nov 7, 2018
… stub executable.

Fixes brave/brave-browser#1540
Fixes brave/brave-browser#1782
- Stub executable detects brave-core and will launch it (instead of browser-laptop)
- Friendly name of app (as shown in Add/Remove programs and Default app settings) to `Brave (old)`
- Dependencies updated
bsclifton added a commit to brave/browser-laptop that referenced this issue Nov 7, 2018
… stub executable.

Fixes brave/brave-browser#1540
Fixes brave/brave-browser#1782
- Stub executable detects brave-core and will launch it (instead of browser-laptop)
- Friendly name of app (as shown in Add/Remove programs and Default app settings) to `Brave (old)`
- Dependencies updated
@bbondy bbondy removed this from the 0.56.x - Release Hotfix 1 milestone Nov 14, 2018
@bbondy bbondy added this to the 0.57.x - Beta milestone Nov 14, 2018
@kjozwiak kjozwiak added the QA/No label Nov 29, 2018
@bsclifton bsclifton modified the milestones: 0.57.x - Beta, Dupe / Invalid / Not actionable Nov 29, 2018
@bbondy bbondy removed this from the Dupe / Invalid / Not actionable milestone May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants