Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enable macOS launcher#5291

Merged
TravisEz13 merged 7 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
thezim:macos-launcherthezim/PowerShell:macos-launcherCopy head branch name to clipboard
Nov 6, 2017
Merged

Enable macOS launcher#5291
TravisEz13 merged 7 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
thezim:macos-launcherthezim/PowerShell:macos-launcherCopy head branch name to clipboard

Conversation

@thezim

@thezim thezim commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

Notable change this time around.

  • Values set by script are "unset" in Info.plist by default to prevent conflicts if a fresh clone.
  • After packaging CFBundleIdentifier is set to random value to prevent it from being picked up by installer. An empty value could not be used because native defaults doesn't allow it.
  • The magic here is getting macOS to recognize the change in the plist file. plutil is enough to make this happen.

Fixes #5262

@TravisEz13

Copy link
Copy Markdown
Member

Can you go to https://travis-ci.org/profile/thezim?offset=0 and enable your repo then do another push? This will trigger a build with packaging.

@thezim

thezim commented Nov 2, 2017

Copy link
Copy Markdown
Contributor Author

@TravisEz13 Done.

@TravisEz13

Copy link
Copy Markdown
Member

Verified packaged correctly here: https://travis-ci.org/thezim/PowerShell/builds/296027725

Comment thread tools/packaging/packaging.psm1 Outdated

# Set permissions.
Start-NativeExecution {
find $macosapp | xargs chmod 755

@TravisEz13 TravisEz13 Nov 2, 2017

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.

Can you undo this when it's finished? Or remove the folder when it's done?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, good catch, commit added. I realized that 755 wasn't needed for everything so I only set what was absolutely needed and then restore to a default state post fpm.

@TravisEz13 TravisEz13 left a comment

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.

Can we not leave files with altered permission laying around?

@TravisEz13

TravisEz13 commented Nov 3, 2017

Copy link
Copy Markdown
Member

packaging built correctly here: https://travis-ci.org/thezim/PowerShell/jobs/296567451

@TravisEz13

Copy link
Copy Markdown
Member

relaunched AppVeyor due to myget failure..

Comment thread tools/packaging/packaging.psm1 Outdated
$newPackagePath = Join-Path $createdPackage.DirectoryName $newPackageName
$createdPackage = Rename-Item $createdPackage.FullName $newPackagePath -PassThru -Force:$Force
}
if($pscmdlet.ShouldProcess("Cleanup macOS launcher"))

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.

Should this cleanup code be moved to the if ($Environment.IsMacOS) block in the finally above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would agree. Since fpm is in a try, if it fails the next fatal error would be here leaving it in a bad state. I'll go ahead and move it.

As an aside I'm not unsure if the try should even be there for the fpm call. I would think you would want the build point of failure reported at the fpm call and not a dependancy later in the code.

@TravisEz13

Copy link
Copy Markdown
Member

Packaging build passed here: https://travis-ci.org/thezim/PowerShell/jobs/297030200

@TravisEz13

Copy link
Copy Markdown
Member

@PowerShell/powershell-maintainers @joeyaiello @SteveL-MSFT Since this previously regressed after working, I would consider this at least moderately risky. Do we want to take this for 6.0.0?
I think we should. I believe we have addressed the issues (thanks @thezim) and we shipped the last beta with this feature.

@thezim

thezim commented Nov 4, 2017

Copy link
Copy Markdown
Contributor Author

We should ensure if #5323 merges first that we include the UTI update to CFBundleIdentifier in the plist in this PR.

@TravisEz13 TravisEz13 changed the title Enable macOS launcher [Don't Merge] Enable macOS launcher Nov 5, 2017
@TravisEz13

Copy link
Copy Markdown
Member

#5323 was merged. I updated the title so we don't accidentally merge until the PR is updated.

@thezim

thezim commented Nov 5, 2017

Copy link
Copy Markdown
Contributor Author

UTI updated. Packaging build passed.

@TravisEz13 TravisEz13 changed the title [Don't Merge] Enable macOS launcher Enable macOS launcher Nov 6, 2017
@daxian-dbw

Copy link
Copy Markdown
Member

@TravisEz13 I agree that we should take this fix for 6.0.0, since the beta.9 macOS package already had the macOS launcher change.

@adityapatwardhan adityapatwardhan left a comment

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.

I agree we should take this change.

@TravisEz13 TravisEz13 merged commit a674c51 into PowerShell:master Nov 6, 2017
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.