Old 4th November 2007, 20:24   #1
brasse
Junior Member
 
Join Date: Jun 2006
Location: Sweden
Posts: 3
Visual Studio integration

Hello!

I would like to be able to create a VS project that has as its target a NSIS installer. Has anyone here been able to persuade VS to do this?

Regards,
Mattias
brasse is offline   Reply With Quote
Old 4th November 2007, 20:46   #2
pospec
Senior Member
 
pospec's Avatar
 
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
I don't understand your question. Do you want to build NSIS installer via MSVS?
pospec is offline   Reply With Quote
Old 5th November 2007, 21:19   #3
brasse
Junior Member
 
Join Date: Jun 2006
Location: Sweden
Posts: 3
Yes, that's correct. I want to be able to create a sub project in my solution that will produce the NSIS installer (from my NSIS script). Typically I would have two projects in my solution; one that builds my application and one that builds the installer. When building the whole solution both projects would be built and the end result would be a NSIS installer.

Am I making any sense? :-)

:.:: mattias
brasse is offline   Reply With Quote
Old 5th November 2007, 21:30   #4
demiller9
Senior Member
 
Join Date: Mar 2006
Location: Dallas
Posts: 462
You can use the command line to create the installer (run makensis.exe). The command can be done as a post compile step in visual studio.

Don
demiller9 is offline   Reply With Quote
Old 6th November 2007, 15:47   #5
helix400
Member
 
Join Date: Oct 2003
Posts: 51
Quote:
Originally posted by brasse When building the whole solution both projects would be built and the end result would be a NSIS installer.
I've thought of doing something similar. For me, I'm leaning towards making it all command line based.

We need to a) Build projects b) obfuscate the files c) make an installer d) make an auto updater (using NSIS), e) deploy the files and f) change our server's auto update logic to reflect that a new update is available to beta testers.

I just can't see me pulling all that off from within Visual Studio. But if there's a way I could tell Visual Studio to run a script which runs steps b through f, I'd be very happy to find out how
helix400 is offline   Reply With Quote
Old 6th November 2007, 17:56   #6
pospec
Senior Member
 
pospec's Avatar
 
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
b) Do you mean "get" files? If you do then you could write batch to copy them
c) and maybe d) makensis
e), f) On your choice

"The way how to tell Visual studio" is the Post-build (on successfull build) in your project's settings.
pospec is offline   Reply With Quote
Old 19th November 2007, 09:45   #7
David B. Trout
Junior Member
 
David B. Trout's Avatar
 
Join Date: Sep 2007
Location: Bellevue, WA
Posts: 7
Quote:
Originally posted by pospec
[...]
"The way how to tell Visual studio" is the Post-build (on successfull build) in your project's settings.
The way I presonally prefer to do it is as a separate VS project itself. Specifically, a 'makefile' project with the project's "Build Command Line" property is set to: 'makensis.cmd "arg1" "arg2" ...etc'.

That way I can Build (or Rebuild) just that one "Setup" project (via right-clicking on it in the Solution Explorer pane and selecting "Project Only"->"Rebuild only xxx") without having to rebuild the prerequisite project that creates all the product binaries (which can conceivably, depending on the size of your "product", take quite a long time!).

That is to say, there's no need to Rebuild your product binaries in order to rebuild/test your product's INSTALLER project!

Just a thought. <shrug>
David B. Trout is offline   Reply With Quote
Old 19th November 2007, 10:15   #8
pospec
Senior Member
 
pospec's Avatar
 
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
Yes, you're right, you can do it that way.
pospec is offline   Reply With Quote
Old 27th November 2007, 13:14   #9
Kraiggy
Junior Member
 
Join Date: Sep 2007
Posts: 2
Quote:
Originally posted by brasse
Yes, that's correct. I want to be able to create a sub project in my solution that will produce the NSIS installer (from my NSIS script)...
Maybe NSIS will be also available as a Visual Studio integration in the future. But for now I know 3 integrated solutions for Visual Studio only:
  • Setup and Deployment Projects (MSI based) website
  • WiX - integrates WiX toolset (MSI based) website
  • Lexpa - integrates Inno Setup (non-MSI based) website

Hope that helps!
Kraiggy is offline   Reply With Quote
Old 28th November 2007, 09:53   #10
Wizou
Senior Member
 
Join Date: Aug 2007
Location: Paris, France
Posts: 304
for the URLs

Quote:
Originally posted by Kraiggy
Maybe NSIS will be also available as a Visual Studio integration in the future. But for now I know 3 integrated solutions for Visual Studio only:
  • Setup and Deployment Projects (MSI based) website
  • WiX - integrates WiX toolset (MSI based) website
  • Lexpa - integrates Inno Setup (non-MSI based) website

Hope that helps!
Wizou is offline   Reply With Quote
Old 24th July 2008, 17:20   #11
SapientCoder
Junior Member
 
Join Date: Jul 2008
Location: Colorado Springs
Posts: 1
A Thoughtful Idea

Althought it's not a Visual Studio add-in, the iNSISt Framework (http://www.codeplex.com/insist) looks promising, and a Visual Studio add-in could easily be built on top of it.

For example, since the framework uses XML files to auto-generate NSIS scripts, a Visual Studio add-in would simply have to edit/regenerate an XML file each time a project's structure changes (files are added, removed, etc.). Then, as was mentioned in previous posts, there are several ways to use Visual Studio to invoke the NSIS compiler on the generated script to "build" it. This would essentially automate the process of maintaining NSIS scripts for VS projects.
SapientCoder is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump