X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=_src%2FTest%2Ftools%2FPartCmp%2FPartCmp.vbs;h=dc08c2b063973bcce16e0f651a1b74f6b0aaed9f;hb=8cd319a3714156b275c5e3809401dfccfa472e29;hp=a02bde825792f3844880e244aaf14e2848b3ee45;hpb=96594a1f7f4a7fcb1ef2b3641e65c63a0a98635c;p=vbslib%2Fmain.git diff --git a/_src/Test/tools/PartCmp/PartCmp.vbs b/_src/Test/tools/PartCmp/PartCmp.vbs index a02bde8..dc08c2b 100644 --- a/_src/Test/tools/PartCmp/PartCmp.vbs +++ b/_src/Test/tools/PartCmp/PartCmp.vbs @@ -1,30 +1,39 @@ Option Explicit '--- start of vbslib include ------------------------------------------------------ -Dim g_debug, g_vbslib_path, g_IncludeType, g_CommandPrompt, g_fs, g_sh +'// ‚±‚±‚́AC³‚µ‚È‚¢‚Å‚­‚¾‚³‚¢B‰º‹LƒƒCƒ“ŠÖ”‚©‚çƒXƒNƒŠƒvƒg‚ð‹Lq‚µ‚Ä‚­‚¾‚³‚¢B +'// ‚l‚rƒIƒtƒBƒX‚âƒRƒ“ƒpƒCƒ‰‚ª‚ ‚ê‚΁A‰º‹L‚Ì‚‡Q‚„‚…‚‚‚•‚‡ ‚ð‚P‚É‚·‚ê‚΁AƒfƒoƒbƒK‚ªŽg‚¦‚Ü‚·B +'// ‚r‚”‚‚–½—ß‚ð‹Lq‚·‚ê‚΁AƒfƒoƒbƒK‚̓uƒŒ[ƒN‚µ‚Ü‚·BÚ‚µ‚­‚Í vbslib ‚Ìà–¾‘‚̍Ōã‚́u¢‚Á‚½‚Æ‚«‚́vB +Dim g_debug, g_admin, g_vbslib_path, g_CommandPrompt, g_fs, g_sh, g_AppKey, g_Vers If IsEmpty( g_fs ) Then + Dim g_MainPath, g_SrcPath : g_SrcPath = WScript.ScriptFullName : g_MainPath = g_SrcPath + Set g_Vers = CreateObject("Scripting.Dictionary") : g_Vers.Add "vbslib", 3.0 '--- start of parameters for vbslib include ------------------------------- g_debug = 0 g_vbslib_path = "vbslib\vbs_inc.vbs" - g_IncludeType = "" g_CommandPrompt = 2 '--- end of parameters for vbslib include --------------------------------- Dim g_f, g_include_path, i : Set g_fs = CreateObject( "Scripting.FileSystemObject" ) - If g_fs.FileExists("setting.vbs") Then Set g_f = g_fs.OpenTextFile( "setting.vbs" ): Execute g_f.ReadAll() - If not IsEmpty( WScript.Arguments.Named.Item("IncludeType") ) Then g_IncludeType = WScript.Arguments.Named.Item("IncludeType") Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName ) - For i = 10 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For + For i = 20 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For g_vbslib_path = "..\" + g_vbslib_path : Next If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path ) g_sh.CurrentDirectory = g_f - If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+ "Check g_vbslib_path in " + WScript.ScriptName + " or setting.vbs" : WScript.Quit 1 + If i=0 Then WScript.Echo "Not found " + g_fs.GetFileName( g_vbslib_path ) +vbCR+vbLF+ "Let's download vbslib "&g_Vers.Item("vbslib")&" and Copy vbslib folder." : WScript.Quit 1 Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty If ResumePush Then On Error Resume Next - main - ResumePop : On Error GoTo 0 + If IsDefined("main2") Then Set g_f=CreateObject("Scripting.Dictionary") :_ + Set g_AppKey = new AppKeyClass : main2 g_f, g_AppKey.SetKey( new AppKeyClass ) Else _ + Set g_AppKey = new AppKeyClass : g_AppKey.SetKey( new AppKeyClass ) : main + g_f = Empty : ResumePop : On Error GoTo 0 End If '--- end of vbslib include -------------------------------------------------------- -Sub main() : PartCmp_main : End Sub +Sub main() + Dim opt : Set opt = new PartCmp_Option + opt.LimitStartLines = 50 + opt.MaxByteOfLine = 256 + PartCmp_main opt +End Sub