Packaging: simplify building an installable package for Windows#5871
Packaging: simplify building an installable package for Windows#5871TravisEz13 merged 4 commits intoPowerShell:masterfrom
Conversation
… gets a new Guid when being called from `Start-PSPackage` - Add defaults for required files but also add extra path validation attribute - Rename ProductGuid to ProductCode
build.psm1
Outdated
| This only works on a Windows machine due to the usage of WiX. | ||
| .EXAMPLE | ||
| # This example shows how to produce a Debug-x64 installer for development purposes. | ||
| cd $RootPathOfPowerShellCheckout |
There was a problem hiding this comment.
Is it better to use the term Repo instead of Checkout?
build.psm1
Outdated
| @@ -2070,8 +2080,9 @@ function New-MSIPackage | |||
| [string] $ProductVersion, | |||
|
|
|||
| # Product Guid needs to change for every version to support SxS install | |||
There was a problem hiding this comment.
This comment should probably be changed to: Product Code needs to be different for every version
tools/packaging/packaging.psm1
Outdated
| @@ -243,7 +243,7 @@ function Start-PSPackage { | |||
| AssetsPath = "$PSScriptRoot\..\..\assets" | |||
| LicenseFilePath = "$PSScriptRoot\..\..\assets\license.rtf" | |||
| # Product Guid needs to be unique for every PowerShell version to allow SxS install | |||
There was a problem hiding this comment.
This comment should probably be changed to: Product Code needs to be different for every version
…g in comments) and use the word repo instead of checkout in comment to be more clear.
|
@SteveL-MSFT OK, I addressed your comments. |
build.psm1
Outdated
| [string] $ProductVersion, | ||
|
|
||
| # Product Guid needs to change for every version to support SxS install | ||
| # Product Code needs to change for every version to support SxS install |
There was a problem hiding this comment.
Does this comment make sense any more?
The ProductCode property is a unique identifier for the particular product release
from https://msdn.microsoft.com/en-us/library/windows/desktop/aa370854(v=vs.85).aspx
tools/packaging/packaging.psm1
Outdated
| LicenseFilePath = "$PSScriptRoot\..\..\assets\license.rtf" | ||
| # Product Guid needs to be unique for every PowerShell version to allow SxS install | ||
| ProductGuid = New-Guid | ||
| # Product Code needs to be unique for every PowerShell version to allow SxS install |
There was a problem hiding this comment.
This is not correct either... but here just remove the to allow SxS install part.
| <?define ProductName = "$(env.ProductName)" ?> | ||
| <?define ProductGuid = "$(env.ProductGuid)" ?> | ||
| <?define ProductCode = "$(env.ProductCode)" ?> | ||
| <!-- UpgradeCode GUID MUST REMAIN SAME THROUGHOUT ALL VERSIONS, otherwise, updates won't occur. --> |
There was a problem hiding this comment.
This is actually where the comment about SxS should be (in the comment about the UpgradeCode.)
TravisEz13
left a comment
There was a problem hiding this comment.
I have some comments about the comments
This is the continuation of PR 5499 that had to be abandoned due to a fatal merge conflict and I did not want to risk accidentally reverting recent fixes.
Remove unnecessary/unused default for productGuid because it always gets a new Guid when being called from Start-PSPackage
Add defaults for required files but also add extra path validation attribute
Rename ProductGuid to ProductCode
# Conflicts:
# assets/Product.wxs
PR Summary
This is the continuation of PR 5499 that had to be abandoned due to a fatal merge conflict and I did not want to risk accidentally reverting recent fixes.
Start-PSPackagePR Checklist
Note: Please mark anything not applicable to this PR
NA.[feature]if the change is significant or affects feature testsWIP:to the beginning of the title and remove the prefix when the PR is ready.