I want to dynamically derive the source folder (and destination folder) for 32/64 bit installations. So how can I specify that in the [Files] section of Inno setup. The following gives a compilation error:->
[Files]
Source: {#MySourcePath}\{code:GetSourceLibFolder}\*.jar; DestDir: {code:GetAppDir}\lib\;
I have the GetSourceLibFolder() and GetAppDir() function defined in the code section.
The functions are very simple and just return a variable:
function GetSourceLibFolder(Param: String): String;
begin
Result:= SourceLibFolder;
end;
function GetSourceBinFolder(Param: String): String;
begin
Result:= SourceBinFolder;
end;
Thanks !
[Code]and use them in other places in InnoSetup script. How about using#definestatement to create a string that applies your functions (just like in https://stackguides.com/questions/2329979/can-the-setup-filename-be-derived-from-the-executable-file-version-number) - ee.{app}? For example: let say your InnoSetup script file is in.\folder and your jar libraries are in.\install\liband you want them to be inlibfolder of your application folder{app}, you can defineSource: "install\lib\*.jar"; DestDir: "{app}\lib"The easy way: you can have a separate InnoSetup script for each 32-bit and 64-bit setup by defining different source folder in each script file. - ecle<exec executable="C:\Program Files\Inno Setup 5\ISCC.exe"><arg value="${basedir}\application.iss"/><arg value="/dMyLibFolder=lib-32"/></exec>. Then, in the script, you can use{#MyLibFolder}- ecle