tags:

views:

12

answers:

1

I am building an Inno Setup script and have libraries that need to be installed to locations that are determined at install (i.e. Java_Home/bin). Is there a way to accomplish this by changing the DestDir's value for a file or is there a better way?

A: 

With a little bit of Googling, it turns out that the answer was right there.

Create a function in the code section, set the DestDir to {code:FUNCTIONNAME}

So in my particular case:

[Files]
Source: "libs\native-lib.dll"; DestDir: {code:GetJavaBin};

[Code]
function GetJavaBin(S: String): String;
begin
    Result :=JavaHome + '\bin';
end;
Bob Breznak