nsis - How to add directory and sub directories in installer package
问题描述
I have many files and folders to be added to my installation package. I tried command
File /nonfatal /a /r "C:\Users\test\hdp*"
and
File /nonfatal /a /r "C:\Users\test\hdp\"
but it didn't create the output file(.exe). I also tried with zip file (means created zip file of hdp folder) and add it into package but the same issue i am facing with zip file also. hdp folder size is 250MB only.
In documentation also no option is mentioned to add folder. Can someone suggest how to add these folder and subfolders to the package?
解决方案
在尝试编写真正的安装程序之前,您应该从 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
推荐阅读
- svelte - 如何在 SvelteKit 中导入 Material Web 组件?
- android - 从 Room 数据库中查询单列并计算总和
- python - 有没有办法使用 for 循环遍历两列的值?
- sql - 如何获取 JSONB 数组索引
- c# - 我等不及任务完成
- json - 从 API 自动检索的 Nuxt 内容和 JSON 文件
- javascript - ReactJs刷新页面根据window.location.pathname更新链接活动状态
- python - 在使用 python 的 bash 脚本中从 JSON 响应中检索值时出错
- algorithm - 从凹多边形生成三角形网格的高效算法
- c++ - 以下代码的复杂度是多少?和重载函数