Add DisplayVersion to Windows registry on install (+typo) (#4730)

Winget relies on this value to get the version of a program.
If it's missing winget will just download the newest version even if the program is up to date.
See https://github.com/microsoft/winget-cli/issues/1255
This commit is contained in:
tippfehlr 2022-02-13 04:30:56 +01:00 committed by GitHub
parent 1f0ea77f80
commit 9a3c51815a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -258,11 +258,12 @@ jobs:
cp supertuxkart-github-actions.nsi $arch.nsi
sed -i "s/define APPNAMEANDVERSION \"\"/define APPNAMEANDVERSION \"SuperTuxKart ${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/define ARCH \"\"/define ARCH \"$arch\"/g" $arch.nsi
sed -i "s/define VERSION \"\"/define VERSION \"${{ env.release_tag }}\"/g" $arch.nsi
sed -i "s/OutFile \"\"/OutFile \"SuperTuxKart-${{ env.release_tag }}-installer-$arch.exe\"/g" $arch.nsi
for filename in $(ls ../../build-$arch/bin)
do
file="\\\\$filename"
sed -i "286a\ DELETE /REBOOTOK \"\$INSTDIR$file\"" $arch.nsi
sed -i "288a\ DELETE /REBOOTOK \"\$INSTDIR$file\"" $arch.nsi
done
# Print result
#cat $arch.nsi

View File

@ -28,7 +28,7 @@
;General
; Version information
; TOOD get these from the source code directly
; TODO get these from the source code directly
!define VERSION_MAJOR 1
!define VERSION_MINOR 2
!define VERSION_REVISION 0
@ -38,6 +38,7 @@
;Name and file
!define APPNAME "SuperTuxKart"
!define APPNAMEANDVERSION "${APPNAME} ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_BUILD}"
!define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_BUILD}"
!define DESCRIPTION "3D open-source arcade racer with a variety characters, tracks, and modes to play"
Name "${APPNAMEANDVERSION}"
@ -239,6 +240,7 @@ Section "Install" SecMain
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "Publisher" "${APPNAME}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayIcon" "$\"$INSTDIR\icon.ico$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "HelpLink" "$\"${HELPURL}$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLInfoAbout" "$\"${ABOUTURL}$\""

View File

@ -39,6 +39,7 @@ Unicode True
!define APPNAME "SuperTuxKart"
!define APPNAMEANDVERSION ""
!define ARCH ""
!define VERSION ""
!define DESCRIPTION "3D open-source arcade racer with a variety characters, tracks, and modes to play"
Name "${APPNAMEANDVERSION}"
@ -257,6 +258,7 @@ Section "Install" SecMain
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "Publisher" "SuperTuxKart Team"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayIcon" "$\"$INSTDIR\icon.ico$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "HelpLink" "${HELPURL}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLUpdateInfo" "${UPDATEURL}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLInfoAbout" "${ABOUTURL}"

View File

@ -28,7 +28,7 @@
;General
; Version information
; TOOD get these from the source code directly
; TODO get these from the source code directly
!define VERSION_MAJOR 1
!define VERSION_MINOR 2
!define VERSION_REVISION 0
@ -38,6 +38,7 @@
;Name and file
!define APPNAME "SuperTuxKart"
!define APPNAMEANDVERSION "${APPNAME} ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_BUILD}"
!define VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}${VERSION_BUILD}"
!define DESCRIPTION "3D open-source arcade racer with a variety characters, tracks, and modes to play"
Name "${APPNAMEANDVERSION}"
@ -238,6 +239,7 @@ Section "Install" SecMain
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "Publisher" "${APPNAME}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayIcon" "$\"$INSTDIR\icon.ico$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "HelpLink" "$\"${HELPURL}$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\""
WriteRegStr HKLM "${ADD_REMOVE_KEY_NAME}" "URLInfoAbout" "$\"${ABOUTURL}$\""