/*
nsWeb是NSIS显示自定义网页界面或IE窗口控件的插件
nsWeb可以显示一个网页或者打开一个网页,还可以用于安装界面里的幻灯片操作.
*/
!include "MUI2.nsh"
Name nsWeb
OutFile nsWeb-MUI.exe
InstallDir $EXEDIR
ShowInstDetails show
XPStyle on
!insertmacro MUI_PAGE_DIRECTORY
Page custom "ShowWebControl" "" ": WebBrowser control web dialog"
Page custom "ShowHTMLControl" "" ": WebBrowser control html file dialog"
Page custom "ShowHTMLText" "" ": WebBrowser control html text dialog"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "ShowPopURL"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function .onInit
InitPluginsDir
# Drop everything into the $PLUGINSDIR on init.
# For quick calling at its time
File /oname=$PLUGINSDIRnsWeb.dll ${NSISDIR}PluginsnsWeb.dll
File /oname=$PLUGINSDIRfile1.htm file1.htm
File /oname=$PLUGINSDIRfile2.htm file2.htm
FunctionEnd
Function "ShowWebControl"
!insertmacro MUI_HEADER_TEXT "Testing nsWeb plugin" "You are watching http://nsis.sf.net"
nsWeb::ShowWebInPage "http://nsis.sf.net"
FunctionEnd
Function "ShowHTMLControl"
!insertmacro MUI_HEADER_TEXT "Testing nsWeb plugin" "You are watching file1.htm"
nsWeb::ShowWebInPage "$PLUGINSDIRfile1.htm"
FunctionEnd
Function "ShowHTMLText"
!insertmacro MUI_HEADER_TEXT "Testing nsWeb plugin" "You are watching plain HTML text"
nsWeb::ShowHTMLInPage "<b>I'm a <u>HTML text</u></b>"
FunctionEnd
Function "ShowPopURL"
nsWeb::ShowWebInPopUp "$PLUGINSDIRfile2.htm"
FunctionEnd
Section "Detect Internet?"
nsWeb::IsInet 3
DetailPrint "Do you have Internet connection: $3"
SectionEnd
Section -default
DetailPrint "It's over!"
SectionEnd
© 版权声明
THE END
暂无评论内容