Skip to content

Upgrader for macOS MVP#1129

Closed
jamill wants to merge 15 commits into
microsoft:masterfrom
jamill:upgrader_mac
Closed

Upgrader for macOS MVP#1129
jamill wants to merge 15 commits into
microsoft:masterfrom
jamill:upgrader_mac

Conversation

@jamill
Copy link
Copy Markdown
Member

@jamill jamill commented May 9, 2019

This issue is to track the work for building the upgrade functionality for macOS. It will also contain a proof of concept for the end-to-end functionality. As the PRs for individual tasks are ready, I will link them here.

Tasks

Deferred / Followup Tasks

  • Automated tests for CopyDirectoryRecursive
  • netcore: NuGet package verification

@jamill jamill force-pushed the upgrader_mac branch 3 times, most recently from fdcb25b to 25cfb8e Compare May 24, 2019 03:02
Comment thread GVFS/GVFS.Common/NuGetUpgrade/NuGetFeed.cs Outdated
Copy link
Copy Markdown
Member

@wilbaker wilbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just finished a first pass over the changes and left some comments/questions

Comment thread GVFS/GVFS.Common/GVFSPlatform.cs Outdated

public abstract HashSet<string> UpgradeBlockingProcesses { get; }

public abstract bool SupportsInlineUpgrade { get; }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style suggestion: If SupportsInlineUpgrade is true on Mac, is it because the file system allows replacing files that are currently in use?

If so, IPlatformFileSystem might be a better place for this (renamed to something like SupportsReplacmentOfInUseFiles).

(On the surface I think this property looks similar to SupportsFileMode which lives in IPlatformFileSystem)

Comment thread GVFS/GVFS.Installer.Mac/scripts/Distribution.xml
Comment thread GVFS/GVFS.Common/ProcessHelper.cs Outdated
Comment thread GVFS/GVFS.Common/GVFSPlatform.cs Outdated
Comment thread GVFS/GVFS.Platform.POSIX/POSIXPlatform.cs Outdated
try
{
string platformKey = InstallManifest.WindowsPlatformKey;
string platformKey = "macOS";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move platformKey to GVFSPlatform?

(I am guessing the code is this way now just to get things working on the Mac)

Comment thread GVFS/GVFS.Common/NuGetUpgrade/NuGetUpgrader.cs
Comment thread GVFS/GVFS.Common/NuGetUpgrade/InstallActionInfo.cs Outdated
this.ReportInfoToConsole($"{Environment.NewLine}Installer launched in a new window. Do not run any git or gvfs commands until the installer has completed.");
if (supportsInlineUpgrade)
{
while (!this.processLauncher.HasExited)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use Process.WaitForExit here instead of loop+sleep?

Exception exception;
string args = string.Empty + (this.DryRun ? $" {DryRunOption}" : string.Empty) + (this.NoVerify ? $" {NoVerifyOption}" : string.Empty);
if (!this.processLauncher.TryStart(path, args, out exception))
if (!this.processLauncher.TryStart(path, args, !runUpgradeInline, out exception))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is runUpgradeInline related to useShellExecute?

@jamill jamill force-pushed the upgrader_mac branch 3 times, most recently from 24a4ada to 341d60b Compare May 30, 2019 02:25
@jamill jamill changed the title Upgrader for macOS Upgrader for macOS MVP Jun 5, 2019
@jamill jamill force-pushed the upgrader_mac branch 3 times, most recently from 3c5e356 to 5a9cb30 Compare June 11, 2019 02:16
jamill added 9 commits June 12, 2019 20:14
Different platform have different structures for where the upgrade
application and logs need to go. This change introduces the
architecture for making this platform specific.
The config file location currently exists in the same directory as the GVFS
service data directory. On Mac, the GVFS Service directory is per user, and not
per machine. Even if the service is per user on Mac, we still would like the
config to be per machine.

This change enables the GVFS config file to exist at a location independent of
the GVFS Service data directory. On Windows, the location will not change, but
on macOS, it will now exist in the GVFS binary location.
@jamill
Copy link
Copy Markdown
Member Author

jamill commented Jun 26, 2019

The individual PRs for an initial MVP have now all been merged in. I will close this PR as this work is complete. I will file a separate issue to track the remaining open issues.

@jamill jamill closed this Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants