删除“正在安装”来自 NSIS 安装程序窗口标题
我有一个 NSIS 安装程序脚本,用于部署 py2exe 构建的应用程序(使用 NSIS 2.46)。我唯一无法解决的用户界面细节是安装程序上的窗口标题。
根据文档, Caption
指令应该设置这个文本。但无论我设置什么,它总是附加文本“:安装”。也就是说,如果我有:
Caption "My Special App"
...那么安装程序上的窗口标题将显示“我的特殊应用程序:正在安装”。我该如何解决这个问题?
(我想避免这种情况,因为我实际上使用 NSIS 安装程序将应用程序提取到临时目录并运行一次,而不是永久安装它。)
我的整个 NSI 文件是:
!define py2exeOutputDirectory 'C:\Path\To\P2EOutput'
!define exe 'MyApp.exe'
; Comment out the "SetCompress Off" line and uncomment
; the next line to enable compression. Startup times
; will be a little slower but the executable will be
; quite a bit smaller
;SetCompress Off
SetCompressor /SOLID lzma
Caption "My Special App"
Name 'MyApp'
OutFile ${exe}
Icon 'C:\Path\To\Icon\icon.ico'
;SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
Section
DetailPrint "Extracting program..."
SetDetailsPrint none
InitPluginsDir
SetOutPath '$PLUGINSDIR'
File /r '${py2exeOutputDirectory}\*'
GetTempFileName $0
;DetailPrint $0
Delete $0
StrCpy $0 '$0.bat'
FileOpen $1 $0 'w'
FileWrite $1 '@echo off$\r$\n'
StrCpy $2 $TEMP 2
FileWrite $1 '$2$\r$\n'
FileWrite $1 'cd $PLUGINSDIR$\r$\n'
FileWrite $1 '${exe}$\r$\n'
FileClose $1
HideWindow
nsExec::Exec $0
Delete $0
SectionEnd
I have an NSIS installer script that I'm using to deploy a py2exe-built app (using NSIS 2.46). The only UI detail I can't iron out is the window title on the installer.
According to the docs, the Caption
directive should set this text. But whatever I set, it always has the text ": Installing" appended to it. That is, if I have:
Caption "My Special App"
...then the window title on the installer shows "My Special App: Installing". How do I get around this?
(I want to avoid this because I'm actually using the NSIS installer to extract the app to a temporary directory and run it once, not to permanently install it.)
My entire NSI file is:
!define py2exeOutputDirectory 'C:\Path\To\P2EOutput'
!define exe 'MyApp.exe'
; Comment out the "SetCompress Off" line and uncomment
; the next line to enable compression. Startup times
; will be a little slower but the executable will be
; quite a bit smaller
;SetCompress Off
SetCompressor /SOLID lzma
Caption "My Special App"
Name 'MyApp'
OutFile ${exe}
Icon 'C:\Path\To\Icon\icon.ico'
;SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
Section
DetailPrint "Extracting program..."
SetDetailsPrint none
InitPluginsDir
SetOutPath '$PLUGINSDIR'
File /r '${py2exeOutputDirectory}\*'
GetTempFileName $0
;DetailPrint $0
Delete $0
StrCpy $0 '$0.bat'
FileOpen $1 $0 'w'
FileWrite $1 '@echo off$\r$\n'
StrCpy $2 $TEMP 2
FileWrite $1 '$2$\r$\n'
FileWrite $1 'cd $PLUGINSDIR$\r$\n'
FileWrite $1 '${exe}$\r$\n'
FileClose $1
HideWindow
nsExec::Exec $0
Delete $0
SectionEnd
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
或
或
or
or