Fix MSI upgrade and shortcut issues#12792
Conversation
|
@heaths Please look CI fail. |
|
@heaths take a look at https://dev.azure.com/powershell/PowerShell/_build/results?buildId=53706&view=logs&j=1057fe42-c88b-5deb-88ad-59245c714665&t=1888043b-254d-5761-80ec-47d0d8adc59a, the test detected some file changes, if this is expected, just follow the instructions in the output |
|
I updated the wxs for you and filed: #12799 |
|
@TravisEz13, thanks. I was going to get to this tonight. Were these actually removed, though? I'm not clear on whether their presence or not is actually a bug. They aren't needed except for |
I wonder too how WiX works - wxs file still contains references to the icons. |
|
@iSazonov, what exactly do you mean? As a long-time developer on WiX (I designed and implemented many features in it, most notably package ref-counting that other installers use as well), I could probably explain if you can clarify what you meant. When the My main change here was to remove most GUIDs. They aren't needed, except for the
|
I mean @TravisEz13 's commit and your question "Were these actually removed, though?". |
|
Last I updated the file via |
|
Yes, they are on file system. My concern is that it seems wxs file contains references to the files. |
|
They shouldn't anymore. It's possible when I generated my repo wasn't entirely clean. It was a bit behind before I rebased on upstream/master this past weekend since I've been swamped with work stuff. |
in CI we generate multiple packages at at time. There is probably a bug where one of the package generations deletes the icons. There is code in the packaging to create a staging folder. We need to make sure all types of packages that add/or remove files from the build use a staging directory. I filed a bug to investigate.
|
|
#12799 was an existing bug. We can merge this PR. |
|
Thanks. If I can find time, there's some more clean-up I'd like to do (you can do almost everything in the .wxs itself, which makes it easier to maintain since it's not spread all over), but wasn't necessary for now. I also recommend passing parameters instead of setting environment variables, as the scope is smaller (though, at least you scope them to the current and child processes). |
|
@heaths Thanks for great contribution! |
|
Thanks for your contribution |
|
🎉 Handy links: |
| <?define UpgradeCode = "$(env.UpgradeCodeX86)" ?> | ||
| <?define ExplorerContextMenuDialogText = "&$(var.ProductName) $(env.SimpleProductVersion) ($(sys.BUILDARCH))"?> | ||
| <?define UpgradeCodePreview = "1d00683b-0f84-4db8-a64f-2f98ad42fe06"?> | ||
| <?define UpgradeCodeRelease = "86abcfbd-1ccc-4a88-b8b2-0facfde29094"?> |
There was a problem hiding this comment.
preview upgrade codes
x64 - 39243d76-adaf-42b1-94fb-16ecf83237c8
x86 - 86abcfbd-1ccc-4a88-b8b2-0facfde29094
There was a problem hiding this comment.
release upgrade codes
"UpgradeCodeX64", '31ab5147-9a97-4452-8443-d9709f0516e1', "Process")
"UpgradeCodeX86", '1d00683b-0f84-4db8-a64f-2f98ad42fe06', "Process")
| [Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]", "Process") | ||
| [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") | ||
| # The ApplicationProgramsMenuShortcut GUID should be changed when bumping the major version because the installation directory changes | ||
| [Environment]::SetEnvironmentVariable("ApplicationProgramsMenuShortcut", '6a69de6c-183d-4bf4-a40e-83007d6293bf', "Process") | ||
| } | ||
| else | ||
| { | ||
| [Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]preview", "Process") | ||
| [Environment]::SetEnvironmentVariable("UpgradeCodeX64", '39243d76-adaf-42b1-94fb-16ecf83237c8', "Process") | ||
| [Environment]::SetEnvironmentVariable("UpgradeCodeX86", '86abcfbd-1ccc-4a88-b8b2-0facfde29094', "Process") | ||
| [Environment]::SetEnvironmentVariable("IconPath", 'assets\Powershell_av_colors.ico', "Process") | ||
| [Environment]::SetEnvironmentVariable("ApplicationProgramsMenuShortcut", 'ab727c4f-2311-474c-9ade-f2c6fd7f7322', "Process") |
There was a problem hiding this comment.
Add comment to Hightlight change
| } | ||
| else | ||
| { | ||
| [Environment]::SetEnvironmentVariable("PwshPath", "[$productDirectoryName]preview", "Process") |
There was a problem hiding this comment.
Add comment to highlight change
Fixes #11995 and fixes #12011 based on changes described in #12011 (comment).