I am working on an application which uses a very large size of data files. My client wants to zip those data files separately from the setup exe then the installer should unzip them before starting the installation. Is that possible by inno? I don't have much experience in Pascal so any help will be much appreciated.
No built in Pascal scripting support for uncompression
Although Inno Setup internally has many uncompress routines to support the various ways it can compress the files during compiling. None of these are published to the Pascal Scripting language.
It is still possible to do this, but you must build a DLL to perform the unzipping step. Then use this DLL in your uninstall.
If you don't compress you could use this method:
In the [Files] of your Inno Setup script you can reference files that are not contained in your setup, by using the external flag.
[Files]
Source: "data1.dat" DestDir: "{app}" Flags: external;
This would copy data1.dat located in the same directory as your Setup.exe to your application installation directory.
An alternative to consider
Build a separate Inno Setup Script for the Data Files. Give this script to your clients so they can run this using the Compiler, instead of a Zip program.
It will compress the data like ZIP would, although the default is lzma2/max. This install could then be chained through the [Run] section to install directly after the application was installed.
2nd Alternative to consider
Based on your comment I understand your problem a bit better.
You could build all the MP3 files into a single installation setup. You could group the MP3 files using the [Components] section. This allows the user to select which group of files they want to install. The [Files] Section supports wild cards so you can specify all the files in a single directory to make the script easier to maintain.
InnoSetup is built to handle large installations by setting up ways to break up the
setup.exe into multiple files.
[Setup]
DiskSpanning=Yes
DiskSliceSize=XXX
SlicesPerDisk=XXX
SolidCompression=no (Default but it not recommended to be set 'YES' with Huge installs)
Related
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
I'm creating a setup with Inno Setup. This setup adds files to a "main program" and after installing some files it runs another custom program which kind of unpacks some previously installed files.
This unpacking program relies on some existing files being writable, which usually is the case. But on development machines these files are under version control and therefore write protected (have read-only attribute).
The unpacking program just doesn't unpack when these files are write protected (maybe it shows a warning in the console, but the console is hidden so one won't see this warning). And I can't change the code of this unpacking program.
So, I'm looking for a way to make these files writable with Inno Setup even though these files are not installed by Inno Setup.
How can I achieve this?
There's no built-in mechanism for that in Inno Setup.
But you can do almost anything from Pascal Script using WinAPI. In this case, you want to use SetFileAttributes.
For an example how to use SetFileAttributes from Inno Setup, see:
Inno Setup Code section create hidden file
I have four installers built with separate .iss files: client installer, server installer, client update installer, server update installer. At the moment I use separate isl files for each installer.
My question is can I use Inno Setup preprocessor inside the isl file to decide which messages refer to which installer so I could use only one instance of isl file for each language?
You can use a preprocessor in .isl files, only if you use a hack like this one from your previous question: Full preprocessor support in Inno Setup language files (isl)
When you do, you can use /D switch on the commandline of the iscc process that preprocesses the .isl files (in the PreprocessLanguage macro). Use the variable to identify your build. And you can then use the variable in your .isl files any way you like. You already know how: How can I pass command line parameters with a value to the Inno Setup Compiler, so I can use them in my code?
I have created an .exe file for my application using inno script. Here I want to copy files from my setup folder to the AppData\Local\Temp directory. This is done using the below code.
Source: "WebcamApplet_1-0-0\*"; DestDir: "{localappdata}\Temp\WebcamApplet_1-0-0"
The problem I'm facing is that this code is only copying the files into the sysadmin ie C:\Users\Sysadmin\AppData\Local\Temp (Admin), I have to put it in C:\Users\Manesh\AppData\Local\Temp(User) for my application to work. How do I solve this problem.
Your application is badly designed if it expects files to be installed to the Temp folder. This folder is so named because the user or the system are free to delete all files contained therein at any time -- it is therefore suitable only for temporary use.
Additionally, there is no reasonable and reliable way for a per-machine installer (one running with PrivilegesRequired=admin, which is the default) to install files or settings to per-user folders, including the per-user temporary folder.
If you really really want to do this, you should set PrivilegesRequired=lowest to create a per-user installer -- but bear in mind that this will introduce other restrictions, such as limiting where your application can be installed to. Provided that you are running with lowest privileges, you can then use {%TEMP} to refer to the temporary path.
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.