Skip to content

Commit

Permalink
add version info resources to installer
Browse files Browse the repository at this point in the history
  • Loading branch information
guijan committed Dec 29, 2024
1 parent b0c5588 commit 510daff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ if host_machine.system() == 'windows' or host_machine.system() == 'cygwin'
'-DEXEFILE=' + fs.name(dictpw.full_path()),
'-DMANFILE=' + fs.name(man.full_path()),
'-DLICENSE=' + fs.name(license.full_path()),
'-DREADME=' + fs.name(readme.full_path())]
'-DREADME=' + fs.name(readme.full_path()),
'-DVERSION=' meson.project_version()]
if libbsd_dep.found() and libbsd_dep.type_name() == 'internal'
inst_cmd += '-DLIBOBSD_LICENSE=true'
endif
Expand Down
10 changes: 10 additions & 0 deletions src/dictpw.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
!define LIBOBSD_LICENSE "subprojects\libobsd\LICENSE_libobsd.txt"
!endif
# MSYS_DLL is optional, only needed on msys2 and Cygwin.
# !ifndef MSYS_DLL !error "..." !endif
!ifndef VERSION
!error "Version unspecified"
!endif

!define MUI_DIRECTORYPAGE_VARIABLE "$INSTDIR"
!include "MUI2.nsh"
Expand All @@ -56,6 +60,12 @@ InstallDir "$PROGRAMFILES\dictpw"
RequestExecutionLevel admin
showinstdetails show

VIAddVersionKey /LANG=0 "ProductName" "dictpw"
VIAddVersionKey /LANG=0 "LegalCopyright" "(c) Guilherme Janczak"
VIAddVersionKey /LANG=0 "FileDescription" "generate password from dictionary"
VIAddVersionKey /LANG=0 "FileVersion" "${VERSION}"
VIAddVersionKey /LANG=0 "ProductVersion" "${VERSION}"

Section
# Uninstalling previous versions allows changing the installed files
# without leaving any lingering files.
Expand Down

0 comments on commit 510daff

Please sign in to comment.