我有一个包含以下行的 .txt 文件:
- 应用程序1
- 应用程序2
- 应用程序3
- ...
- 应用程序N
在我制作安装程序之前,我在 ${srcdir} 中有这些文件:
- ${srcdir}\app1
- ${srcdir}\app2
- ${srcdir}\app3
- ...
- ${srcdir}\appN
文件列表总是会改变,所以我需要手动更正 nsi-script。
如何使用取决于 file.txt 的列表视图在自定义页面上制作复选框列表?
现在我正在使用组件页面和简单的构造来检查文件。
SectionGroup /e "Installing apps" SecApps
!if /FileExists "E:\src\app.dll"
Section "Install app1"
SetOutPath "$InstDir"
File "E:\src\app.dll"
SectionEnd
!endif
!if /FileExists "E:\src\app2.dll"
Section "Install app2"
SetOutPath "$InstDir"
File "E:\src\app2.dll"
SectionEnd
!endif
!if /FileExists "E:\src\app3.dll"
Section "Install app3"
SetOutPath "$InstDir"
File "E:\src\app3.dll"
SectionEnd
!endif
SectionGroupEnd