0
我有一個NSIS安裝程序腳本,用於部署py2exe構建的應用程序(使用NSIS 2.46)。我無法解決的唯一的UI細節是安裝程序中的窗口標題。從NSIS安裝程序窗口標題中刪除「安裝」標題
根據文檔,Caption
指令應設置此文本。但無論我設置了什麼,它總是有附加的文字「:Installing」。也就是說,如果我有:
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