Option Explicit \r
'--- start of vbslib include ------------------------------------------------------\r
-Dim g_debug, g_vbslib_path, g_IncludeType, g_CommandPrompt, g_fs, g_sh\r
+'// \82±\82±\82Í\81A\8fC\90³\82µ\82È\82¢\82Å\82\82¾\82³\82¢\81B\89º\8bL\83\81\83C\83\93\8aÖ\90\94\82©\82ç\83X\83N\83\8a\83v\83g\82ð\8bL\8fq\82µ\82Ä\82\82¾\82³\82¢\81B\r
+'// \82l\82r\83I\83t\83B\83X\82â\83R\83\93\83p\83C\83\89\82ª\82 \82ê\82Î\81A\89º\8bL\82Ì\82\87\81Q\82\84\82\85\82\82\82\95\82\87 \82ð\82P\82É\82·\82ê\82Î\81A\83f\83o\83b\83K\82ª\8eg\82¦\82Ü\82·\81B\r
+'// \82r\82\94\82\8f\82\90\96½\97ß\82ð\8bL\8fq\82·\82ê\82Î\81A\83f\83o\83b\83K\82Í\83u\83\8c\81[\83N\82µ\82Ü\82·\81B\8fÚ\82µ\82\82Í vbslib \82Ì\90à\96¾\8f\91\82Ì\8dÅ\8cã\82Ì\81u\8d¢\82Á\82½\82Æ\82«\82Í\81v\81B\r
+Dim g_debug, g_admin, g_vbslib_path, g_CommandPrompt, g_fs, g_sh, g_AppKey, g_Vers\r
If IsEmpty( g_fs ) Then\r
+ Dim g_MainPath, g_SrcPath : g_SrcPath = WScript.ScriptFullName : g_MainPath = g_SrcPath\r
+ Set g_Vers = CreateObject("Scripting.Dictionary") : g_Vers.Add "vbslib", 3.0\r
'--- start of parameters for vbslib include -------------------------------\r
g_debug = 0\r
g_vbslib_path = "vbslib\vbs_inc.vbs"\r
- g_IncludeType = ""\r
g_CommandPrompt = 2\r
'--- end of parameters for vbslib include ---------------------------------\r
Dim g_f, g_include_path, i : Set g_fs = CreateObject( "Scripting.FileSystemObject" )\r
- If g_fs.FileExists("setting.vbs") Then Set g_f = g_fs.OpenTextFile( "setting.vbs" ): Execute g_f.ReadAll()\r
- If not IsEmpty( WScript.Arguments.Named.Item("IncludeType") ) Then g_IncludeType = WScript.Arguments.Named.Item("IncludeType")\r
Set g_sh = WScript.CreateObject("WScript.Shell") : g_f = g_sh.CurrentDirectory\r
g_sh.CurrentDirectory = g_fs.GetParentFolderName( WScript.ScriptFullName )\r
- For i = 10 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For\r
+ For i = 20 To 1 Step -1 : If g_fs.FileExists(g_vbslib_path) Then Exit For\r
g_vbslib_path = "..\" + g_vbslib_path : Next\r
If g_fs.FileExists(g_vbslib_path) Then g_vbslib_path = g_fs.GetAbsolutePathName( g_vbslib_path )\r
g_sh.CurrentDirectory = g_f\r
- 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\r
+ 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\r
Set g_f = g_fs.OpenTextFile( g_vbslib_path ): Execute g_f.ReadAll() : g_f = Empty\r
If ResumePush Then On Error Resume Next\r
- main\r
- ResumePop : On Error GoTo 0\r
+ If IsDefined("main2") Then Set g_f=CreateObject("Scripting.Dictionary") :_\r
+ Set g_AppKey = new AppKeyClass : main2 g_f, g_AppKey.SetKey( new AppKeyClass ) Else _\r
+ Set g_AppKey = new AppKeyClass : g_AppKey.SetKey( new AppKeyClass ) : main\r
+ g_f = Empty : ResumePop : On Error GoTo 0\r
End If\r
'--- end of vbslib include --------------------------------------------------------\r
\r
'********************************************************************************\r
' <<< [main] >>>\r
'********************************************************************************\r
-Sub main()\r
- Dim opt : Set opt = new RepliCmp_Option\r
- opt.m_EditorPath = Setting_getEditorPath()\r
- opt.m_DiffPath = Setting_getDiffPath()\r
+Sub main2( Opt, AppKey )\r
+ Dim w_:Set w_= AppKey.NewWritable( g_sh.SpecialFolders( "desktop" ) + "\_RepliCmp" ).Enable()\r
+ Set opt = new RepliCmp_Option\r
+ opt.m_EditorPath = Setting_getEditorCmdLine(0)\r
+ opt.m_DiffPath = Setting_getDiffCmdLine(0)\r
\r
Redim folders(0)\r
\r
folders(0) = g_fs.GetAbsolutePathName( "..\..\.." )\r
\r
- Redim files(7)\r
+ Redim files(15)\r
files(0) = "vbs_inc.vbs"\r
- files(1) = "vbslib.vbs"\r
- files(2) = "TestScript.vbs"\r
- files(3) = "VisualStudio.vbs"\r
- files(4) = "TestPrompt.vbs"\r
- files(5) = "MergeLib.vbs"\r
- files(6) = "RepliCmp.vbs"\r
- files(7) = "tools_setting_default.vbs"\r
+ files(1) = "vbs_inc_300.vbs"\r
+ files(2) = "vbslib.vbs"\r
+ files(3) = "TestScript.vbs"\r
+ files(4) = "VisualStudio.vbs"\r
+ files(5) = "TestPrompt.vbs"\r
+ files(6) = "MergeLib.vbs"\r
+ files(7) = "RepliCmp.vbs"\r
+ files(8) = "System.vbs"\r
+ files(9) = "PC_setting_default.vbs"\r
+ files(10)= "TestPrompt_Setting_default.vbs"\r
+ files(11)= "sample_main_prompt.vbs"\r
+ files(12)= "sample_main_prompt_close.vbs"\r
+ files(13)= "sample_main_window.vbs"\r
+ files(14)= "sample_lib.vbs"\r
+ files(15)= "zip.vbs"\r
\r
RepliCmp folders, files, Opt\r
End Sub\r