开发者

Installing file to location based on function call

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 a开发者_运维问答ccomplish this by changing the DestDir's value for a file or is there a better way?


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜