【问题标题】:NSIS - How to separate Sections?NSIS - 如何分隔部分?
【发布时间】:2015-12-04 15:18:09
【问题描述】:

我想将安装程序要提取的文件的部分和卸载程序要删除的文件分开,而这两个部分具有相同的部分名称。

代码

#Initialize variable
!define APPLICATION_NAME "Demo"

#Installer section
Section "${APPLICATION_NAME}"
 SetOutPath "$INSTDIR"
 WriteUninstaller "$INSTDIR\Uninstaller.exe"
SectionEnd

#Uninstaller section
Section "${APPLICATION_NAME}"
 Delete "$INSTDIR\Uninstaller.exe"
 RMDir "$INSTDIR"
SectionEnd    

图片

【问题讨论】:

  • 请将您的代码直接发布到 SO。如果代码太多,请减少为MCVE
  • 对不起。我现在已经编辑了我的帖子。
  • 感谢您编辑您的帖子!

标签: nsis


【解决方案1】:

来自文档:

卸载程序部分名称以“un”为前缀。

Section "Demo"
SectionEnd

Section "un.Demo"
SectionEnd

【讨论】:

  • 谢谢!这是我的问题的答案。
猜你喜欢
  • 2013-08-20
  • 1970-01-01
  • 2012-02-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-06
  • 1970-01-01
  • 2018-06-21
相关资源
最近更新 更多