Archive: Call From Visual Studio 2003?


Call From Visual Studio 2003?
I'd really like to be able to add an "NSIS project" or something to my Visual Studio 2003 solution. Something that automatically compiles the installer each time the solution is built and knows that it has to wait until after all of the other projects in the solution have been built.

I played around with Microsoft's Setup Project once upon a time and it works like this (but sucks compared to NSIS of course ;). You just set the setup project as dependant on the other projects in the solution and it always compiles last.

It seems like this should be easy since the project dependencies thing is already built in to Visual Studio and all I need to do to compile my NSIS script is call an executable. But I haven't figured out a way to do it yet. Visual Studio 2003 doesn't seem to have a "custom" project type that allows you to just define an executable to call when the project is built or anything.

Anyone have anything like this working or have any ideas on how to make it happen? :)

Thanks,
-Zak


You can use a custom post-build step, just like NSIS uses to convert the compiled exeheads into header files.


Hrm... I hadn't thought about doing it that way. I was hung up on having the .nsi file in it's own project. But there's no "do nothing" project type for Visual Studio - it always wants to produce some form of output itself.

Now, if I just include my .NSI file in one of the other projects that already creates a DLL or EXE - as long as that project is the last one compiled, I guess it will work.

Not as well organized as I'd like (I keep the .NSI and files it includes in a seperate directory - would be nice to have it appear as a seperate project in the solution too.

Thanks, though. This will let me do what I primarily wanted to do!

-Zak