I've got some class libraries that I've made using Visual Studio 2003. There is an installer included with VS 2003, but it makes 3 files - an MSI, an EXE and an INI. The first one is all you need for XP, but Vista needs all 3 so I've been asked to make a single file installer.
I've written this script and am trying to run it from the directory containing the DLL and TLB files that VS 2003 creates:
!include Library.nsh
!insertmacro InstallLib REGDLL NOTSHARED NOREBOOT_PROTECTED FrogTechUtilities.dll $PROGRAMFILES\Frogtech\FrogTechUtilities.dll $TEMP
!insertmacro InstallLib TLB NOTSHARED NOREBOOT_PROTECTED FrogTechUtilities.tlb $PROGRAMFILES\Frogtech\FrogTechUtilities.tlb $TEMP
But when I run it I get this error at the end of the output:
Processing script file: "C:\Frogtech Projects\FTU\FrogTechUtilitiess\bin\ftu.nsi"
!include: "C:\Program Files\NSIS\Include\Library.nsh"
!include: closed: "C:\Program Files\NSIS\Include\Library.nsh"
!insertmacro: InstallLib
Error: command Push not valid outside Section or Function
Error in macro InstallLib on macroline 5
Error in script "C:\Frogtech Projects\FTU\FrogTechUtilitiess\bin\ftu.nsi" on line 2 -- aborting creation process
From what I can see it's indicating a bug in the included macro which I can't imagine is correct. Any idea? Also, am I using directories correctly? I gather NSIS uses \ to indicate new line so is it ok to use them in paths? I notice if I use an absolute path like c:\temp it complains about there being too many parameters for the macro.
Odd problem trying to make DLL registering script
3 posts
You're using !insertmacro InstallLib outside a function or section.
Stu
Stu
Ah, ok. Thanks.