Make installer capable of installing addon files to various applications in Inno Setup - inno-setup

I have a set of files (scenery data of an airport) that should be installed to one of several applications (3 different flight simulators) depending on the target applications being installed. If more than one is installed, the user has to choose into what application the set of files should be installed.
Of course I could write for each application a separate installer but that would make it awkward to maintain and blow up the number of installers since there are many sets of files to install.
Problem is that depending on the chosen application the AppId, the installation destination and other installation values changes.
I intend to write a custom wizard page that is shown immediately after the welcome page to find out which of the target applications are installed and let the user choose the required application in case there are several installed.
My current problem is that the files to copy are not fully the same for each possible application. So I need in the [Files] section the posibility to copy a file to its target location depending on the application selected. I hoped to find a general parameter for the [Files] section that could be used to copy or not. But I could not find one. How could I solve this problem? I also studied [Components] and [Tasks] to find a solution but was not successful.
Thanks for any hint how to solve my problem!

To answer your literal question: Use Check parameter to bind [Files] (and other) section entries to the selection on the custom page.
Some examples:
Inno Setup - Multiple software versions in one installation
How to install only file based on condition (external configuration file) in Inno Setup
Conditional file copy in Inno Setup
Inno Setup: How to auto select a component by comparing a register key version?
Though you also might consider using a preprocessor to easily maintain and auto-generate multiple installers from same source script.
For an example, see:
Compile Inno Setup installer for specific component only

Related

Where is Inno Setup uninstaller executable?

I'm very new to Inno Setup, so forgive my ignorance on this one.
I created a very small install script and it's building and working the way I want—I get my setup.exe built to the output directory, and all the source files are being copied to my specified destinations.
Now I want to make sure users can uninstall the files that I specified in my [Files] section of my script. The problem is I don't understand how Inno Setup handles this. I assume Inno Setup doesn't make an executable specifically for Uninstall, but even if I run setup.exe after I have installed my application, the wizard doesn't ask if I want to uninstall.
However, if I enable the Run menu's Target Uninstall in the ISC compiler, I am able to uninstall the files. So my question is, how do I uninstall my application outside of the ISC compiler. In my [Setup] section I do have Uninstallable=yes.
I know this is a total noob question, but any help is appreciated.
(As you have found yourself), Inno Setup creates an entry in Add/Remove Programs Control Panel applet (if CreateUninstallRegKey is yes).
The entry is a link to an uninstaller program, which is generated by the compiler (when Uninstallable is yes).
The uninstaller program is located by default in the application directory (unless overridden by UninstallFilesDir) and is named unins001.exe (the number is incremented, if needed, to avoid naming conflicts).

Inno setup: creating a software suite installer

I want to create an installer with inno setup that installs several .exe at once. I have checked other posts here like this Installing several applications at once from Inno Setup but I still have some doubts.
In first place I did it creating a separated installer file for each application and joining all of them in a final installer. It works, but I don't like how it looks.
Then I have tried to include all the applications in the [files] section of a single script, and it works but then I have the problem with the icon and the group name. I want three icons to be created, one for each application i am installing.
I am sure the solution is simple but I haven't got it yet, so thanks in advance for your help!

What files are required to use NSIS? I am bundling it with another product, so users can create their own installers

I have what might be a simple question and might be....a more complex one. We are preparing to add NSIS to our software, that is, we want people who use our software to be able to create installers using NSIS, but through our software. (We'll be creating functions using NSIS, acknowledging NSIS, etc.) What I am trying to figure out before we get started is how many/what files our customers will be required to have on their hard drive for NSIS to work. So, we just need to know if nsis can be used standalone or if it requires the user to install it into program files, or if it requires a lot of different files in AppData - If we have to bundle a few .dlls, that's not a problem and is expected. Ultimately, if we end up having to bundle NSIS as well, that's fine - We just want to make sure it'll work on other people's computers without telling them to go download it.
MakeNSIS does not read/write from/to the registry or anywhere else and only needs a handful of files for minimal operation.
To build a simple installer you need:
NSIS\MakeNSIS.exe (Just calls Bin\MakeNSIS.exe)
NSIS\Bin\MakeNSIS.exe
NSIS\Stubs\* (If you are only going to use a specific compression mode you only need one, and the uninstaller file if you want uninstall capability)
If you want to use the Modern UI you need its header files, some files from Contrib (Graphics and UI) and system.dll and nsDialogs.dll from the plugin folder.
Everything else is optional but I would recommend that you also bundle:
NSIS\Include
NSIS\Plugins (You can remove stuff you will never need; dialer, splash etc)
NSIS\Contrib (Language files, graphics and UI)
You can find license information here.
You could also just ask the user to install it and enter the path to it in your setup program...
I would just include all of the files. (It's only 5MB or so) NSIS has a zip archive as well as exe installer that includes the necessary files. (Or just zip up the installed directory from exe installer).
From my experience, NSIS does not need to be installed to work. I run a fleet of build servers that build NSIS-based installers, and they each just have the files extracted in a directory. The installer is never run on them. This should mean there are no DLLs to register or things like that.
Just make sure you are following whatever their licensing terms are - I have not reviewed redistribution/bundling of their files in another product, since that is not something I do.

How can we add DLLs to an Install Shield "build" on the command line/at build time?

We would like to add DLLs to an install based on some external command
(We want to reuse a script/install shield configuration multiple times from a command line. We have a program that will be localized and the localization just requires an additional DLL be added to the target directory. Because of the additional size of the DLL(s) we do not want to put them all in one installer. )
So for example we want to programmatically build the following:
Just an English installer
A specific language installer (add one named DLL to the install listed above)
ALL languages installer (gets all DLLs in a particular directory - we don;t want to have to specify the name)
If there is a better way to do this then please speak up - we don't care how it is done. WE are new to Install Shield (And not very impressed frankly).
Does the command line perhaps take multiple "scripts" or sources in order to combine pieces? We're not fluent enough with the tool to understand the paradigms that are commonly used.
You need to look into the concept of release flags and product configurations. You can create a single installer project that builds a variety of different views to meet all of your requirements. I have one customer that I did this for where I build 57 install configurations from one installer baseline to support all of his variation points.

How do I have Inno Setup update multiple locations?

I have an application that uses Inno Setup as its installer.
I am now writing an updater using Inno Setup to apply some updates to various installed locations.
This application can be installed on removable flash drives as a portable app and I would like to be able to roll out the updates across several drives/locations/directories for each drive attached to the PC at once.
Is there a way to get Inno Setup to roll out its contents as an update to each location in an array of locations?
Not directly. One option is to build an install for the files that is designed to be silent.
Then write a second install that compiles that uses the first one. Then you [Code] Section you could call ShellExecute() executing the first installer. You could call the first installer as many times as you wanted.
Although, I suspect this may really creates havok on the Add/Remove Programs.

Resources