Skip to content

Packaging: simplify building an installable package for Windows - #5871

Merged
Travis Plunk (TravisEz13) merged 4 commits into
PowerShell:masterfrom
bergmeister:master
Jan 17, 2018
Merged

Packaging: simplify building an installable package for Windows#5871
Travis Plunk (TravisEz13) merged 4 commits into
PowerShell:masterfrom
bergmeister:master

Conversation

@bergmeister

Copy link
Copy Markdown
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 Christoph Bergmeister (bergmeister) changed the title Packaging: simply building an installable package for Windows Packaging: simplify building an installable package for Windows Jan 11, 2018
Comment thread 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
Copy Markdown
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?

Comment thread build.psm1 Outdated
@@ -2070,8 +2080,9 @@ function New-MSIPackage
[string] $ProductVersion,

# Product Guid needs to change for every version to support SxS install

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.

This comment should probably be changed to: Product Code needs to be different for every version

Comment thread 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

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.

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
Copy Markdown
Contributor Author

Steve Lee (@SteveL-MSFT) OK, I addressed your comments.

Comment thread 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
Copy Markdown
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

Comment thread 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

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.

This is not correct either... but here just remove the to allow SxS install part.

Comment thread assets/Product.wxs
<?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. -->

@TravisEz13 Travis Plunk (TravisEz13) Jan 13, 2018

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.

This is actually where the comment about SxS should be (in the comment about the UpgradeCode.)

@TravisEz13 Travis Plunk (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.

I have some comments about the comments

@TravisEz13
Travis Plunk (TravisEz13) merged commit d3a775d into PowerShell:master Jan 17, 2018
@TravisEz13 Travis Plunk (TravisEz13) added this to the 6.0.2 milestone Mar 14, 2018
Travis Plunk (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
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…rShell#5871)

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