如何在安装程序包中添加目录和子目录

问题描述 投票:0回答:1

我有许多文件和文件夹要添加到我的安装包中。我试过命令

文件/ nonfatal / a / r“ C:\ Users \ test \ hdp *”

文件/ nonfatal / a / r“ C:\ Users \ test \ hdp \”

但是它没有创建输出文件(.exe)。我还尝试了zip文件(意味着创建了hdp文件夹的zip文件)并将其添加到程序包中,但是我面对的也是zip文件。hdp文件夹大小仅为250MB。

在文档中也没有提到添加文件夹的选项。有人可以建议如何将这些文件夹和子文件夹添加到包中吗?

nsis
1个回答
0
投票

您应该在尝试编写真正的安装程序之前,从Example1.nsi开始并了解其所有说明。

OutFile "myinstaller.exe" ; Name of generated installer .exe
InstallDir "$Desktop\MyApp" ; Change this

Page Directory
Page InstFiles

Section
SetOutPath $InstDir
File /r "c:\users\test\myfilestoinstall\*" ; Change this
SectionEnd
© www.soinside.com 2019 - 2024. All rights reserved.