ces

outfile "LoadMaster_Enterprise_Setup.exe"
!include "mui.nsh"
page license
page directory
page instfiles
loadlanguagefile "D:\Program Files\NSIS\Contrib\Language files\TradChinese.nlf"
loadlanguagefile "D:\Program Files\NSIS\Contrib\Language files\simpChinese.nlf"
loadlanguagefile  "D:\Program Files\NSIS\Contrib\Language files\English.nlf"
icon f:\tub\LD.ico

 ;InstallButtonText 安装
InstallDir $programfiles\LoadMaster
InstallDirRegKey HKLM Software\loadmaster path
;LicenseData f:\cnLicence.txt

LicenseLangString ln ${LANG_SIMPCHINESE} f:\cnlicence.txt
LicenseLangString ln ${LANG_ENGLISH} f:\enlicence.txt
LicenseLangString ln ${LANG_TRADCHINESE} f:\tnlicence.txt
LicenseData $(ln)

;LicenseData /LANG=${LANG_ENGLISH} "f:\enlicence.txt"
;LicenseData /LANG=${LANG_SIMPCHINESE} "f:\cnlicense.txt"
;LicenseData /LANG=${LANG_TRADCHINESE} "f:\tnlicense.txt"


 ;InstallDirRegKey HKLM software\loadmaster 11
BrandingText    "http://www.zhuangxiang.com/"
section
strcpy $0 $language
messagebox MB_OK "$0"
sectionend

Name $(Name)

LangString Name ${LANG_ENGLISH} "LoadMaster_Enterprise"
LangString Name ${LANG_SIMPCHINESE}  "装箱大师企业版"


;Section
;${switch}  $0
;${Case} 2052
;call sc
; ${Break}
; ${Case} 1033
;call ec
;  ${Break}
;  sectionend
;scn:
;caption  装箱大师企业版

;function ec
;caption LoadMaster_Enterprise
;functionend
 

;CompletedText       你已经完成装箱大师的安装
section
setoutpath $INSTDIR
file f:\tub\pic.bmp
 WriteRegStr HKLM   software\loadmaster version "4.0"
 writeregstr HKLM   software\loadmaster path "$INSTDIR"
 

;messagebox MB_OK  ${LANG_TRADCHINESE}
;messagebox MB_OK ${lang_simpchinese}
;messagebox MB_OK  ${LANG_ENGLISH}

;messagebox MB_OK  $language

sectionend
;CheckBitmap   f:\tub\pic2.bmp
Section "MainSection"
  SetOutPath "$INSTDIR"
  CreateDirectory "$SMPROGRAMS\装箱大师企业版"
  CreateShortCut "$SMPROGRAMS\装箱大师企业版\装箱大师企业版4.0.lnk" "$INSTDIR\LoadMasterMain.exe"
  CreateShortCut "$DESKTOP\装箱大师企业版4.0.lnk" "$INSTDIR\LoadMasterMain.exe"
setoutpath  $INSTDIR
file /r  "f:\abc\*.*"
;file /r  "f:\workspace2\*.*"
;setoutpath  $INSTDIR
;ExecWait '"$INSTDIR\vcredist_x86.exe"'
SectionEnd

function .onInit
  Push ""
  Push ${LANG_ENGLISH}
  push "English"
  push ${LANG_TRADCHINESE}
  Push "Traditional Chinese"
  Push ${LANG_SIMPCHINESE}
  Push "Simplified Chinese"
 Push A ; A means auto count languages
         ; for the auto count to work the first empty push (Push "") must remain
  LangDLL::LangDialog "Installer Language" "Please select a language $\n 请选择语言 $\n 請選擇語言   "

  Pop $LANGUAGE
;  messagebox MB_OK "$LANGUAGE"
;  messagebox MB_OK "$A"
  StrCmp $LANGUAGE "cancel" 0 +2
    Abort

FunctionEnd

posted @ 2008-10-02 15:14  kin2321  阅读(227)  评论(0编辑  收藏  举报