最新消息:

精睿永恒心锁USBPE制作工具(界面开源)

nsis 永恒心锁 1933浏览 0评论

精睿永恒心锁USBPE制作工具(界面开源)

https://yunpan.cn/crJQm2pAPUTBB (提取码:ee86)

 

/*编写 www.yhxs3344.net by yhxs3344 永恒心锁*/
!packhdr temp.dat 'cmd /c Copy /B temp.dat /B +www.yhxs3344.net.rar temp.dat' ;可去除
;变量声明
Var MSG
Var BGImage
Var MiddleImage ;中间的大Logo
Var ImageHandle
Var Close ;关闭按钮
Var mini ;最小化
Var diy ;个性设置
Var fud ;初始化优盘
Var help ;帮助说明
Var Iso ;ISO制作
Var oku ;一键制作启动盘
Var simulation ;
Var soft ;常用软件
Var upd ;升级U盘启动
Var usb ;优盘启动
Var website ;官方网站
Var topfont ;头部标题
;Var windows ;操作系统

;---------------------------全局编译脚本预定义的常量-----------------------------------------------------
; MUI 预定义常量
!define MUI_ABORTWARNING
;安装图标的路径名字
!define MUI_ICON "ico\usb.ico"
!define MUI_UI "UI\mod.exe" ;UI程序
;---------------------------设置软件压缩类型(也可以通过外面编译脚本控制)------------------------------------
SetCompressor lzma ;压缩
SetCompress force
XPStyle on
; ------ MUI 现代界面定义 (1.67 版本以上兼容) ------
!include "MUI2.nsh"
!include "WinCore.nsh"
!include "nsWindows.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit
;------------------------------------------------------
;自定义页面
Page custom WelcomePage
;------------------------------------------------------
; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "SimpChinese"
;------------------------------------------------------
!define PRODUCT_VERSION "1.0.0.0" ;版本号
!define PRODUCT_NAME "Vc52Yhxs3344MakeUsbPe" ;生成的EXE名字
;----------------------------------------------------------------------------------------------------
;版本信息
VIProductVersion ${PRODUCT_VERSION}
VIAddVersionKey /LANG=2052 "${PRODUCT_NAME}" "${PRODUCT_VERSION}"
VIAddVersionKey /LANG=2052 "Comments" "yhxs3344.net"
VIAddVersionKey /LANG=2052 "CompanyName" "http://www.yhxs3344.net"
VIAddVersionKey /LANG=2052 "LegalTrademarks" "永恒心锁工作室"
VIAddVersionKey /LANG=2052 "LegalCopyright" "(C) yhxs3344.net All Rights Reserved."
VIAddVersionKey /LANG=2052 "FileDescription" "永恒心锁PE"
VIAddVersionKey /LANG=2052 "FileVersion" "${PRODUCT_VERSION}"
;------------------------------------------------------------------------------------------------------
; 检测程序是否已运行
!macro CheckRunningPrograms MutexName
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${MutexName}") i .r1 ?e'
Pop $R0
${If} $R0 <> 0
;另一个程序正在运行中!
Messagebox MB_TOPMOST|MB_ICONINFORMATION|MB_OK "安装程序已经在运行,请不要多次打开程序"
Quit
${EndIf}

!macroend

;------------------------------------------------------MUI 现代界面定义以及函数结束------------------------
;应用程序显示名字
Name "Vc52 Yhxs3344 Make Usb Pe"

;应用程序输出路径
OutFile "${PRODUCT_NAME}.exe"

Function .onInit
!insertmacro CheckRunningPrograms "${yhxs3344pesetup}" ;安装程序运行检测的变量
InitPluginsDir ;初始化插件

File "/oname=$PLUGINSDIR\SkinSE.dll" "Plugins\SkinSE.dll" ;皮肤插件

File `/ONAME=$PLUGINSDIR\bg.bmp` `img\bg.bmp` ;背景图片
File `/ONAME=$PLUGINSDIR\btn-close.bmp` `img\btn-close.bmp` ;关闭图片
File `/ONAME=$PLUGINSDIR\btn-min.bmp` `img\btn-min.bmp` ; 最小化图片
File `/ONAME=$PLUGINSDIR\btn-usb.bmp` `img\btn-usb.bmp` ; U盘启动图片
File `/ONAME=$PLUGINSDIR\btn-Iso.bmp` `img\btn-Iso.bmp` ; ISO制作图片
File `/ONAME=$PLUGINSDIR\btn-soft.bmp` `img\btn-soft.bmp` ; 常用工具图片
File `/ONAME=$PLUGINSDIR\btn-oku.bmp` `img\btn-oku.bmp` ; 一键制作启动优盘图片
File `/ONAME=$PLUGINSDIR\btn-help.bmp` `img\btn-help.bmp` ; 帮助中心图片
File `/ONAME=$PLUGINSDIR\btn-diy.bmp` `img\btn-diy.bmp` ; 个性设置图片
File `/ONAME=$PLUGINSDIR\btn-website.bmp` `img\btn-website.bmp` ; 官方网站图片
File `/ONAME=$PLUGINSDIR\heart.BMP` `img\heart.BMP` ; 中心说明图片
File `/ONAME=$PLUGINSDIR\btn-fud.bmp` `img\btn-fud.bmp` ; 初始化优盘图片
File `/ONAME=$PLUGINSDIR\btn-upd.bmp` `img\btn-upd.bmp` ; 升级优盘图片
File `/ONAME=$PLUGINSDIR\btn-simulation.bmp` `img\btn-simulation.bmp` ; 模拟启动图片

;使用ReserveFile是加快安装包展开速度,具体请看帮助
ReserveFile "img\btn-min.bmp"
ReserveFile "img\btn-close.bmp"
ReserveFile "img\btn-usb.bmp"
ReserveFile "img\btn-Iso.bmp"
ReserveFile "img\btn-soft.bmp"
ReserveFile "img\btn-oku.bmp"
ReserveFile "img\btn-help.bmp"
ReserveFile "img\btn-diy.bmp"
ReserveFile "img\btn-website.bmp"
ReserveFile "img\heart.BMP"
ReserveFile "img\btn-fud.bmp"
ReserveFile "img\btn-upd.bmp"
ReserveFile "img\btn-simulation.bmp"
;初始化
SkinBtn::Init "$PLUGINSDIR\btn-min.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-close.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-usb.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-Iso.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-soft.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-help.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-website.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-fud.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-upd.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-simulation.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-diy.bmp"
SkinBtn::Init "$PLUGINSDIR\btn-oku.bmp"
FunctionEnd

Function onGUIInit
;消除边框
System::Call `user32::SetWindowLong(i$HWNDPARENT,i${GWL_STYLE},0x9480084C)i.R0`
;隐藏一些既有控件
GetDlgItem $0 $HWNDPARENT 1034
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1035
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1036
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1037
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1038
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1039
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1256
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1028
ShowWindow $0 ${SW_HIDE}

${NSW_SetWindowSize} $HWNDPARENT 370 649 ;改变主窗体大小
System::Call User32::GetDesktopWindow()i.R0

FunctionEnd

;处理无边框移动
Function onGUICallback
${If} $MSG = ${WM_LBUTTONDOWN}
SendMessage $HWNDPARENT ${WM_NCLBUTTONDOWN} ${HTCAPTION} $0
${EndIf}
FunctionEnd

Function WelcomePage
GetDlgItem $0 $HWNDPARENT 1
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 2
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 3
ShowWindow $0 ${SW_HIDE}

nsDialogs::Create 1044
Pop $0
${If} $0 == error
Abort
${EndIf}
${NSW_SetWindowSize} $0 370 649 ;改变Page大小
;SetCtlColors $0 "" transparent ;背景设成透明

;最小化按钮
${NSD_CreateButton} 298 0 30 21 ""
Pop $mini
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-min.bmp $mini
GetFunctionAddress $3 mini
SkinBtn::onClick $mini $3

;关闭按钮
${NSD_CreateButton} 328 0 41 21 ""
Pop $close

SkinBtn::Set /IMGID=$PLUGINSDIR\btn-close.bmp $close
GetFunctionAddress $3 onABORT
SkinBtn::onClick $close $3
;U盘启动
${NSD_CreateButton} 2 81 88 36 ""
Pop $usb
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-usb.bmp $usb
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $usb $3

;ISO制作
${NSD_CreateButton} 90 81 88 36 ""
Pop $Iso
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-Iso.bmp $Iso
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $Iso $3

;常用软件
${NSD_CreateButton} 178 81 88 36 ""
Pop $soft
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-soft.bmp $soft
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $soft $3

;官方网站
${NSD_CreateButton} 266 81 88 36 ""
Pop $website
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-website.bmp $website
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $website $3

;一键制作启用优盘
${NSD_CreateButton} 121 520 128 24 ""
Pop $oku
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-oku.bmp $oku
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $oku $3

;帮助中心
${NSD_CreateButton} 92 585 80 24 ""
Pop $help
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-help.bmp $help
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $help $3

;个性设置
${NSD_CreateButton} 2 585 90 24 ""
Pop $diy
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-diy.bmp $diy
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $diy $3

;初始化优盘
${NSD_CreateButton} 139 553 88 24 ""
Pop $fud
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-fud.bmp $fud
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $fud $3

;模拟启动
${NSD_CreateButton} 227 553 100 24 ""
Pop $simulation
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-simulation.bmp $simulation
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $simulation $3

;升级优盘
${NSD_CreateButton} 41 553 98 24 ""
Pop $upd
SkinBtn::Set /IMGID=$PLUGINSDIR\btn-upd.bmp $upd
;GetFunctionAddress $3 onABORT
SkinBtn::onClick $upd $3

;中心说明
${NSD_CreateBitmap} 2 119 366 348 ""
Pop $0
${NSD_SetImage} $0 $PLUGINSDIR\heart.BMP $ImageHandle

; 头部标题文字
${NSD_Createlabel} 2 2 200 20 "精睿永恒心锁USBPE制作工具"
Pop $topfont
SetCtlColors $topfont F2EDEB transparent ;前景色,背景设成透明
CreateFont $topfont "宋体" 15 0 ;字体和大小

; 操作系统
/* ${NSD_Createlabel} 200 621 200 28 "操作系统"
Pop $windows
GetFunctionAddress $3 onwindows
SkinBtn::onClick $windows $3
SetCtlColors $windows F2EDEB transparent ;前景色,背景设成透明
CreateFont $windows $frontName "9" "1400" ;字体和字号
*/
;贴背景大图
${NSD_CreateBitmap} 0 0 100% 100% ""
Pop $BGImage
${NSD_SetImage} $BGImage $PLUGINSDIR\bg.bmp $ImageHandle

GetFunctionAddress $0 onGUICallback
WndProc::onCallback $BGImage $0 ;处理无边框窗体移动
nsDialogs::Show
${NSD_FreeImage} $ImageHandle

FunctionEnd

Function onABORT ;关闭命令
SendMessage $hwndparent ${WM_CLOSE} 0 0
KillProcDLL::KillProc $EXEFILE
FunctionEnd

Function mini ;最小化执行命令

ShowWindow $hwndparent ${SW_MINIMIZE}

FunctionEnd
 Section MainSetup
 SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 精睿永恒心锁USBPE制作工具(界面开源)

您必须 登录 才能发表评论!