Old 30th October 2017, 21:18   #1
bencurthoys
Junior Member
 
Join Date: Oct 2017
Posts: 2
Console Installer

This is going to sound like a mad thing to want, but: I'm after a scriptable installer that isn't huge and doesn't suck, which DOESN'T have a UI.

I've got a SaaS system and I need to move builds of a web application up from development environments to test and production environments. And so what I did was what I've always done: write NSIS installer scripts for them. Even though they were never going to be installed by a 3rd party outside the organisation, that just seemed like the way to do it.

As time goes by I'm automating more and more of the build and deployment process, and whilst I guess I could accomplish what I want with a zip file and some powershell, the natural thing to do is to want to stick with NSIS.

Right now I run my NSIS exes with /S and /D to silently install the files where my other scripts say they should go, but it would be great it if were easier to control which components are selected from the command line (at the moment I just make an setup exe per component), and to capture the output to STDOUT so I can feed it back into my logging.

My Googlefu fails me: I can't find a tool which is designed to do this, and I can't find anyone else talking about how they accomplish this task. Is there some way of making NSIS do it?
bencurthoys is offline   Reply With Quote
Old 30th October 2017, 23:46   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,814
You can use ${GetParameters}+${GetOptions} from FileFunc.nsh to parse custom command line parameters so you can choose sections.

Writing to the console is not perfect but something like http://forums.winamp.com/showpost.ph...79&postcount=4 is as close as you are going to get without compiling a custom NSIS version.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 30th October 2017, 23:57   #3
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 47
Anders seems to dismiss recompiling NSIS, but FYI it's super easy to do with the scons flag NSIS_CONFIG_LOG_STDOUT=yes
Nutzzz is offline   Reply With Quote
Old 31st October 2017, 00:10   #4
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 47
As a followup, if you're going to compile a stdout version, you might also want to comment out lines 1607 and 1609 from exehead\exec.c so "LogSet on|off" calls aren't reported.
Nutzzz is offline   Reply With Quote
Old 31st October 2017, 14:16   #5
bencurthoys
Junior Member
 
Join Date: Oct 2017
Posts: 2
Thanks! It looks like building a new version is the way to do it, though that's going to have to wait until I'm in the frame of mind to install Python and scons and lose a day to a learning curve =)
bencurthoys is offline   Reply With Quote
Old 31st October 2017, 17:57   #6
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 47
Understood, but it's easier than you'd think.
Nutzzz 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