Path to store Inno Setup output files to (Setup-*.bin) - inno-setup

How to change names, extensions and locations of setup-*.bin (Inno Setup internal compression archive file)
Default archive location: {src}
Location where I want: {src}\Data (Data is a folder.)

There are many way to change the output folder and base file name here are a few:
In inno setup
[Setup]
OutputDir={userdocs}\Data({userdocs}means my document,change this if you want another folder)
To change Output Base File name that is setup-*.bin in your case
[Setup]
OutputBaseFilename=setup(change setup to any name)
To change the size of setup-*.binyou can use
[Setup]
DiskSpanning=true
DiskSliceSize=2000000000(as your preference).
{src} is nothing but a directory constants which mean
"The directory in which the Setup files are located".
PS: If you want to create script for inno setup you can use ISTool instead then use the script in inno setup.
Thanks if you like my answer then accepted it.

By the setup-*.bin, I assume you refer to output files resulting from disk spanning. I do not know what "Inno Setup internal compression archive file" is.
Default location for Inno Setup output files is not {src} (it wouldn't make sense) but subfolder "Output" under the directory containing the script."
You can change this using OutputDir directive.
Quoting Inno Setup documentation:
Specifies the "output" directory for the script, which is where the Setup Compiler will place the resulting SETUP.* files. By default, it creates a directory named "Output" under the directory containing the script for this.

Related

Creating Zip File in Inno Setup Script

Suppose I want to put a zip file in the installation path after installation. But this zip file is not available to me, so it has to be created in the build process.
And a folder must be added to another folder and the zip file must be created from it.
For example I have:
C:Folder1
C:Folder2
And zip file must be:
C:Folder1/Folder2
With all the files in respective folder.
I have unfortunately very little experience with Inno-Setup and this particular problem with the folder in another folder pack without changing the source path but a zip file in .exe to do I find nowhere.
Inno Setup cannot create a zip file for you while compiling.
But you have two options how to delegate the zip creation to an external process
If you are automating complex build process, you will likely be running Inno Setup command-line iscc compiler. So just before running it in your batch build process, run another process/software/tool to create the zip file.
For some example, see:
Inno Setup Pre- / Post- compile action
If you really want to create the zip file on the fly, while manually building the installer in Inno Setup GUI, you can use preprocessor Exec function to start an process/software/tool to create the zip file before the actual compiling begins.
For some examples, see:
Inno Setup Pre- / Post- compile action
Create files in Inno Setup setup needed by the [Files] section
Is it possible to call a batch file while compiling an Inno Setup script?
As for the actual zip file creation, that's not really Inno Setup question anymore. You will file lot of question about that, for example:
Batch file script to zip files

Modify default path in Inno Setup 'Setup Needs the Next Disk' prompt

My program's size is larger than 2GB. So, I set the DiskSpanning option to true and uploaded the divided 'bin' files to 'S3'. The 'bin' files are automatically downloaded to the tmp folder. I failed to move or copy files to 'Downloads' folder and failed to change default path in 'Setup Needs the Next Disk' printed 'Installing' previous wizard. So I would like to know how to change the default path or move the files in tmp to the 'Downloads' folder.
Thank you.
You cannot change the path and the default path is not the "Downloads" folder either. The default path is the location of the installer .exe file. Basically the {src}.
For moving the downloaded files elsewhere, see:
Change download location for Inno Setup TDownloadWizardPage

Inno Setup - Changing only .bin files name

It is possible to change name only of .bin files and left setup as a setup.exe?
I mean:
setup.exe
data1.bin
data2.bin
etc...
No it's not possible.
Both .exe and .bin output file names are based on OutputBaseFilename.

How to recursivelly include folder/files using a wildcard in Inno Setup

I want to include language resource files from our build into our installers. The language resource files all have the same name, but reside in different sub-folders (one per locale), like this:
\Release
\bin
\es-MX
Localization.resources.dll
\fr-CA
Localization.resources.dll
etc.
In my [Files] section, I thought perhaps I might be able to do this (note the position of the asterisk):
Source: "..\\source\\Libraries\\Localization\\bin\\Release\\*\\Localization.resources.dll"; \
DestDir: "{app}\\MyApp"; Flags: ignoreversion recursesubdirs
Unfortunately, Inno Setup blows up, complaining that it can't find any files:
Compiler Error!
Line 129: No files found matching "C:\Development\HT\Installers\..\source\Libraries\Localization\bin\Release\*\Localization.resources.dll"
I would like Inno Setup to look for any sub-folder (hence the *) containing a file named Localization.resources.dll and upon installation, create a language directory with the same name (based on what is found via the wildcard) and copy the file to that folder, doing so for each folder that matches the criteria.
Essentially, I want to end up with this:
..
\MyApp
\es-MX
Localization.resources.dll
\fr-CA
Localization.resources.dll
In case it isn't obvious, I would prefer not to explicitly add the source and destination folder names, because we will be adding more languages/locales in the future, and I would like Inno Setup to automatically pick up any new language folders/files we create without having to change the installer source.
Is this possible?
Just use the recursesubdirs flag with a root path to a tree and the Localization.resources.dll filename. It will automatically do what you want: find all Localization.resources.dll files in the tree and install them to their respective subfolders:
Source: "..\source\Libraries\Localization\bin\Release\Localization.resources.dll"; \
DestDir: "{app}\MyApp"; Flags: ignoreversion recursesubdirs
As documented (emphasis mine):
recursesubdirs
Instructs the compiler or Setup to also search for the Source filename/wildcard in subdirectories under the Source directory.
Other possible approaches:
Generate the Files section using a preprocessor.
For a similar tasks, see:
Inno Setup - Recurse sub directories without creating those same sub directories
Generating Inno Setup file flags programmatically
Inno Setup: Dynamically add a component for all files in a folder and its subfolders
Generate the Files section using an external scripting language (with better functionality then Inno Setup preprocessor) and invoke it using the Exec preprocessor function. E.g. using PowerShell.

How to get path where is temporary Inno setup file is located

I have a DLL that I am calling from Inno setup script, dll is looking to load some file from the path where executable is located.
In my case when I execute the setup, temporary executable is exported in temp folder is-xxxxx
BTW, {tmp} is not the right one. It is another tmp folder but not the one that temporary setup.
I need to know that in inno setup is there a constant to represent that folder.
Thanks.
Your DLL can determine which path it's been extracted to and it can also determine the path of the temporary executable. The way you do it depends on the language your DLL is written in.
But the Key Windows API call is GetModuleFileName
If your DLL was written in Delphi you could use the following to get the path of Setup.exe
ExtractFilePath(ParamStr(0))
How about this
path := ExpandConstant('{src}');

Resources