• 3327阅读
  • 0回复

[提问]用NSIS建安装包时,如何设置“发行者” (Publisher) [复制链接]

上一主题 下一主题
离线yongjie
 

只看楼主 倒序阅读 楼主  发表于: 2017-01-06

window.open('http://www.qtcn.org/bbs/attachment/Mon_1701/8_124578_150f31f3405b249.png?125');" style="max-width:700px;max-height:700px;" onload="if(is_ie6&&this.offsetWidth>700)this.width=700;" >
用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



快速回复
限100 字节
 
上一个 下一个