VOOZH about

URL: https://www.nuget.org/packages/InnoSetup.ScriptBuilder/

⇱ NuGet Gallery | InnoSetup.ScriptBuilder 6.3.0




InnoSetup.ScriptBuilder 6.3.0

dotnet add package InnoSetup.ScriptBuilder --version 6.3.0
 
 
NuGet\Install-Package InnoSetup.ScriptBuilder -Version 6.3.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InnoSetup.ScriptBuilder" Version="6.3.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InnoSetup.ScriptBuilder" Version="6.3.0" />
 
Directory.Packages.props
<PackageReference Include="InnoSetup.ScriptBuilder" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InnoSetup.ScriptBuilder --version 6.3.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: InnoSetup.ScriptBuilder, 6.3.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InnoSetup.ScriptBuilder@6.3.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InnoSetup.ScriptBuilder&version=6.3.0
 
Install as a Cake Addin
#tool nuget:?package=InnoSetup.ScriptBuilder&version=6.3.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

InnoSetup.ScriptBuilder

👁 CI
👁 NuGet
👁 Downloads count

This package is intended to build Inno Setup script files (*.iss) using C# fluent API. You can find the official Inno Setup documentation on Inno Setup web site.

Installation

.NET CLI

dotnet add package InnoSetup.ScriptBuilder

Package Manager

Install-Package InnoSetup.ScriptBuilder

Examples

Create builder

To get the script looking like this

[Setup]
AppName=BimTools.Support
AppVersion=1.2.5.1634640046
DefaultDirName={userappdata}\SupportTools
PrivilegesRequired=lowest
OutputBaseFilename=Tools.Support_2021_1.2.5.1634640046
SetupIconFile=ToolsIcon.ico
UninstallDisplayIcon=ToolsIcon.ico
DisableDirPage=yes

[Files]
Source: "bin\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; 
Source: "SupportTools.addin"; DestDir: "{userappdata}\Autodesk\Revit\Addins\2019"; 
Source: "bin\Fonts\GraphikLCG-Medium.ttf"; DestDir: "{autofonts}"; Flags: onlyifdestfileexists uninsneveruninstall; FontInstall: "Graphik LCG"; 
Source: "bin\Fonts\GraphikLCG-Regular.ttf"; DestDir: "{autofonts}"; Flags: onlyifdestfileexists uninsneveruninstall; FontInstall: "Graphik LCG";

inherit your builder class from IssBuilder base class

public class DemoBuilder : IssBuilder
{
 public DemoBuilder()
 {
 Setup.Create("BimTools.Support")
 .AppVersion("1.2.5.1634640046")
 .DefaultDirName(@"{userappdata}\SupportTools")
 .PrivilegesRequired(PrivilegesRequired.Lowest)
 .OutputBaseFilename("Tools.Support_2021_1.2.5.1634640046")
 .SetupIconFile("ToolsIcon.ico")
 .UninstallDisplayIcon("ToolsIcon.ico")
 .DisableDirPage(YesNo.Yes);
 
 Files.CreateEntry(source: @"bin\*", destDir: InnoConstants.App)
 .Flags(FileFlags.IgnoreVersion | FileFlags.RecurseSubdirs);
 Files.CreateEntry(source: "SupportTools.addin", destDir: @"{userappdata}\Autodesk\Revit\Addins\2019");
 Files.CreateEntry(source: @"bin\Fonts\GraphikLCG-Medium.ttf", destDir: @"{autofonts}")
 .FontInstall("Graphik LCG")
 .Flags(FileFlags.OnlyIfDestFileExists | FileFlags.UninsNeverUninstall);
 Files.CreateEntry(source: @"bin\Fonts\GraphikLCG-Regular.ttf", destDir: @"{autofonts}")
 .FontInstall("Graphik LCG")
 .Flags(FileFlags.OnlyIfDestFileExists | FileFlags.UninsNeverUninstall);
 }
}

or use BuilderUtils.CreateBuilder()

var builder = BuilderUtils.CreateBuilder(builder =>
{
 builder.Setup.Create("BimTools.Support")
 .AppVersion("1.2.5.1634640046")
 .DefaultDirName(@"{userappdata}\SupportTools")
 .PrivilegesRequired(PrivilegesRequired.Lowest)
 .OutputBaseFilename("Tools.Support_2021_1.2.5.1634640046")
 .SetupIconFile("ToolsIcon.ico")
 .UninstallDisplayIcon("ToolsIcon.ico")
 .DisableDirPage(YesNo.Yes);
 
 builder.Files.CreateEntry(source: @"bin\*", destDir: InnoConstants.App)
 .Flags(FileFlags.IgnoreVersion | FileFlags.RecurseSubdirs);
 builder.Files.CreateEntry(source: "SupportTools.addin", destDir: @"{userappdata}\Autodesk\Revit\Addins\2019");
 builder.Files.CreateEntry(source: @"bin\Fonts\GraphikLCG-Medium.ttf", destDir: @"{autofonts}")
 .FontInstall("Graphik LCG")
 .Flags(FileFlags.OnlyIfDestFileExists | FileFlags.UninsNeverUninstall);
 builder.Files.CreateEntry(source: @"bin\Fonts\GraphikLCG-Regular.ttf", destDir: @"{autofonts}")
 .FontInstall("Graphik LCG")
 .Flags(FileFlags.OnlyIfDestFileExists | FileFlags.UninsNeverUninstall);
);

Getting results

String result

var builder = new DemoBuilder();
var result = builder.ToString();

Script file

var builder = new DemoBuilder();
builder.Build("demo.iss");

// or

BuilderUtils.Build<DemoBuilder>("demo.iss");

// or

BuilderUtils.Build(
 builder =>
 {
 builder.Setup.Create("BimTools.Support")
 .AppVersion("1.2.5.1634640046")
 .DefaultDirName(@"{userappdata}\SupportTools");
 builder.Files.CreateEntry(@"bin\*", InnoConstants.App)
 .Flags(FileFlags.IgnoreVersion | FileFlags.RecurseSubdirs);
 }, 
 "demo.iss");

Directives

You can insert preprocessor directives at the beginning of your script using Directives section

Directives
 .Define("MyAppName", "My Program")
 .Include(@"c:\dir\file.iss")
 .Include("<file.iss>")
 .FreeText(";comments")
 .Undef("var1");

Where FreeText() allows to insert any text to the script as is.

Not implemented sections and parameters

If the section you want to insert is not implemented you can use either Sections.CreateKeyValueSection() or Sections.CreateParameterSection() methods. To insert not implemented parameters/directives of any kind of section use Parameter() method.

// for key-value sections
Sections.CreateKeyValueSection("Messages")
 .CreateEntry()
 .Parameter("BeveledLabel", @"Inno Setup")
 .Parameter("HelpTextNote", @"/PORTABLE=1%nEnable portable mode.");
 
// for parameter sections
Sections.CreateParameterSection("Registry")
 .CreateEntry()
 .Parameter("Root", RegistryKeys.HKU)
 .Parameter("Subkey", @"Software\My Company\My Program")
 .Parameter("ValueName", "Name")
 .Parameter("ValueType", ValueTypes.String)
 .Parameter("ValueData", "Test app");
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 was computed. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on InnoSetup.ScriptBuilder:

Package Downloads
RxBim.Nuke

RxBim nuke plugin for building MSI

ricaun.Nuke.PackageBuilder

Nuke PackageBuilder for Autodesk Application.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.3.0 7,828 10/22/2024
1.3.1 12,925 9/22/2023
1.3.0 15,933 3/20/2023
1.3.0-rc02 273 3/17/2023
1.3.0-rc01 902 3/15/2023
1.3.0-dev05 299 3/15/2023
1.3.0-dev04 436 3/15/2023
1.3.0-dev03 409 7/28/2022
1.3.0-dev02 359 7/28/2022
1.3.0-dev01 369 7/27/2022
1.2.2 6,568 5/5/2022
1.2.1 2,911 3/21/2022
1.2.0 1,657 3/2/2022
1.1.0 2,134 2/5/2022
1.1.0-dev01 403 2/4/2022
1.0.1 1,428 1/28/2022
1.0.0 3,266 12/3/2021
0.1.4 540 11/29/2021
0.1.4-rc02 429 11/29/2021
0.1.4-rc01 404 11/28/2021
Loading failed

Upgraded to Inno Setup 6.3