Repository navigation
Ship the install scripts in scripts/ so cimipkg packages create the Start menu shortcut - #14
Merged
Merged
Conversation
…tart menu shortcut cimipkg packages a release from the release zip plus build-info.yaml and scripts/ read from the repository at the tag. The repository had no scripts/ folder: the postinstall lived only inline in build.ps1, so packages built that way never got the Managed Notifications Dialog Start menu shortcut, the PATH entry or the ManagedNotifications ACLs. scripts/postinstall.ps1 is now the one copy. It adds the install folder to the machine PATH, creates the all-users Start menu shortcut with the exe as its icon, and locks down ProgramData\ManagedNotifications. Each step is idempotent and non-fatal. scripts/uninstall.ps1 removes the shortcut and the PATH entry. build.ps1 stages these files into its .pkg instead of generating its own, and the release workflow fails if the scripts are missing or the zip lacks either exe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cimipkg packages a csharpDialog release from
csharpdialog-<arch>.zipas the payload plusbuild-info.yamlandscripts/read from the repository at the release tag. The repository had noscripts/folder; the postinstall existed only as a string insidebuild.ps1. A machine installed from a cimipkg package therefore never got:Managed Notifications Dialog.exeProgramData\ManagedNotificationsACLsConfirmed on a test VM: the GUI was installed but had no Start menu entry.
Change
scripts/postinstall.ps1is now the single copy. It adds the install folder to the machine PATH, creates%ProgramData%\Microsoft\Windows\Start Menu\Programs\Managed Notifications Dialog.lnkpointing at the GUI exe with the exe as its icon, and applies the ManagedNotifications ACLs. Each step is idempotent and wrapped so a failure is reported but never fails the install; the script exits 0.scripts/uninstall.ps1removes the shortcut and the PATH entry. ProgramData is kept, as the MSI does.build.ps1stagesscripts/*.ps1into its.pkginstead of generating its own postinstall, so the two cannot drift.release.ymlfails the release ifbuild-info.yamlor either script is missing at the tag, or if a zip lacksdialog.exeorManaged Notifications Dialog.exe.Verification
Parser::ParseFile, 0 errors).