├── VERSION ├── base_func.vbs ├── change_dir.vbs ├── change_precomp.vbs ├── check_env.vbs ├── cleanall.bat ├── cmakerun.vbs ├── example ├── 360Safe │ ├── 360Safe_ud.exe │ ├── DuiLib_ud.dll │ └── skin │ │ └── 360SafeRes │ │ ├── ComputerExamine.xml │ │ ├── antivirus.png │ │ ├── button_hover.png │ │ ├── button_normal.png │ │ ├── button_pushed.png │ │ ├── cloud.png │ │ ├── commmon.png │ │ ├── examine_background.bmp │ │ ├── firewall.png │ │ ├── firewall_ok.png │ │ ├── horizontal_border.bmp │ │ ├── icon.ico │ │ ├── icon.png │ │ ├── logo.png │ │ ├── navigationbar.bmp │ │ ├── networkshield.png │ │ ├── preventnumber.png │ │ ├── scanbutton.png │ │ ├── scrollbar.bmp │ │ ├── skin.xml │ │ ├── softwaremanager.png │ │ ├── start.png │ │ ├── sys_dlg_close.png │ │ ├── sys_dlg_max.png │ │ ├── sys_dlg_menu.png │ │ ├── sys_dlg_min.png │ │ ├── sys_dlg_restore.png │ │ ├── tabbar_hover.png │ │ ├── tabbar_normal.png │ │ ├── tabbar_pushed.png │ │ ├── toolbar_hover.png │ │ ├── toolbar_normal.png │ │ ├── toolbar_pushed.png │ │ └── vertical_border.bmp ├── 360SafeSetup.nsi ├── algo.nsh ├── basehelp.nsh ├── copymake.bat ├── format.nsh ├── nsduilib.nsh ├── plugin │ ├── nsduiliba.dll │ └── nsduilibw.dll ├── setup res │ ├── Combo_nor.bmp │ ├── Combo_over.bmp │ ├── Icon_RedWarning.png │ ├── InstallPackages.xml │ ├── Licence.txt │ ├── MessageBox.xml │ ├── UninstallPackages.xml │ ├── btn_close_down.png │ ├── btn_close_highlight.png │ ├── btn_close_normal.png │ ├── btn_hot.png │ ├── btn_mini_down.png │ ├── btn_mini_highlight.png │ ├── btn_mini_normal.png │ ├── btn_normal.png │ ├── embed4Page3_1.png │ ├── embed4Page3_2.png │ ├── inst_1pg.png │ ├── inst_2pg.png │ ├── inst_3pg.png │ ├── inst_4pg.png │ ├── install.ico │ ├── install.png │ ├── instbkimg.png │ ├── logo.png │ ├── messagebox.png │ ├── progressbar.png │ ├── progressbar_bkimg.png │ ├── scroll.png │ ├── sel.png │ ├── uninstall.ico │ ├── uninstall_bkg.png │ ├── uninsting.png │ └── unsel.png └── valid.nsh ├── makeall.bat ├── makedll.bat ├── makefile.win ├── readme.txt ├── reg_op.vbs ├── removetmp.vbs ├── runcompile.vbs ├── runmake.vbs ├── src ├── CMakeLists.txt ├── cmake │ └── functions.cmake ├── duilib │ ├── CMakeLists.txt │ ├── Control │ │ ├── UIActiveX.cpp │ │ ├── UIActiveX.h │ │ ├── UIButton.cpp │ │ ├── UIButton.h │ │ ├── UICheckBox.cpp │ │ ├── UICheckBox.h │ │ ├── UICombo.cpp │ │ ├── UICombo.h │ │ ├── UIDateTime.cpp │ │ ├── UIDateTime.h │ │ ├── UIEdit.cpp │ │ ├── UIEdit.h │ │ ├── UIFlash.cpp │ │ ├── UIFlash.h │ │ ├── UILabel.cpp │ │ ├── UILabel.h │ │ ├── UIList.cpp │ │ ├── UIList.h │ │ ├── UIOption.cpp │ │ ├── UIOption.h │ │ ├── UIProgress.cpp │ │ ├── UIProgress.h │ │ ├── UIRichEdit.cpp │ │ ├── UIRichEdit.h │ │ ├── UIScrollBar.cpp │ │ ├── UIScrollBar.h │ │ ├── UISlider.cpp │ │ ├── UISlider.h │ │ ├── UIText.cpp │ │ ├── UIText.h │ │ ├── UITreeView.cpp │ │ ├── UITreeView.h │ │ ├── UIWebBrowser.cpp │ │ └── UIWebBrowser.h │ ├── Core │ │ ├── UIBase.cpp │ │ ├── UIBase.h │ │ ├── UIContainer.cpp │ │ ├── UIContainer.h │ │ ├── UIControl.cpp │ │ ├── UIControl.h │ │ ├── UIDefine.h │ │ ├── UIDlgBuilder.cpp │ │ ├── UIDlgBuilder.h │ │ ├── UIManager.cpp │ │ ├── UIManager.h │ │ ├── UIMarkup.cpp │ │ ├── UIMarkup.h │ │ ├── UIRender.cpp │ │ └── UIRender.h │ ├── Layout │ │ ├── UIChildLayout.cpp │ │ ├── UIChildLayout.h │ │ ├── UIHorizontalLayout.cpp │ │ ├── UIHorizontalLayout.h │ │ ├── UITabLayout.cpp │ │ ├── UITabLayout.h │ │ ├── UITileLayout.cpp │ │ ├── UITileLayout.h │ │ ├── UIVerticalLayout.cpp │ │ └── UIVerticalLayout.h │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── UIlib.cpp │ ├── UIlib.h │ ├── Utils │ │ ├── FlashEventHandler.h │ │ ├── UIDelegate.cpp │ │ ├── UIDelegate.h │ │ ├── Utils.cpp │ │ ├── Utils.h │ │ ├── WebBrowserEventHandler.h │ │ ├── WinImplBase.cpp │ │ ├── WinImplBase.h │ │ ├── XUnzip.cpp │ │ ├── downloadmgr.h │ │ ├── flash11.tlh │ │ ├── stb_image.c │ │ └── stb_image.h │ ├── duilib.vcxproj │ └── makefile.win ├── fakewinlib │ └── CMakelists.txt ├── nsduilib │ ├── CMakeLists.txt │ ├── MsgDef.h │ ├── SkinEngine.cpp │ ├── SkinEngine.h │ ├── StdAfx.cpp │ ├── StdAfx.h │ ├── api.h │ ├── dllmain.cpp │ ├── makefile.win │ ├── nsduilib.cpp │ ├── nsduilib.h │ ├── nsduilib.sln │ ├── nsduilib.vcxproj │ ├── pluginapi.c │ └── pluginapi.h └── test │ └── editui │ ├── CMakeLists.txt │ ├── duilib.h │ ├── editui.cpp │ ├── editui.h │ ├── main.cpp │ └── skin │ ├── BtnStyle │ ├── BDKV │ │ ├── button_down.png │ │ ├── button_nor.png │ │ └── button_over.png │ ├── BDKV2 │ │ ├── button_down.png │ │ ├── button_nor.png │ │ ├── button_over.png │ │ └── clear_iepg_btn_normal.png │ ├── Win7 │ │ ├── button_down.png │ │ ├── button_focus.png │ │ ├── button_nor.png │ │ └── button_over.png │ └── XP │ │ ├── button_down.png │ │ ├── button_focus.png │ │ ├── button_nor.png │ │ └── button_over.png │ ├── CheckBox │ ├── checked.png │ └── unchecked.png │ ├── ComboBox │ ├── Combo_nor.bmp │ └── Combo_over.bmp │ ├── List │ ├── list_header_bg.png │ ├── list_header_hot.png │ ├── list_header_pushed.png │ └── list_header_sep.png │ ├── Menu │ ├── btn_menu_hot.png │ ├── menu.xml │ ├── menu_bk.png │ └── menu_hot_bk.png │ ├── Progress │ ├── progress_back.png │ └── progress_fore.png │ ├── Radio │ ├── RadioBtnNon.png │ └── RadioBtnSel.png │ ├── ScrollBar │ ├── scroll.png │ └── scrollH.png │ ├── Slider │ ├── SliderBar.png │ └── slider_fore.bmp │ ├── SysBtn │ ├── CloseFocus.bmp │ ├── CloseNormal.bmp │ ├── ComboBox │ │ ├── Combo_nor.bmp │ │ └── Combo_over.bmp │ ├── MaxFocus.bmp │ ├── MaxNormal.bmp │ ├── MinFocus.bmp │ ├── MinNormal.bmp │ ├── StoreFocus.bmp │ ├── StoreNormal.bmp │ ├── down.png │ └── up.png │ ├── editui.xml │ ├── icon.png │ ├── image │ ├── menu_bk.png │ └── tree_expand.png │ ├── logo.ico │ └── menutest.xml ├── test └── tstcompile │ ├── diffpair.py │ └── runcompile.bat ├── verify_vs.vbs ├── vs_cmake.vbs ├── vs_find.vbs └── xmlfunc.vbs /VERSION: -------------------------------------------------------------------------------- 1 | 1.0.2 -------------------------------------------------------------------------------- /change_dir.vbs: -------------------------------------------------------------------------------- 1 | 2 | Option Explicit 3 | 4 | sub includeFile (fSpec) 5 | dim fileSys, file, fileData 6 | set fileSys = createObject ("Scripting.FileSystemObject") 7 | set file = fileSys.openTextFile (fSpec) 8 | fileData = file.readAll () 9 | file.close 10 | executeGlobal fileData 11 | set file = nothing 12 | set fileSys = nothing 13 | end sub 14 | 15 | dim fso ,scriptpath 16 | Set fso = CreateObject("Scripting.FileSystemObject") 17 | ScriptPath = fso.GetParentFolderName(Wscript.ScriptFullName) 18 | includeFile scriptpath & "\xmlfunc.vbs" 19 | 20 | 21 | if wscript.Arguments.length < 1 Then 22 | Wscript.stderr.WriteLine("build_chg.vbs vcxproj") 23 | wscript.Quit(4) 24 | End If 25 | 26 | dim xmldom,root,reg,fnd,newelm,retval 27 | 28 | set xmldom = CreateObject("Msxml2.DOMDocument.3.0") 29 | 30 | xmldom.Async = False 31 | xmldom.Load(wscript.Arguments(0)) 32 | 33 | if xmldom.parseError.errorCode <> 0 Then 34 | Wscript.stderr.Writeline("can not parse " & wscript.Arguments(0) & " for xml") 35 | Else 36 | Wscript.stdout.Writeline("parse " & wscript.Arguments(0) & " succ") 37 | End If 38 | 39 | 40 | set root = xmldom.documentElement 41 | XmlSetValueChilds root,"//Project/PropertyGroup/OutDir","$(SolutionDir)\$(PlatformTarget)\$(Configuration)\" 42 | XmlSetValueChilds root,"//Project/PropertyGroup/IntDir","$(ProjectDir)\$(PlatformTarget)\$(Configuration)\" 43 | xmldom.save Wscript.Arguments(0) 44 | 45 | 46 | -------------------------------------------------------------------------------- /change_precomp.vbs: -------------------------------------------------------------------------------- 1 | 2 | Option Explicit 3 | 4 | sub includeFile (fSpec) 5 | dim fileSys, file, fileData 6 | set fileSys = createObject ("Scripting.FileSystemObject") 7 | set file = fileSys.openTextFile (fSpec) 8 | fileData = file.readAll () 9 | file.close 10 | executeGlobal fileData 11 | set file = nothing 12 | set fileSys = nothing 13 | end sub 14 | 15 | dim fso ,scriptpath 16 | Set fso = CreateObject("Scripting.FileSystemObject") 17 | ScriptPath = fso.GetParentFolderName(Wscript.ScriptFullName) 18 | includeFile scriptpath & "\xmlfunc.vbs" 19 | 20 | 21 | if wscript.Arguments.length < 1 Then 22 | Wscript.stderr.WriteLine("build_chg.vbs vcxproj") 23 | wscript.Quit(4) 24 | End If 25 | 26 | dim xmldom,root,reg,fnd,newelm,retval 27 | 28 | set xmldom = CreateObject("Msxml2.DOMDocument.3.0") 29 | 30 | xmldom.Async = False 31 | xmldom.Load(wscript.Arguments(0)) 32 | 33 | if xmldom.parseError.errorCode <> 0 Then 34 | Wscript.stderr.Writeline("can not parse " & wscript.Arguments(0) & " for xml") 35 | Else 36 | Wscript.stdout.Writeline("parse " & wscript.Arguments(0) & " succ") 37 | End If 38 | 39 | 40 | set root = xmldom.documentElement 41 | XmlSetValueChilds root,"//Project/ItemDefinitionGroup/ClCompile/PrecompiledHeader","Use" 42 | SetPreCompileValue xmldom,"stb_image.c","NotUsing" 43 | SetPreCompileValue xmldom,"XUnzip.cpp","NotUsing" 44 | SetPreCompileValue xmldom,"StdAfx.cpp","Create" 45 | 46 | 47 | xmldom.save Wscript.Arguments(0) 48 | 49 | -------------------------------------------------------------------------------- /cleanall.bat: -------------------------------------------------------------------------------- 1 | set INST_OS=win7 2 | set INST_ARCH=x86 3 | set VC_SETVAR_ARCH=amd64_x86 4 | set GOARCH=386 5 | set APP_NAME=btssdp 6 | set _IsNativeEnvironment=true 7 | set UNICODE_MODE=1 8 | cscript //Nologo runmake.vbs makefile.win clean -------------------------------------------------------------------------------- /cmakerun.vbs: -------------------------------------------------------------------------------- 1 | 2 | Option Explicit 3 | 4 | Sub includeFile(fSpec) 5 | With CreateObject("Scripting.FileSystemObject") 6 | executeGlobal .openTextFile(fSpec).readAll() 7 | End With 8 | End Sub 9 | 10 | Function GetScriptDir() 11 | dim fso ,scriptpath 12 | Set fso = CreateObject("Scripting.FileSystemObject") 13 | GetScriptDir=fso.GetParentFolderName(Wscript.ScriptFullName) 14 | End Function 15 | 16 | 17 | call includeFile( GetScriptDir() & "\reg_op.vbs") 18 | call includeFile( GetScriptDir() & "\vs_find.vbs") 19 | call includeFile( GetScriptDir() & "\base_func.vbs") 20 | call includeFile( GetScriptDir() & "\vs_cmake.vbs") 21 | 22 | 23 | Function FormatCmakeBatch(outfile,vsver,basedir,compiletarget,platform,abssrc,absdst,args) 24 | dim fso,fh,cmdline,unum 25 | set fso = WScript.CreateObject("Scripting.FileSystemObject") 26 | set fh = fso.CreateTextFile(outfile,True) 27 | 28 | fh.WriteLine(GetVsAllBatchCall(vsver,basedir,compiletarget)) 29 | cmdline = "cd " & absdst 30 | fh.WriteLine(cmdline) 31 | 32 | cmdline = "cmake.exe " & platform 33 | On error resume next 34 | Err.Number = 0 35 | unum = Ubound(args) 36 | if Err.Number <> 0 Then 37 | unum = 0 38 | else 39 | for each unum in args 40 | If unum <> "" Then 41 | cmdline = cmdline & " " & chr(34) & unum & chr(34) 42 | End If 43 | Next 44 | End If 45 | cmdline = cmdline & " " & abssrc 46 | fh.WriteLine(cmdline) 47 | fh.Close 48 | set fso = Nothing 49 | set fh = Nothing 50 | End Function 51 | 52 | Function CmakeRun(vsver,basedir,compiletarget,platform,srcdir,dstdir,args) 53 | dim cmd,retdir,curd,absdst,abssrc,unum 54 | dim batchfile 55 | retdir = GetCwd() 56 | abssrc = GetAbsPath(srcdir) 57 | absdst = GetAbsPath(dstdir) 58 | ' for \ is 92 59 | batchfile = absdst & chr(92) & "cmakerun.bat" 60 | Chdir(absdst) 61 | FormatCmakeBatch batchfile,vsver,basedir,compiletarget,platform,abssrc,absdst,args 62 | RunCommand(batchfile) 63 | Chdir(retdir) 64 | End Function 65 | 66 | 67 | Function Usage(ec,fmt) 68 | dim fh 69 | set fh = WScript.Stderr 70 | if ec = 0 Then 71 | set fh = WScript.Stdout 72 | End if 73 | 74 | if fmt <> "" Then 75 | fh.Writeline(fmt) 76 | End if 77 | fh.Writeline(WScript.ScriptName & " [OPTIONS] -- [CMAKE_OPTIONS]") 78 | fh.Writeline(chr(9) &"-h|--help to display this information") 79 | fh.Writeline(chr(9) &"-d|--dir directory to specify the directory running cmake") 80 | fh.Writeline(chr(9) &"-s|--source directory to specify the source directory") 81 | fh.Writeline(chr(9) &"-a|--arch arch to specify arch it can accept(x64|x86)") 82 | fh.Writeline(chr(9) &"-- to stop parse args ,next is for cmake") 83 | WScript.Quit(ec) 84 | End Function 85 | 86 | dim cmakedir,sourcedir,cmakearch 87 | dim cmakeargs() 88 | 89 | sourcedir="." 90 | cmakedir="" 91 | cmakearch="x86" 92 | Function ParseArgs(args) 93 | dim i,j,unum 94 | j = UBound(args) 95 | i = 0 96 | do While i < j 97 | if args(i) = "-h" or args(i) = "--help" Then 98 | Usage 0,"" 99 | elseif args(i) = "-d" or args(i) = "--dir" Then 100 | if (i+1) = j Then 101 | Usage 3,args(i) &" need an arg" 102 | End If 103 | 104 | cmakedir = args((i + 1)) 105 | i = i + 1 106 | elseif args(i) = "-s" or args(i) = "--source" Then 107 | if (i+1) = j Then 108 | Usage 3,args(i) &" need an arg" 109 | End If 110 | sourcedir = args((i + 1)) 111 | i = i + 1 112 | elseif args(i) = "-a" or args(i) = "--arch" Then 113 | if (i+1) = j Then 114 | Usage 3,args(i) &" need an arg" 115 | End If 116 | cmakearch = args((i + 1)) 117 | i = i + 1 118 | elseif args(i) = "--" Then 119 | ' we skip this 120 | i = i + 1 121 | while i < j 122 | On error resume next 123 | Err.Number = 0 124 | unum = Ubound(cmakeargs) 125 | if Err.Number <> 0 Then 126 | unum = 0 127 | End If 128 | On error goto 0 129 | unum = unum + 1 130 | redim preserve cmakeargs(unum) 131 | cmakeargs((unum-1)) = args((i)) 132 | i = i + 1 133 | Wend 134 | exit do 135 | End if 136 | i = i + 1 137 | Loop 138 | 139 | On error resume next 140 | Err.Number = 0 141 | unum = Ubound(cmakeargs) 142 | if Err.Number <> 0 Then 143 | unum = 0 144 | wscript.stdout.writeline("cmakeargs 0") 145 | else 146 | wscript.stdout.write("cmakeargs:") 147 | for each unum in cmakeargs 148 | wscript.stdout.write(" " & unum) 149 | Next 150 | wscript.stdout.writeline("") 151 | End If 152 | 153 | if cmakedir = "" Then 154 | wscript.stderr.writeline("must specify cmakedir by(-d|--dir)") 155 | wscript.quit(4) 156 | End If 157 | End Function 158 | 159 | 160 | 161 | 162 | dim args(),num,i,vsver,vspdir,basedir,vscmake,platform 163 | num = WScript.Arguments.Count() 164 | 165 | if num = 0 Then 166 | Usage 3,"need args" 167 | End if 168 | 169 | redim args(num) 170 | 171 | for i=0 to (num - 1) 172 | args(i) = WScript.Arguments.Item(i) 173 | next 174 | 175 | ParseArgs(args) 176 | 177 | 178 | vsver=IsInstallVisualStudio(10.0) 179 | If IsEmpty(vsver) Then 180 | wscript.stderr.writeline("can not find visual studio installed") 181 | wscript.Quit(3) 182 | End If 183 | basedir=GetVisualStudioInstdir(10.0) 184 | if IsEmpty(basedir) Then 185 | wscript.stderr.writeline("can not find visual studio install directory") 186 | wscript.quit(5) 187 | End If 188 | 189 | wscript.stdout.writeline("basedir ("& basedir & ")") 190 | dim compiletarget 191 | set vscmake = new VSCMakePlatform 192 | if cmakearch = "x64" Then 193 | platform = vscmake.GetPlatform(vsver,1) 194 | compiletarget = "amd64" 195 | Else 196 | platform = vscmake.GetPlatform(vsver,0) 197 | compiletarget = "amd64_x86" 198 | End If 199 | 200 | wscript.stdout.writeline("Get Platform (" & platform &")") 201 | 202 | call CmakeRun(vsver,basedir,compiletarget,platform, sourcedir,cmakedir,cmakeargs) 203 | 204 | -------------------------------------------------------------------------------- /example/360Safe/360Safe_ud.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeppeter/nsduilib/93f318d3e2e133fcfa8174d666c798367d7dbd63/example/360Safe/360Safe_ud.exe -------------------------------------------------------------------------------- /example/360Safe/DuiLib_ud.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeppeter/nsduilib/93f318d3e2e133fcfa8174d666c798367d7dbd63/example/360Safe/DuiLib_ud.dll -------------------------------------------------------------------------------- /example/360Safe/skin/360SafeRes/ComputerExamine.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |