$srcpath function
$srcpath(file_alias)
The $srcpath function returns the source path of the installation file with the alias file_alias. If file_alias is empty or refers to a non-existing file, the result is an empty string. The function's behavior differs slightly between build time and installation time:
- At build time (for example, as part of a custom build action), the result is the source file path of the file on your development system.
- At installation time (the normal usage), the result is the installation source path of the file if the file is being distributed in uncompressed form, or empty if the file is part of the compressed distribution package.
An installation file is part of the uncompressed distribution if the file is specifically marked as Packaging: Plain file in its file attributes, or if the package has its Packaging: Plain file tree option set and the file is marked Packaging: Default.
This function allows you to refer to an uncompressed distribution file in the installer before any files are installed on the target system. After installation, you can use the regular <#file_alias> syntax.
Parameters
All parameters may contain symbolic references; these are resolved before the function is applied.
- file_alias
- File alias of the desired file.
Examples
Here are some usage examples for this function:
- <$srcpath(License.rtf_452BBCED444414DA)>
- When used at build time (for example, as part of a custom build action), returns the source file path of the installation file with the alias License.rtf_452BBCED444414DA. When used at installation time (the normal usage), returns either the path to the uncompressed file on the distribution medium, or an empty path if the file is distributed in compressed form.