|
@@ -2,43 +2,46 @@ Option Compare Database
|
|
|
|
|
|
|
|
Public Function vcsprompt()
|
|
Public Function vcsprompt()
|
|
|
Dim prompt, prompttext, warning As String
|
|
Dim prompt, prompttext, warning As String
|
|
|
-
|
|
|
|
|
|
|
+ Dim continue As Boolean
|
|
|
|
|
+
|
|
|
prompttext = "Write your command here:" & vbNewLine & _
|
|
prompttext = "Write your command here:" & vbNewLine & _
|
|
|
"> 'makesources' to create or update the source files" & vbNewLine & _
|
|
"> 'makesources' to create or update the source files" & vbNewLine & _
|
|
|
"> 'update' to update the current application within the source files" & vbNewLine & _
|
|
"> 'update' to update the current application within the source files" & vbNewLine & _
|
|
|
- "> 'ok' to close this input box" & vbNewLine & _
|
|
|
|
|
"(see docs for more commands)"
|
|
"(see docs for more commands)"
|
|
|
prompt = ""
|
|
prompt = ""
|
|
|
|
|
+ continue = True
|
|
|
|
|
|
|
|
- While prompt <> "ok"
|
|
|
|
|
|
|
+ While continue
|
|
|
prompt = InputBox(prompttext, "VCS", "")
|
|
prompt = InputBox(prompttext, "VCS", "")
|
|
|
|
|
|
|
|
- Select Case prompt
|
|
|
|
|
|
|
+ If Right(prompt, 1) = "&" Then
|
|
|
|
|
+ prompt = Left(prompt, Len(prompt) - 1)
|
|
|
|
|
+ Else
|
|
|
|
|
+ continue = False
|
|
|
|
|
+ End If
|
|
|
|
|
|
|
|
- Case "makesources"
|
|
|
|
|
|
|
+ Select Case prompt
|
|
|
|
|
|
|
|
- Call make_sources
|
|
|
|
|
- MsgBox "Done"
|
|
|
|
|
|
|
+ Case "makesources"
|
|
|
|
|
|
|
|
- Case "update"
|
|
|
|
|
-
|
|
|
|
|
- Call update_from_sources
|
|
|
|
|
- MsgBox "Done"
|
|
|
|
|
-
|
|
|
|
|
- Case "sync"
|
|
|
|
|
-
|
|
|
|
|
- Call sync
|
|
|
|
|
- MsgBox "Done"
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- Case vbNullString
|
|
|
|
|
- MsgBox "Operation cancelled"
|
|
|
|
|
- prompt = "ok"
|
|
|
|
|
|
|
+ Call make_sources
|
|
|
|
|
+ MsgBox "Done"
|
|
|
|
|
+
|
|
|
|
|
+ Case "update"
|
|
|
|
|
|
|
|
- Case "ok"
|
|
|
|
|
-
|
|
|
|
|
- Case Else
|
|
|
|
|
- MsgBox "Unknown command"
|
|
|
|
|
|
|
+ Call update_from_sources
|
|
|
|
|
+ MsgBox "Done"
|
|
|
|
|
+
|
|
|
|
|
+ Case "sync"
|
|
|
|
|
+
|
|
|
|
|
+ Call sync
|
|
|
|
|
+ MsgBox "Done"
|
|
|
|
|
+
|
|
|
|
|
+ Case vbNullString
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ Case Else
|
|
|
|
|
+ MsgBox "Unknown command"
|
|
|
|
|
|
|
|
End Select
|
|
End Select
|
|
|
whil:
|
|
whil:
|
|
@@ -52,12 +55,6 @@ End Function
|
|
|
Public Function make_sources()
|
|
Public Function make_sources()
|
|
|
'creates the source-code of the app
|
|
'creates the source-code of the app
|
|
|
|
|
|
|
|
- If CodeProject.Path = CurrentProject.Path Then
|
|
|
|
|
- MsgBox "ERROR: you should not run VSC for VCS from here, VCS modules would not be exported" & vbNewLine & _
|
|
|
|
|
- "Use VCS - AddIn instead"
|
|
|
|
|
- Exit Function
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
Debug.Print "Zip the app file"
|
|
Debug.Print "Zip the app file"
|
|
|
Call zip_app_file
|
|
Call zip_app_file
|
|
|
Debug.Print "> done"
|
|
Debug.Print "> done"
|
|
@@ -75,12 +72,6 @@ Public Function update_from_sources()
|
|
|
'updates the application from the sources
|
|
'updates the application from the sources
|
|
|
Dim backup As Boolean
|
|
Dim backup As Boolean
|
|
|
|
|
|
|
|
- If CodeProject.Path = CurrentProject.Path Then
|
|
|
|
|
- MsgBox "ERROR: you should not run VSC for VCS from here, VCS modules would not be exported" & vbNewLine & _
|
|
|
|
|
- "Use VCS - AddIn instead"
|
|
|
|
|
- Exit Function
|
|
|
|
|
- End If
|
|
|
|
|
-
|
|
|
|
|
Debug.Print "Creates a backup of the app file"
|
|
Debug.Print "Creates a backup of the app file"
|
|
|
backup = make_backup()
|
|
backup = make_backup()
|
|
|
|
|
|