查看完整版本: [-- 用NSIS建安装包时,如何设置“发行者” (Publisher) --]

QTCN开发网 -> 其它技术开发讨论区 -> 用NSIS建安装包时,如何设置“发行者” (Publisher) [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

yongjie 2017-01-06 16:10

用NSIS建安装包时,如何设置“发行者” (Publisher)


[attachment=16306]
用NSIS建立安装包后,发现有如图的问题。网上查了一下,没有找到合适的信息。这里应该是Publisher 或Company,
但是不知道应该怎么设置。

我将角本文件附上,供有兴趣的朋友参考。哪位有经验,指点一下?

!include "mui2.nsh"

Outfile "sc-installer.exe"
InstallDir "$PROGRAMFILES\SuanChou"
RequestExecutionLevel admin
;XPStyle on

;Page directory
;Page instfiles
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "SimpChinese"
;!insertmacro MUI_LANGUAGE "English"

; first load language page
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
;LoadLanguageFile "${NSISDIR}\Contrib\Language files\SimpChinese.nlf"


LangString SelectLang ${LANG_ENGLISH} "Please Select the language of the installer"
LangString SelectLang ${LANG_SIMPCHINESE} "请选择安装程序的语言"
LangString SCName ${LANG_ENGLISH} "SuanChou.lnk"
LangString SCName ${LANG_SIMPCHINESE} "算筹.lnk"
LangString Args ${LANG_ENGLISH} "-lang en"
LangString Args ${LANG_SIMPCHINESE} "-lang cn"


Section
SetOutPath $INSTDIR
File SuanChou.exe
File libgcc_s_dw2-1.dll
File libstdc++-6.dll    
File libwinpthread-1.dll
File icudt53.dll  
File icuin53.dll  
File icuuc53.dll  
File Qt5Core.dll
File Qt5Xml.dll
File Qt5Gui.dll
File Qt5Widgets.dll
File qt.conf

SetOutPath $INSTDIR\plugins\platforms
File plugins\platforms\qwindows.dll

SetOutPath $INSTDIR\images
File images\alt.ico

SetOutPath $INSTDIR\doc
File doc\*.html

SetOutPath $INSTDIR\drawing
File drawing\*.scs

SetOutPath $INSTDIR\stix
File stix\STIXGeneral-BoldItalic.otf  
File stix\STIXGeneral-Regular.otf
File stix\STIXGeneral-Bold.otf  
File stix\STIXGeneral-Italic.otf

SetShellVarContext all

CreateShortCut "$DESKTOP\$(SCName)" "$INSTDIR\SuanChou.exe" "$(Args)" "$INSTDIR\images\alt.ico" 0
CreateShortCut "$SMPROGRAMS\$(SCName)" "$INSTDIR\SuanChou.exe" "$(Args)" "$INSTDIR\images\alt.ico" 0

WriteUninstaller $INSTDIR\uninstaller.exe
SectionEnd

Section "Uninstall"
SetShellVarContext all

rmDir /r "$INSTDIR"
delete "$DESKTOP\$(SCName)"
delete "$SMPROGRAMS\$(SCName)"
SectionEnd

;--------------------------------

Function .onInit

    ;Language selection dialog

    Push ""
    Push ${LANG_ENGLISH}
    Push English
    Push ${LANG_SIMPCHINESE}
    Push "中文"
    Push A ; A means auto count languages
           ; for the auto count to work the first empty push (Push "") must remain
    LangDLL::LangDialog "Installer Language" $(SelectLang)

    Pop $LANGUAGE
    StrCmp $LANGUAGE "cancel" 0 +2
        Abort
FunctionEnd





查看完整版本: [-- 用NSIS建安装包时,如何设置“发行者” (Publisher) --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled