little changes
This commit is contained in:
parent
f4671d0c02
commit
64d85e29b4
@ -10,8 +10,8 @@ del /F %LOG% 1>nul 2>nul
|
||||
if not "%1"=="STDOUT_TO_FILE" %0 STDOUT_TO_FILE %* 1>%LOG% 2>&1
|
||||
shift /1
|
||||
|
||||
rem show window with log while running scripts ...
|
||||
start %TOOLS%\installmonitor.exe
|
||||
rem show window with logfile while running scripts ...
|
||||
start %TOOLS%\logmonitor.exe %LOG%
|
||||
|
||||
echo ####### %0 #######
|
||||
date /t
|
||||
|
@ -1,19 +0,0 @@
|
||||
; installending.pb
|
||||
; ------------------------------------------------------------
|
||||
; shows a status message at the end of the installation
|
||||
; LICENSE : GPL
|
||||
; AUTHOR : Michael H.G. Schmidt
|
||||
; EMAIL : michael@schmidt2.de
|
||||
; DATE : 20210328
|
||||
; ------------------------------------------------------------
|
||||
;
|
||||
|
||||
MessageRequester("Installation finished.",
|
||||
"Installation of this system has been finished." + Chr(13) +
|
||||
"You can start using the system now!" + Chr(13) + Chr(13) +
|
||||
"Logfile: C:\tools\scripts\autoconfig-all.txt",
|
||||
#PB_MessageRequester_Info)
|
||||
|
||||
; IDE Options = PureBasic 5.71 LTS (Windows - x64)
|
||||
; CursorPosition = 15
|
||||
; EnableXP
|
@ -1,25 +1,39 @@
|
||||
; installmonitor.pb
|
||||
; logmonitor.pb
|
||||
; ------------------------------------------------------------
|
||||
; tool to monitor the running installation ...
|
||||
; tool to monitor a logfile ...
|
||||
; LICENSE : GPL
|
||||
; AUTHOR : Michael H.G. Schmidt
|
||||
; EMAIL : michael@schmidt2.de
|
||||
; DATE : 20210328
|
||||
; DATE : 20210329
|
||||
; ------------------------------------------------------------
|
||||
;
|
||||
|
||||
; Get system drive
|
||||
SYS$=GetEnvironmentVariable("SystemDrive")
|
||||
If ( CountProgramParameters() <> 1 )
|
||||
dummy = MessageRequester("Usage:",
|
||||
"logmonitor <filename>" + Chr(13) +
|
||||
" shows a logfile and print changes in realtime in a window" + Chr(13) +
|
||||
" filename : full or relative path to file",
|
||||
#PB_MessageRequester_Info)
|
||||
End 99
|
||||
EndIf
|
||||
|
||||
; logfile to monitor ...
|
||||
logfile$=SYS$+"\tools\scripts\autoconfig-all.txt"
|
||||
logfile$=ProgramParameter(0)
|
||||
|
||||
;;;;;;;
|
||||
; MAIN
|
||||
;;;;;;;
|
||||
|
||||
; open logfile ...
|
||||
If Not ReadFile(0, logfile$, #PB_File_SharedWrite | #PB_File_NoBuffering)
|
||||
dummy = MessageRequester("ERROR",
|
||||
"cannot open logfile: [ "+logfile$+" ]",
|
||||
#PB_MessageRequester_Error)
|
||||
End 99
|
||||
EndIf
|
||||
|
||||
; open window to hide all other windows on desktop ...
|
||||
OpenWindow(0, 0, 0, 0, 0, "Unattended Installation - running scripts ...", #PB_Window_BorderLess|#PB_Window_Maximize)
|
||||
OpenWindow(0, 0, 0, 0, 0, "", #PB_Window_BorderLess|#PB_Window_Maximize)
|
||||
StickyWindow(0,#True)
|
||||
SetActiveWindow(0)
|
||||
|
||||
@ -37,19 +51,11 @@ EditorGadget(0, 8, 8, W-16, H-16, #PB_Editor_ReadOnly | #PB_Editor_WordWrap)
|
||||
LoadFont(0, "Consolas", 12)
|
||||
SetGadgetFont(0, FontID(0))
|
||||
|
||||
; open logfile ...
|
||||
If Not ReadFile(0, logfile$, #PB_File_SharedWrite | #PB_File_NoBuffering)
|
||||
AddGadgetItem(0, -1, "===== ERROR while trying to open logfile: [ "+logfile$+" ] ! =====")
|
||||
Repeat: Delay(1)
|
||||
Until WaitWindowEvent() = #PB_Event_CloseWindow
|
||||
End
|
||||
EndIf
|
||||
|
||||
; goto end of file ...
|
||||
FileSeek(0,Lof(0))
|
||||
|
||||
; print starting message ...
|
||||
AddGadgetItem(0, -1, "===== Starting Installation. Logfile = [ "+logfile$+"] =====")
|
||||
AddGadgetItem(0, -1, "===== Monitoring logfile: [ "+logfile$+" ] =====")
|
||||
|
||||
; get filesize ...
|
||||
filesize=Lof(0)
|
||||
@ -75,6 +81,6 @@ Repeat
|
||||
Until WaitWindowEvent() = #PB_Event_CloseWindow
|
||||
|
||||
; IDE Options = PureBasic 5.71 LTS (Windows - x64)
|
||||
; CursorPosition = 19
|
||||
; FirstLine = 2
|
||||
; CursorPosition = 31
|
||||
; FirstLine = 6
|
||||
; EnableXP
|
3
tools/.gitignore
vendored
3
tools/.gitignore
vendored
@ -7,7 +7,6 @@
|
||||
!deltree.exe
|
||||
!allpull.exe
|
||||
!simpletail.exe
|
||||
!installmonitor.exe
|
||||
!logmonitor.exe
|
||||
!searchreplace.exe
|
||||
!installending.exe
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
BIN
tools/logmonitor.exe
Normal file
BIN
tools/logmonitor.exe
Normal file
Binary file not shown.
@ -1,7 +1,6 @@
|
||||
@echo off
|
||||
set TOOLS=c:\tools
|
||||
set STATUSFILE=%LOCALAPPDATA%\.user_settings_done
|
||||
set ENDMESSAGE=%TOOLS%\scripts\.install_done
|
||||
set STARTMENU=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
|
||||
set STARTMENU_PUBLIC=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs"
|
||||
|
||||
@ -229,9 +228,3 @@ net config workstation
|
||||
echo ####### %0 #######
|
||||
timeout /T 2
|
||||
|
||||
rem check for statusfile and show endmessage ...
|
||||
if NOT EXIST %ENDMESSAGE% (
|
||||
start /B %TOOLS%\installending.exe
|
||||
echo all done >%ENDMESSAGE%
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user