查看: 780|回复: 0
打印 上一主题 下一主题

幸运飞艇开奖记录快开: [源码] 仿寒星随意录Win10Opt_v11安装界面

[复制链接]
  • TA的每日心情
    开心
    10 小时前
  • 江西快3走势图开奖结果 www.d0ht9.cn 签到天数: 321 天

    [LV.8]以坛为家I

    12

    主题

    38

    帖子

    5099

    积分

    积分
    5099
    跳转到指定楼层
    楼主
    发表于 2018-4-20 23:14:46 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
    本帖最后由 xt2zsun 于 2018-4-20 23:17 编辑

    想是想模仿寒星随意录的Win10Opt_v11安装界面,但是觉得未啃动。虽然本脚本可以运行安装,但不知道是否有什么弊端或隐患。所以请各位多多指教。另外寒星随意录似乎有个bug,见界面图。不知是脚本问题还是nsdialogs插件本身的缘故。
    #压缩设置
      SetCompressor /SOLID lzma
      SetCompressorDictSize 32
      SetDatablockOptimize on
      SetCompress auto
    Var Link
    Var Dialog
    Var Checkbox01
    Var Checkbox02
    Var Checkbox03
    Var Checkbox04
    Var Checkbox05
    Var Checkbox06
    Var Checkbox01_State
    Var Checkbox02_State
    Var Checkbox03_State
    Var Checkbox04_State
    Var Checkbox05_State
    Var Checkbox06_State
    Var Button1
    Var Button2
    Var Button3
    Var RadioButton01
    Var RadioButton02
    Var RadioButton03
    Var RadioButton01_State
    Var RadioButton02_State
    Var RadioButton03_State

    #预先载入文件,方便安装加速释放
      ReserveFile "Res\top.bmp"
    ;  ReserveFile "${NSISDIR}\Plugins\System.dll"
    #头文件
      !include "MUI2.nsh"
      !include "UsefulLib.nsh"
      !include "Winver.nsh"

    #界面相关
      !define MUI_ICON "Res\io.ico"
      !define MUI_HEADERIMAGE
      !define MUI_HEADERIMAGE_BITMAP "Res\top.bmp"
      !define MUI_CUSTOMFUNCTION_GUIINIT .MyGUIInit
      !define MUI_FINISHPAGE_NOAUTOCLOSE
      page custom show leave
      Page custom install
      
    #相关宏
    !insertmacro MUI_LANGUAGE "SimpChinese"
    MiscButtonText "" "执行" "" "完成"
    BrandingText 仿寒星随意录界面II
    !define WM_SETBLOB 0x0470
    #使用自定义UI
      ChangeUI all "LoadUI0.exe"
    #程序设置
      Caption "绿化工具"
      OutFile "绿化工具.exe"
      XPStyle on
    #程序执行前操作
      Function .oninit
    InitPluginsDir
    SetOutPath $PLUGINSDIR
    File "Res\top.bmp"
    FunctionEnd
    #定义要创建的控件(ID不能重复,否则会产生未知错误!)
      ;定义关于按钮
      !ifndef IDC_BUTTON
      !define IDC_BUTTON    1190
      !endif
      ;创建公共函数
      !macro MYMACRO un
      Function ${un}.AboutButton
        MessageBox MB_OK|MB_ICONINFORMATION "语音库源于微软服务器移植版可与$\n Windows10桌面语音库媲美"
      FunctionEnd
      Function ${un}.MyGUIInit
      InitPluginsDir
      GetDlgItem $0 $HWNDPARENT 2 #
      ShowWindow $0 ${SW_HIDE}    #
        ;创建按钮
        ;用法:${CreateButton2} 显示文本 X轴位置 Y轴位置 宽度 高度 父窗口窗口句柄 控件ID 目标函数
         ${CreateButton2} "关于(&A)" 14 213 74 21 $HWNDPARENT ${IDC_BUTTON} ${un}.AboutButton #
      FunctionEnd
    !macroend
      ;插入安装函数
      !insertmacro MYMACRO ""
    #函数定义
      Function show
      nsDialogs::Create 1018
      File "/oname=$PLUGINSDIR\top.bmp" "Res\top.bmp"
      SetBrandingImage /IMGID=1046 $PLUGINSDIR\top.bmp
      GetDlgItem $0 $HWNDPARENT 1046
    System::Call 'User32::GetWindowLong(i r0, i ${GWL_STYLE})i.r1'
    System::Call 'User32::SetWindowLong(i r0, i ${GWL_STYLE}, i $1|${SS_NOTIFY})'
    SendMessage $0 ${STM_GETIMAGE} 0 0 $1
    nsWater::Set $0 $1
    SendMessage $0 ${WM_SETBLOB} 10 200
    SendMessage $0 ${WM_MOUSEMOVE} 0 0x00200050
    SendMessage $0 ${WM_SETBLOB} 3 50
    Pop $Dialog
    ${If} $Dialog == error
    Abort
    ${EndIf}
    ${NSD_CreateGroupBox} 0% 0% 100% 105% "微软中英文语音库便携工具"
    ${NSD_CreateCheckBox} 5u 10u 95u 16u " 美式英语ZiraPro女声"
    Pop $CheckBox01
    ${NSD_CreateCheckBox} 5u 25u 95u 16u " 美式英语Helen女声"
    Pop $CheckBox02
    ${NSD_CreateCheckBox} 5u 40u 95u 16u " 英式英语Hazel女声"
    Pop $CheckBox03
    ${NSD_CreateCheckBox} 5u 55u 95u 16u " 澳大利亚Hayley女声"
    Pop $CheckBox04
    ${NSD_CreateCheckBox} 5u 70u 95u 16u " 加拿大Heather女声"
    Pop $CheckBox05
    ${NSD_CreateCheckBox} 5u 85u 95u 16u " 普通话 HuiHui 女声"
    Pop $CheckBox06
    ${NSD_CreateButton} 100u 45u 70u 16u "*XP系统必装*"
    Pop $Button1
        ${NSD_OnClick} $Button1 MustInst
    ${NSD_CreateButton} 100u 20u 70u 16u "*W7系统必装*"
    Pop $Button2
      ${NSD_OnClick} $Button2 7MustInst
      
    ${NSD_CreateButton} 100u 70u 70u 16u "*语音库卸载*"
    Pop $Button3
      ${NSD_OnClick} $Button3 Uninst
    ${NSD_CreateVline} 180u 2u 1u 100u ""
    ${NSD_CreateRadioButton} 190u 16u 70u 10u " 语音库全选"
    Pop $RadioButton01
    ${NSD_OnClick} $RadioButton01 onRadioButton01
    SetCtlColors $RadioButton01 "" C5DEF0
    ${NSD_CreateRadioButton} 190u 36u 70u 10u " 语音库推荐"
    Pop $RadioButton02
    ${NSD_OnClick} $RadioButton02 onRadioButton02
    SetCtlColors $RadioButton02 "" C5DEF0
    ${NSD_CreateRadioButton} 190u 56u 70u 10u " 语音库全否"
    Pop $RadioButton03
    ${NSD_OnClick} $RadioButton03 onRadioButton03
    SetCtlColors $RadioButton03 "" C5DEF0
    ${NSD_CreateLink} 190u 76u 100% 10u "  NSIS中文论坛"
    Pop $Link
    ${NSD_OnClick} $Link onClickMyLink
        nsDialogs::Show
      Functionend
    Function onCheckbox01
    ${NSD_OnClick} $Checkbox01 onCheckbox01
    SetCtlColors $Checkbox01 "" C5DEF0
    SendMessage $Checkbox01 ${BM_GETCHECK} 0 0 $0
    SendMessage $RadioButton03 ${BM_GETCHECK} 0 0
    FunctionEnd
    Function onCheckbox02
    ${NSD_OnClick} $Checkbox02 onCheckbox02
    SetCtlColors $Checkbox02 "" C5DEF0
    SendMessage $Checkbox02 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox03
    ${NSD_OnClick} $Checkbox03 onCheckbox03
    SetCtlColors $Checkbox03 "" C5DEF0
    SendMessage $Checkbox03 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox04
    ${NSD_OnClick} $Checkbox04 onCheckbox04
    SetCtlColors $Checkbox04 "" C5DEF0
    SendMessage $Checkbox04 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox05
    ${NSD_OnClick} $Checkbox05 onCheckbox05
    SetCtlColors $Checkbox05 "" C5DEF0
    SendMessage $Checkbox05 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onCheckbox06
    ${NSD_OnClick} $Checkbox06 onCheckbox06
    SetCtlColors $Checkbox06 "" C5DEF0
    SendMessage $Checkbox06 ${BM_GETCHECK} 0 0 $0
    FunctionEnd
    Function onRadioButton01
    SendMessage $RadioButton01 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton01 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 1 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox04 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox05 ${BM_SETCHECK} 1 0
    SendMessage $Checkbox06 ${BM_SETCHECK} 1 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton01!"
      ${endif}
      ${NSD_GetState} $RadioButton01 $RadioButton01_State
    FunctionEnd
    Function onRadioButton02
    SendMessage $RadioButton02 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton02 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 1 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox04 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox05 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox06 ${BM_SETCHECK} 1 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton02!"
      ${endif}
      ${NSD_GetState} $RadioButton02 $RadioButton02_State
    FunctionEnd
    Function onRadioButton03
    SendMessage $RadioButton03 ${BM_GETCHECK} 0 0 $0
    ${NSD_GETSTATE} $RadioButton03 $0
      ${if} $0 == 1
      SendMessage $Checkbox01 ${BM_SETCHECK} 0 0
      SendMessage $Checkbox02 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox03 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox04 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox05 ${BM_SETCHECK} 0 0
    SendMessage $Checkbox06 ${BM_SETCHECK} 0 0
    MessageBox MB_OK|MB_ICONINFORMATION|MB_TOPMOST "RadioButton03!"
      ${endif}
      ${NSD_GetState} $RadioButton03 $RadioButton03_State
    FunctionEnd
    Function onClickMyLink
    Pop $Link
    ExecShell open 江西快3走势图开奖结果
    FunctionEnd

    Function leave
      Call Install
    Functionend
    Function install
      SetOverwrite try
      SetOutPath "$EXEDIR"
      ${NSD_GETSTATE} $CHECKBOX01 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox01 $Checkbox01_State
      ${NSD_GETSTATE} $CHECKBOX02 $0
      ${if} $0 == 1
       ;省略:写注册表
      ${endif}
    ${NSD_GetState} $Checkbox02 $Checkbox02_State
    ${NSD_GETSTATE} $CHECKBOX03 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox03 $Checkbox03_State
      ${NSD_GETSTATE} $CHECKBOX04 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox04 $Checkbox04_State
      
      ${NSD_GETSTATE} $CHECKBOX05 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox05 $Checkbox05_State
      
        ${NSD_GETSTATE} $CHECKBOX06 $0
      ${if} $0 == 1
      ;省略:写注册表
      ${endif}
      ${NSD_GetState} $Checkbox06 $Checkbox06_State
      Sleep 200
      Return
    FunctionEnd
    Function MustInst
    ${Unless} ${IsWinXP}
    MessageBox MB_OK "非XP系统,请点击Win7系统必装"
    Abort
    ${EndIf}
      ;省略:写注册表
      ;省略:安装软件
    Return
    FunctionEnd
    Function 7MustInst
    ${Unless} ${IsWin7}
    MessageBox MB_OK "非Win7系统,请点击XP系统必装"
    Abort
    ${EndIf}
      ;省略:写注册表
      ;省略:安装软件
         Return
    FunctionEnd
    Function Uninst
    ; 省略:卸载注册表
          MessageBox MB_YESNO|MB_ICONINFORMATION|MB_TOPMOST "语音库卸载完毕!是否继续卸载语音库支持?" \
       /SD IDYES IDYES label_yes IDNO label_no
    label_no:
    Quit
    label_yes:
       ;省略:卸载软件
         Return
    FunctionEnd
    Section
    sectionend

    仿.png (45.57 KB, 下载次数: 10)

    仿.png

    界面.png (38.03 KB, 下载次数: 8)

    界面.png
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|联系我们|江西快3走势图开奖结果    

    GMT+8, 2019-4-20 18:38 , Processed in 0.021809 second(s), 15 queries , MemCache On.

    Powered by Discuz!X3.3

    Copyright © 2015-2018 江西快3走势图开奖结果

    快速回复 江西快3走势图开奖结果 返回列表
  • 候选企业:亿利资源集团 2019-04-20
  • 你遇到了吗用户吐槽升iOS 11.4后耗电过快用户吐槽升iOS11后耗电过快-行情资讯 2019-04-20
  • 凤凰、永久、二八车,那些年满街的自行车,您还记得吗? 2019-04-11
  • 云南普洱市澜沧县发生3.0级地震 震源深度8千米 2019-04-11
  • 湖南建立企业研发投入后补助机制 2019-04-04
  • 故宫文创产品在韩国展出 2019-04-01
  • 重庆将建第二国际机场发改委已启动前期规划 2019-04-01
  • 全省首条民国风情旅游专线湖州德清“开跑” 2019-03-31
  • 92岁大爷成网红:每天直播唱歌 2019-03-31
  • 咱主张不由市场发挥全部作用,是因为市场受需求引导,而需求又分正义需求和邪恶需求。 2019-03-29
  • 长治职业技术学院“学习新思想千万师生同上一堂课活动”首场授课开讲 2019-03-29
  • 鹅卵石创作球星马赛克肖像 2019-03-26
  • 高德置地广场荣获RICS China Awards 2018三项殊荣 2019-03-16
  • 我国社会主义社会是无阶级的阶层社会,不存在剥削阶级和被剥削阶级,但存在富裕阶层和贫困阶层。 2019-03-15
  • 12支滑水队齐聚武宁 演绎水上版“速度与激情”(图) 2019-03-15
  • 924| 293| 702| 34| 994| 267| 214| 299| 176| 866|