added a minimal implementation of __InstallLib_Helper_GetVersion for non-win32 platforms, using GetDLLVersionLocal

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4597 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2006-03-17 12:15:51 +00:00
parent e5ea6ea2f6
commit 2ca8151f8a

View file

@ -109,11 +109,37 @@
### Get library version
!macro __InstallLib_Helper_GetVersion TYPE FILE
!tempfile LIBRARY_TEMP_NSH
!execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!include "${LIBRARY_TEMP_NSH}"
!delfile "${LIBRARY_TEMP_NSH}"
!undef LIBRARY_TEMP_NSH
!ifdef NSIS_WIN32_MAKENSIS
!tempfile LIBRARY_TEMP_NSH
!execute '"${NSISDIR}\Bin\LibraryLocal.exe" "${TYPE}" "${FILE}" "${LIBRARY_TEMP_NSH}"'
!include "${LIBRARY_TEMP_NSH}"
!delfile "${LIBRARY_TEMP_NSH}"
!undef LIBRARY_TEMP_NSH
!else
!if ${TYPE} == 'T'
!error "InstallLib can only handle type libraries on Windows"
!endif
!ifndef INSTALLLIB_GETVERSION_VARS_DEFINED
!define INSTALLLIB_GETVERSION_VARS_DEFINED
Var /GLOBAL $INSTALLLIB_VER_LOW
Var /GLOBAL $INSTALLLIB_VER_HIGH
!endif
!define LIBRARY_VERSION_LOW $INSTALLLIB_VER_LOW
!define LIBRARY_VERSION_HIGH $INSTALLLIB_VER_HIGH
GetDLLVersionLocal "${FILE}" $INSTALLLIB_VER_HIGH $INSTALLLIB_VER_LOW
!endif
!macroend