请把轻狂志网址 www.flighty.cn 加入收藏夹,其他俱为假冒,谨防被骗!赞助请点 这里!找东东请用右边的搜索 ===>
05 2013-09

NSIS:超级轻量皮肤SkinH(含皮肤文件及调用方法)

作者:少轻狂 | 发布:2011-04-13 | 更新:2013-09-05 | 分类:部署 | Disposition | 热度:

这虽然是一个其他软件的皮肤控件,不过拿来用到NSIS上还是不错的。控件加皮肤文件只有100多K,可以说是比较难得了!


 

看一下效果:

 

 
代码示例:

#皮肤演示程序  少轻狂 www.flighty.cn

!define PRODUCT_NAME "My application"
SetCompressor lzma
!include "MUI.nsh"

!define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "SimpChinese"

Name "皮肤演示程序"
OutFile "皮肤演示.exe"
InstallDir "$PROGRAMFILES\My application"

Section
SectionEnd

Function onGUIInit
  InitPluginsDir
  SetOutPath $PLUGINSDIR
  File SkinH.dll
  File skinh.she
  System::Call SkinH::SkinH_Attach()

################ SkinSharp补丁, 让小衣服不显示 ################
  System::Call Kernel32::GetModuleHandle(t"SkinH.dll")i.r0
  IntOp $0 $0 + 0x0002CA98
  System::Call Kernel32::GetCurrentProcess()i.s
  System::Call Kernel32::VirtualProtectEx(is,ir0,i4,i0x40,*i)
  System::Call "*$0(&i1 0)"
###############################################################
FunctionEnd

Function .onGUIEnd
; 让插件目录可顺利删除
  System::Call Kernel32::GetModuleHandle(t"SkinH.dll")i.s
  System::Call Kernel32::FreeLibrary(is)
  System::Call Kernel32::SetCurrentDirectory(t"$EXEDIR\")
FunctionEnd
 
 
插件下载:
 

标签:NSIS(49)SkinH(1)皮肤(2)