forked from git-for-windows/git
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Update Windows installer metadata for wingetcreate
#446
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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 there a specific reason that
.vfs
is being removed? If the reason is "AppVersion only handles numeric characters", the filter on allowed version tags would need to be updated as well.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.
Yes - we originally left the
vfs
in the manifest version numbers, but thewinget
maintainers requested we change it to align with what's shown in Control Panel: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.
What was causing the
.vfs
to be removed from the version as displayed in your screenshot?It looks like it is specific to
.vfs
after all? I'd still like to understand where that happens (build-extra
?).I don't see anything calling that substring out in the installer scripts, so it's probably not specific to the.vfs
. In that case, we'd want whatever rule parses out the version here to match the rule used by Windows in displaying there.I'm also going to double-check, but I vaguely remember it including the.vfs
when I was testingbuild-git-installers
.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.
Found it! https://github.com/git-for-windows/build-extra/blob/main/installer/release.sh#L105-L107
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.
Sorry for the comment spam, but I'm trying to understand what's happening here. Why do you manually need to replace the version at all, if
build-extra/installer/release.sh
already sets the version in the format you want?For the rest of the metadata changed here, you're either updating something that's hardcoded to a value we don't want (e.g.,
AppPublisher=The Git Development Community
) or adding something new (e.g.ArchitecturesAllowed=x64
).AppVersion
doesn't seem to fit either of those.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 actually went a little ways down the
FileVersionInfo.FileVersion
path as well - glad I wasn't the only one who thought it was strange.And I think experimenting with different versions is a good idea. I'll think a bit on the best way to test that - it's a little tricky, given that
wingetcreate
only seems to accept installer urls, and I'd like to not have to build a dummy installer and do a dummy release for each sample version 😬.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.
It's from the resources. They are compiled via https://github.com/microsoft/git/blob/vfs-2.32.0/git.rc#L2. The constants are set via the
Makefile
:git/Makefile
Lines 2306 to 2310 in bb8d8c3
(The
tr
call will replace all non-numerical characters by whitespace, then use the first four numbers (padding them with zeroes if there aren't enough to go 'round.)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.
Oh interesting! Is the change I've added here the way to go then? Or should we make updates in
git.rc
/Makefile
?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 sadly just realized that my 2 previous comments have been 'pending' for quite some time, which explains why I wasn't getting responses 😬)
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.
Quite honestly, I wonder why the fix is necessary for the version (the
Makefile
magic should have picked the right version). For my curiosity, what version would you see without your patch, and which version do you see with your patch?