Added !gettlbversion and TLB reading support on POSIX

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6913 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2017-10-03 20:48:29 +00:00
parent f34fd48105
commit a51d89712c
19 changed files with 256 additions and 247 deletions

View file

@ -149,28 +149,38 @@
### Get library version
!macro __InstallLib_Helper_GetVersion TYPE FILE
!tempfile LIBRARY_TEMP_NSH
!ifdef LIBRARY_USELIBRARYLOCALHELPER
!tempfile LIBRARY_TEMP_NSH
!ifdef NSIS_WIN32_MAKENSIS
!ifdef NSIS_WIN32_MAKENSIS
!execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!else
!execute 'LibraryLocal "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!endif
!execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!include "${LIBRARY_TEMP_NSH}"
!delfile "${LIBRARY_TEMP_NSH}"
!undef LIBRARY_TEMP_NSH
!else
!execute 'LibraryLocal "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!if ${TYPE} == 'T'
!warning "LibraryLocal currently supports TypeLibs version detection on Windows only"
!if "${TYPE}" == "D"
!getdllversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
!else if "${TYPE}" == "T"
!gettlbversion /NoErrors /Packed "${FILE}" LIBRARY_VERSION_
!endif
; Emulate the old LibraryLocal defines
!ifndef LIBRARY_VERSION_HIGH
!define LIBRARY_VERSION_FILENOTFOUND
!else if "${LIBRARY_VERSION_HIGH}" == ""
!define LIBRARY_VERSION_NONE
!undef LIBRARY_VERSION_HIGH
!undef LIBRARY_VERSION_LOW
!endif
!endif
!include "${LIBRARY_TEMP_NSH}"
!delfile "${LIBRARY_TEMP_NSH}"
!undef LIBRARY_TEMP_NSH
!macroend
### Install library