NSIS皮肤插件

对于一般的安装不推荐使用皮肤,因为此插件的最大缺点是容量大了,单单个DLL就4.02MB,而且还要附加.skf作为插件调用的皮肤!假如安装包大小过500MB或以上的使用也不错,至少能漂亮一些!

压缩包内有几个皮肤以及插件与说明,还有示例脚本,一看则明!

;NSIS_SkinCrafter_Plugin   
;Basic Example Script   
  
Function .onInit   
    ;User defined skin   
    SetOutPath $TEMP   
    File /oname=Deka_ST.skf "Deka_ST.skf"  
    NSIS_SkinCrafter_Plugin::skin /NOUNLOAD $TEMPDeka_ST.skf   
    Delete $TEMPDeka_ST.skf   
  
    ;Default Skin   
    ;NSIS_SkinCrafter_Plugin::skin /NOUNLOAD   
FunctionEnd   
  
Function .onGUIEnd   
 NSIS_SkinCrafter_Plugin::destroy   
FunctionEnd   
  
Function un.onInit   
    ;User defined skin   
    ;SetOutPath $TEMP   
    ;File /oname=Skinastic.skf "Skinastic.skf"  
    ;NSIS_SkinCrafter_Plugin::skin /NOUNLOAD $TEMPSkinastic.skf   
    ;Delete $TEMPSkinastic.skf   
  
    ;Default Skin   
    NSIS_SkinCrafter_Plugin::skin /NOUNLOAD   
FunctionEnd   
  
Function un.onGUIEnd   
 NSIS_SkinCrafter_Plugin::destroy   
FunctionEnd   
  
;--------------------------------   
;Include Modern UI   
  
  !include "MUI.nsh"  
  
;--------------------------------   
;General   
  
  ;Name and file   
  Name "NSIS SkinCrafter Plugin Test"  
  OutFile "sample.exe"  
  
  ;Default installation folder   
  InstallDir "$PROGRAMFILESNSIS SkinCrafter Plugin Test"  
  
  ;Get installation folder from registry if available   
  InstallDirRegKey HKCU "SoftwareNSIS SkinCrafter Plugin" ""  
  
;--------------------------------   
;Interface Settings   
  
  !define MUI_ABORTWARNING   
  
;--------------------------------   
;Pages   
  
  !insertmacro MUI_PAGE_COMPONENTS   
  !insertmacro MUI_PAGE_DIRECTORY   
  !insertmacro MUI_PAGE_INSTFILES   
  
  !insertmacro MUI_UNPAGE_CONFIRM   
  !insertmacro MUI_UNPAGE_INSTFILES   
  
;--------------------------------   
;Languages   
  
  !insertmacro MUI_LANGUAGE "English"  
  
;--------------------------------   
;Installer Sections   
  
Section "Dummy Section" SecDummy   
  
  SetOutPath "$INSTDIR"  
  
  ;ADD YOUR OWN FILES HERE...   
  
  ;Store installation folder   
  WriteRegStr HKCU "SoftwareNSIS SkinCrafter Plugin" "" $INSTDIR   
  
  ;Create uninstaller   
  WriteUninstaller "$INSTDIRUninstall.exe"  
  
SectionEnd   
  
;--------------------------------   
;Descriptions   
  
  ;Language strings   
  LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."  
  
  ;Assign language strings to sections   
  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN   
    !insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)   
  !insertmacro MUI_FUNCTION_DESCRIPTION_END   
  
;--------------------------------   
;Uninstaller Section   
  
Section "Uninstall"    
  ;ADD YOUR OWN FILES HERE...     
  Delete "$INSTDIRUninstall.exe"    
  RMDir "$INSTDIR"    
  DeleteRegKey /ifempty HKCU "SoftwareNSIS SkinCrafter Plugin"    
SectionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容