具体实现参见下面的脚本:
!define PRODUCT_VERSION "3.0.2193"
!define PRODUCT_NAME "Tester"
!define PRODUCT_PACKAGE_ID "${__DATE__}"
!define PRODUCT_PACKAGE_SPECIAL_ID ""
!define PRODUCT_PUBLISHER "AAA"
!include "MUI.nsh"
!insertmacro MUI_LANGUAGE "English" ;Language files
;Adds the Product Version on top of the Version Tab in the Properties of the file.
VIProductVersion "${PRODUCT_VERSION}.0"
;Adds a field in the Version Tab of the File Properties.
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (c) ${PRODUCT_PUBLISHER} Company"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${PRODUCT_NAME} Application"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${PRODUCT_VERSION}.0"
VIAddVersionKey /LANG=${LANG_ENGLISH} "OriginalFilename" "${PRODUCT_NAME}_${PRODUCT_VERSION}.${PRODUCT_PACKAGE_ID}${PRODUCT_PACKAGE_SPECIAL_ID}_Setup.exe"
VIAddVersionKey /LANG=${LANG_ENGLISH} "Package Build Date" "${__DATE__}"
OutFile "${PRODUCT_NAME}_${PRODUCT_VERSION}.${PRODUCT_PACKAGE_ID}${PRODUCT_PACKAGE_SPECIAL_ID}_Setup.exe"
Section "!THE_ONLY_SECTION" THE_ONLY_SECTION
SectionEnd
没有评论 :
发表评论