How to use parent of a directory in a Source param

2019-03-01 11:35发布

问题:

I can't for the life of me figure out how to point to the parent of the source directory in the [Files] section.

Here is an example of what I need:

[Files]
Source: "{parentofsrc}\Documentation\\*";` 
DestDir: "{pf}\MyProgram\"; Flags: external`

Does anyone know how to do this ?

回答1:

You can use "{src}\..\Documentation\".

The .. notation means "the parent of the current folder, so in the snippet above it means "starting in the {src} folder, move up one leve (the parent of {src}), and then down into the Documentation folder there.



标签: inno-setup