I am using Inno Setup version 5.4.2.
I want to define the path for the files to copy (the Source: parameter in the [Files] section as two parts, a base path and sub-directory names, that I use for special files (like .dlls). I have tried the following:
#define MyAppSetupDir "D:\MyApp\setup" #define MyAppSetupQtDLLs {#MyAppSetupDir}"\DLLs" [Files] Source: {#MyAppSetupDir}\MyApp.exe; DestDir: {app}; Flags: ignoreversion Source: {#MyAppSetupDLLs}\mstext35.dll; DestDir: {app}; Flags: ignoreversion
but I get the following compilation error
[ISPP] Expression expected but opening brace ("{") found.
I also tried to enclose the braces in "", like
#define MyAppSetupQtDLLs "{#MyAppSetupDir}\DLLs"
But this time I got
Error: Source file "D:\MyApp\setup\{#MyAppSetupDir}\DLLs\mstext35.dll" does not exist.
So, ISSP is correctly replacing the MyAppSetupDir variable, but then puts again the simple text, as if it did not recognize the directive.
I have searched everywhere, and I already found a discussion about using the {commonappdata}
, but I could not find how to do this, neither in the documentation nor in the KB. I would really appreciate some hints, as it looks I am close, but not finding the right solution..
Inno Setup is an open source script-driven installation system created in Delphi by Jordan Russell. The Inno Setup Extensions Knowledge Base (ISXKB) aims to support users of this installation system by providing a source of information, code snippets, guide lines, and ready-to-use solutions.
Inno Setup's [Code] section uses Pascal (or Pascal Script to be more exact, thanks to TLama), likely because Inno Setup itself is written in Pascal Delphi.
You're in luck: It's possible to run Inno Setup anywhere that Docker runs (including Linux and macOS), and even have a passable experience writing your setup script.
#define MyAppSetupDir "D:\MyApp\setup" #define MyAppSetupQtDLLs MyAppSetupDir + "\DLLs"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With