脚本:医保农合接口(应用了Flash)
优质
小牛编辑
138浏览
2023-12-01
引用脚本的内容:
; 该脚本应使用NSIS编译器编译 ; 安装程序初始定义常量 !define PRODUCT_NAME "医保农合接口" !define PRODUCT_VERSION "9.3" !define PRODUCT_PUBLISHER "jljyczy" SetCompressor lzma Var hFlash ;定义Flash句柄变量 ; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------ !include "MUI.nsh" ; MUI 预定义常量 !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_ABORTWARNING !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" !define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\win.bmp" !define MUI_HEADERIMAGE_UNBITMAP "${NSISDIR}\Contrib\Graphics\Header\orange-uninstall.bmp" ; Flash 运行页面 !define MUI_PAGE_CUSTOMFUNCTION_PRE Pre !define MUI_PAGE_CUSTOMFUNCTION_SHOW Show !define MUI_PAGE_CUSTOMFUNCTION_LEAVE Leave ; 欢迎页面 !insertmacro MUI_PAGE_WELCOME ; 组件选择页面 !insertmacro MUI_PAGE_COMPONENTS ; 安装目录选择页面 !insertmacro MUI_PAGE_DIRECTORY ; 安装过程页面 !insertmacro MUI_PAGE_INSTFILES ; Flash 运行页面 !define MUI_PAGE_CUSTOMFUNCTION_Pre Pre !define MUI_PAGE_CUSTOMFUNCTION_SHOW Show !define MUI_PAGE_CUSTOMFUNCTION_LEAVE Leave ; 安装完成页面 !insertmacro MUI_PAGE_FINISH ; 安装卸载过程页面 !insertmacro MUI_UNPAGE_INSTFILES ; 安装界面包含的语言设置 !insertmacro MUI_LANGUAGE "SimpChinese" ; 安装预释放文件 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ; ------ MUI 现代界面定义结束 ------ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "医保农合接口.exe" InstallDir "$PROGRAMFILES\UFSoft" InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" ShowInstDetails show ShowUnInstDetails show BrandingText "Copyright (C) 2006-2010 jljyczy" ; -------------- Flash 开始运行 -------------- ReserveFile "${NSISDIR}\Plugins\System.dll" ReserveFile "${NSISDIR}\Plugins\FlashLib.dll" ;ReserveFile "${NSISDIR}\Examples\FlashLib\1.swf" ReserveFile "1.swf" Section "" SectionEnd Function .onInit InitPluginsDir !define MySWF "$PLUGINSDIR\1.swf" ;File "/oname=${MySWF}" "${NSISDIR}\Examples\FlashLib\1.swf" File "/oname=${MySWF}" "1.swf" File "/oname=$PLUGINSDIR\FlashLib.dll" "${NSISDIR}\Plugins\FlashLib.dll" FunctionEnd Function Pre FunctionEnd Function Show ;System::Call 'user32::LoadImage(i,t,i,i,i,i,) i (0,"$PLUGINSDIR\modern-wizard.bmp",0,0,0,0x2010) .s' Pop $R0 !insertmacro INSTALLOPTIONS_READ $R1 "ioSpecial.ini" "Field 1" "HWND" ;读取图片容器的句柄 System::Call '$PLUGINSDIR\FlashLib::FlashLibInit(i,i,i,i,i,i,i) i (0,0,164,291,$R1,$R0,true) .s' Pop $hFlash System::Call '$PLUGINSDIR\FlashLib::FlashLoadMovie(i,t) i ($hFlash, "${MySWF}")' FunctionEnd Function Leave System::Call '$PLUGINSDIR\FlashLib::FlashLibFree(i $hFlash)' FunctionEnd