★ wanayoo — archive 1999 https://github.com/PowerShell/PowerShell/pull/7752Nouvelle recherche | Portail wanayoo
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

Make sure MSI build works when not preview #7752

Merged
merged 1 commit into from Sep 10, 2018

Conversation

Projects
None yet
4 participants
@TravisEz13
Copy link
Member

commented Sep 10, 2018

PR Summary

Make sure MSI build works when not preview

PR Checklist

@@ -165,7 +165,7 @@
<!-- add ourselves to %PATH% so pwsh.exe can be started from Windows PowerShell or cmd.exe -->
<Component Id="SetPath" Guid="{9dbb7763-7baf-48e7-b025-3bdedcb0632f}" KeyPath="yes">
<Condition>ADD_PATH=1</Condition>
<Environment Id="PATH" Action="set" Name="PATH" Part="last" Permanent="no" System="yes" Value="[$(var.ProductDirectoryName)]$(var.PwshPath)"/>
<Environment Id="PATH" Action="set" Name="PATH" Part="last" Permanent="no" System="yes" Value="$(var.PwshPath)"/>

This comment has been minimized.

Copy link
@daxian-dbw

daxian-dbw Sep 10, 2018

Member

Just curious on why we are making these changes. It looks to me this change doesn't change the behavior -- Value="[$(var.ProductDirectoryName)]$(var.PwshPath)" basically does the same before the change, isn't it?

This comment has been minimized.

Copy link
@TravisEz13

TravisEz13 Sep 10, 2018

Author Member

The variable is set to empty (meaning to delete the variable) in the non-preview case and the build fails

@bergmeister

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2018

@TravisEz13 Can you please explain briefly? To me it looks like this is a stylistic change only and not a fix

@TravisEz13

This comment has been minimized.

Copy link
Member Author

commented Sep 10, 2018

@bergmeister The variable is set to empty (meaning to delete the variable) in the non-preview case and the build fails

@TravisEz13 TravisEz13 merged commit 172a8a0 into PowerShell:master Sep 10, 2018

7 checks passed

CodeFactor No issues found.
Details
PowerShell-CI-linux #PR-7752-20180910.01 succeeded
Details
PowerShell-CI-macos #PR-7752-20180910.01 succeeded
Details
PowerShell-CI-windows #PR-7752-20180910.01 succeeded
Details
WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
license/cla All CLA requirements met.
Details
@TravisEz13

This comment has been minimized.

Copy link
Member Author

commented Sep 10, 2018

used admin to squash when windows CI was finished as this did not affect other platforms

TravisEz13 added a commit that referenced this pull request Sep 10, 2018

Make sure MSI build works when not preview (#7752)
The variable was set to empty (meaning to delete the variable) in the non-preview case and the build fails.
The fix avoids setting the variable to empty

@TravisEz13 TravisEz13 added this to the v6.1.0 milestone Sep 10, 2018

@TravisEz13 TravisEz13 deleted the TravisEz13:Fix_msi_for_6_1 branch Sep 10, 2018

@TravisEz13

This comment has been minimized.

Copy link
Member Author

commented Sep 10, 2018

@bergmeister feel free to continue the discussion. This was blocking the 6.1 builds so I merged so it's easier to take for the build.

[Environment]::SetEnvironmentVariable("UpgradeCodeX64", '31ab5147-9a97-4452-8443-d9709f0516e1', "Process")
[Environment]::SetEnvironmentVariable("UpgradeCodeX86", '1d00683b-0f84-4db8-a64f-2f98ad42fe06', "Process")
[Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_black.ico', "Process")
}
else
{
[Environment]::SetEnvironmentVariable("PwshPath", 'preview', "Process")
[Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]preview", "Process")

This comment has been minimized.

Copy link
@bergmeister

bergmeister Sep 10, 2018

Contributor

@TravisEz13 Non-blocking comment: Would it not be cleaner if a the variable was declared directly here to not convolute the script with WiX syntax?

This comment has been minimized.

Copy link
@TravisEz13

TravisEz13 Sep 10, 2018

Author Member

This variable was already there and only used for this purpose. I don't think I'm getting the meaning of your statement.

This comment has been minimized.

Copy link
@TravisEz13

TravisEz13 Sep 10, 2018

Author Member

I do think there is probably a cleaner way of doing this. Like refering to the preview directory by name, but the goal here was to make a quick change that would not require a lot of re-testing for the 6.1.0 release.

This comment has been minimized.

Copy link
@bergmeister

bergmeister Sep 10, 2018

Contributor

[$productDirectoryName]preview is WiX syntax that we inject into the WiX file. The build script should be generic and know as little about WiX as possible to reduce coupling if installer technology changed for example or WiX 4 brings breaking changes in syntax. How about this:

[Environment]::SetEnvironmentVariable("PwshPath", (Join-Path $productDirectoryName 'preview'), "Process")

This comment has been minimized.

Copy link
@TravisEz13

TravisEz13 Sep 11, 2018

Author Member

I'm fine with that change for 6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.