How to get start with NSIS Component - nsis

Blockquote
Am new to NSIS. Already i have a windows application which contains Service, from there communication takes place and i have a created Setup Project which i developed using .NET. Now i want to know how to convert this Setup to NSIS setup. So far i have created Welcome page, License page and now i am stuck up in Components pages. Since my project contains many 3rd party dlls also. I don't know how to start with. Can any suggest how to work with NSIS?
Blockquote

The component page displays the named sections from your script and the user can choose which components to install:
Page components
Page instfiles
Section "Main Program"
SectionIn RO ; Read only, always installed
Setoutpath $instdir
File "myapp.exe"
SectionEnd
Section "Foo component"
Setoutpath $instdir\plugins
File "Foo.dll"
SectionEnd
Section "Bar component"
Setoutpath $instdir\plugins
File "Bar.dll"
SectionEnd

Related

Install Shield-adding code

I am a beginner level user of InstallShield. I've added a button in the Wizard interface. Now I want to add some code that's to be executed on clicking that. I don't Know the procedure to do that. Any Idea??
Read thexe blog articles to learn how to write and call DLL's from a suite installer.
Calling a Function in a DLL from a Wizard Page or Window in a Suite Installation
Validating User Input in a Suite Project

Open custom page from within section?

I am putting together my first NSIS installer script, and having some trouble.
I am using Modern UI and have provided a simplified script below:
!insertmacro MUI_PAGE_COMPONENTS
Page custom CustomPage
Section "Tomcat" SEC01
;stuff in here to install Tomcat from bundled installer
SectionEnd
Section "Deploy WARS" SEC02
;Fire a separate custom page so that I can use nsDialog to get
;user to choose a folder location for deploying WARs.
;(as potentially their could be more than one Tomcat installed)
SectionEnd
From what I have read, you cannot fire a custom page from within a section.
So how can I maintain the MUI_PAGE_COMPONENTS page to allows user to choose on if they want to install Tomcat AND/OR also deploy WARs.
I will def need a custom page right?
You can have more than one instfiles page so you could have a installer with this page order:
Components
InstFiles (Installs Tomcat)
Directory (Choose WAR destination)
InstFiles (Install WAR)
Section "Tomcat" SECTOM
SectionEnd
Section /o "WAR" SECWAR
SectionEnd
Section
;Use macros from sections.nsh to deselect SECTOM and select SECWAR
SectionEnd
The pre callback functions for page 3 and 4 need to use SectionFlagIsSet from sections.nsh and call Abort if the War component was not selected so the pages are skipped.
Another alternative is to try the DlgHost plugin and show the custom dialog in a child window on your instfiles page...

How can I use a Sharepoint server as the Source for Inno Setup files?

I'm using Inno Setup for an application setup. Many of the data files that will be included with this application are stored on a Microsoft Sharepoint server. When I try to use the path Sharepoint provides in the 'Source:'
[Files]
Source: http://teams/sm/Symbols/*; DestDir: {app}\Symbols
I get the following error on compile:
Unknown filename prefix: "http:"
How can I properly call out a Sharepoint location as the source for my data files?
I'm using Inno Setup version 5.4.2
EDIT
I know what the documentation says.
I am looking for a solution to this problem. I am using InnoSetup, the files are on SharePoint; how can I make this work?
EDIT 2
Thanks to brian brinley. Below is the exact syntax that I used in InnoSetup thanks to his answer:
[Setup]
SourceDir=\\teams\sm
[Files]
Source: \Symbols\*; DestDir: {app}\Symbols
SharePoint Libraries support WebDav so you can go to the library that is containing your setup files and open with explorer. Since you didn't specify which version of sharepoint, here are both options.
SharePoint 2010 - open the library, click on the library tools/library tab in the ribbon, and select "Open with Explorer"
SharePoint 2007 - Open the library, click on actions and then select open with windows explorer.
Once you open in explorer you will have the path. If it opens with http:// you can simply replace with \ i.e.. \myServer\myLibraryName
This is not supported by Inno Setup. You should download your files from SharePoint and then create the installer (maybe you can create a script for this).
Here's more information on what you actually can put in the [Files] section.
Web installations are not supported either: Is there a "web install" feature?
As alfonso said, it's not supported by Inno, you will need to use a 3rd party app/script to download them, possibly something like wget.
This can either be done as a pre compile step in your build script or by using ISPP's Exec() function to download each in turn as they're needed.
As for the wildcard, this is not supported by HTTP at all so you will need some form of file list containing each one to get, or use wget's recursive download with a single index page.
(Note that I don't use SharePoint so I can only talk about the Inno part of it.

NSIS disable Autorun at the end of the setup

I´m using NSIS editor to make a setup for my application, but I don´t want the user to have the option for Autorun the application.
I don´t want the checkbox at the last setup screen.
How can I disable this feature?
Look for the iospecial.ini file of your NSIS directory. You can use this to customize your finish page. Here's one sample.. Check this out -> http://forums.winamp.com/showthread.php?t=264181

What is the easiest way to add a page to ask for a string in NSIS using MUI?

I'm an NSIS novice.
I'm using the NSIS editor, and the built-in wizard to create a basic installer. I've figured out how to add a second page to ask the user for an alternate folder (install path vs data storage path). I also need to ask them for a URL (a SOAP/WSDL location), and I'd like to just add in another page similar to the directory page that just asks for a generic string (no browse, etc).
I'm using MUI (not MUI2).
Is there some simple way to do this?
To create a custom page, use nsDialogs (or the older InstallOptions) They are both included in the official installer, go look at some of the examples.

Resources