8000 Packaging: simplify building an installable package for Windows by bergmeister · Pull Request #5871 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@bergmeister
Copy link
Contributor

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.

  • 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

PR Checklist

Note: Please mark anything not applicable to this PR NA.

… 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
@bergmeister bergmeister changed the title Packaging: simply building an installable package for Windows Packaging: simplify building an installable package for Windows Jan 11, 2018
@iSazonov iSazonov requested a review from SteveL-MSFT January 12, 2018 10:31
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
Copy link
Member

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
Copy link
Member

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

ProductVersion = $Version
AssetsPath = "$PSScriptRoot\..\..\assets"
LicenseFilePath = "$PSScriptRoot\..\..\assets\license.rtf"
# Product Guid needs to be unique for every PowerShell version to allow SxS install
Copy link
Member

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.
@bergmeister
Copy link
Contributor Author

@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
Copy link
Member

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

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
Copy link
Member

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. -->
Copy link
Member
@TravisEz13 TravisEz13 Jan 13, 2018

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.)

Copy link
Member
@TravisEz13 TravisEz13 left a 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

@TravisEz13 TravisEz13 merged commit d3a775d into PowerShell:master Jan 17, 2018
@TravisEz13 TravisEz13 added this to the 6.0.2 milestone Mar 14, 2018
TravisEz13 pushed a commit that referenced this pull request Mar 15, 2018
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
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.

3 participants

0