From: SourceForge.net <no...@so...> - 2006-01-27 21:40:39
|
Bugs item #1415129, was opened at 2006-01-25 19:07 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1415129&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Scripting Group: 2.0 Series Status: Open Resolution: Invalid Priority: 1 Submitted By: Nobody/Anonymous (nobody) Assigned to: Amir Szekely (kichik) Summary: Library.nsh - LIBRARY_VERSION_NONE Initial Comment: PROBLEM ======= If the "undocumented" LIBRARY_VERSION_NONE is defined before the InstallLib macro is included, the "GetVersion" function/code in the Library.nsh is still called: Library.nsh ;------------------------ ;Get version information !insertmacro __InstallLib_Helper_GetVersion D "${LOCALFILE}" This will result in an error if the InstallLib macro is used multiple times. The error is as following: ! define: "LIBRARY_VERSION_HIGH" already defined! The GetVersion functions sets the LIBRARY_VERSION_LOW/HIGH defines but these defines are not undef if the LIBRARY_VERSION_NONE is set. EXAMPLE ======= !define LIBRARY_VERSION_NONE !insertmacro InstallLib REGDLLTLB NOTSHARED REBOOT_NOTPROTECTED "#SOURCE#\sfFTPLib.dll" "$INSTDIR\ sfFTPLib.dll" "$INSTDIR" !define LIBRARY_VERSION_NONE !insertmacro InstallLib REGDLL NOTSHARED REBOOT_NOTPROTECTED "#SOURCE#\SmartHook.dll" "$INSTDIR \SmartHook.dll" $INSTDIR FIX === Variant A: Move the GetVersion function into the !ifndef LIBRARY_VERSION_NONE section. ;------------------------ ;Get version information !ifndef LIBRARY_VERSION_NONE !insertmacro __InstallLib_Helper_GetVersion D "${LOCALFILE}" !ifdef LIBRARY_VERSION_FILENOTFOUND !error "InstallLib: The library ${LOCALFILE} could not be found." !endif Variant B: If the GetVersoin is still required for some reason Vairant A is not correct. Therefore undef the LIBARARY_VERSION_HIGH/LOW. #undef LIBRARY_VERSION_HIGH #undef LIBRARY_VERSION_LOW ENVIRONMENT =========== NSIS 2.14 Windows XP SP2 ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2006-01-27 13:40 Message: Logged In: NO Hello kichik .. Thank you for answering. Exactly, I'm intending to ignore the version information (check). The reason is because the InstallLib only compares the major and minor part of the version (major.minor.build.patch). If the build number could also be taken into account I could probably use the version check. But even then I think a define to ignore the version check would be great. -Mat ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2006-01-26 09:40 Message: Logged In: YES user_id=584402 LIBRARY_VERSION_NONE is undocumented for a reason. It's an internal define and shouldn't be used. Are you using it to ignore version information? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1415129&group_id=22049 |