Installation 如何在NSIS中从不同文件夹添加文件

Installation 如何在NSIS中从不同文件夹添加文件,installation,nsis,Installation,Nsis,我已经设置并运行了以下各项: File file1.bat File file2.xml File common.file1.dll File common.file2.dll File common.file3.exe 为了避免将公共文件保留在源目录中,我希望从父目录引用它们,如下所示: File file1.bat File file2.xml File ..\common.file1.dll File ..\common.file2.dll File ..\common.file3.ex

我已经设置并运行了以下各项:

File file1.bat
File file2.xml
File common.file1.dll
File common.file2.dll
File common.file3.exe
为了避免将公共文件保留在源目录中,我希望从父目录引用它们,如下所示:

File file1.bat
File file2.xml
File ..\common.file1.dll
File ..\common.file2.dll
File ..\common.file3.exe
编辑:当我再次尝试时,它实际上是有效的

但显然,这一点没有得到承认。

是否有其他方法引用这些文件?

尝试在脚本中添加以下行:

File file1.bat
File file2.xml
SetOutpath "<source directory path>"
File common.file1.dll
File common.file2.dll
File common.file3.exe
文件file1.bat
文件file2.xml
设置输出路径“”
文件common.file1.dll
文件common.file2.dll
文件common.file3.exe

文件是相对于.nsi和..\xyz的。

您可以定义一个环境变量,指向要保存依赖项的文件夹。然后在nsi脚本中使用该环境变量。

您可以为file命令指定单独的输出文件路径和源文件路径:

File /oname=$INSTDIR\common.file3.exe ..\common.file3.exe

不,我想不是这样的,因为它不允许
“.\”
这是我打算从中复制公共文件的。你说得对,它可以工作!我更新了我的问题以反映这一点。