-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Packaging: simplify building an installable package for Windows #5871
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to use the term Repo instead of Checkout?
build.psm1
Outdated
| [ValidateNotNullOrEmpty()] | ||
| [string] $ProductVersion, | ||
|
|
||
| # Product Guid needs to change for every version to support SxS install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should probably be changed to: Product Code needs to be different for every version
tools/packaging/packaging.psm1
Outdated
| ProductVersion = $Version | ||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually where the comment about SxS should be (in the comment about the UpgradeCode.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.