-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathRun Multiconfig CoreCycler.bat
More file actions
113 lines (92 loc) · 5.49 KB
/
Run Multiconfig CoreCycler.bat
File metadata and controls
113 lines (92 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@echo off
SETLOCAL EnableDelayedExpansion
REM -----------------------------------------------------------------------------------------------------
REM With this batch file you can run CoreCycler with multiple different configs in a row,
REM without having to manually edit/replace the config.ini file.
REM
REM Instead if you use this batch file, it looks for config files in the format "multiconfig-x.ini",
REM so e.g. "multiconfig-1.ini", "multiconfig-2.ini" etc, and will then sequentially run these
REM configs by copying it to the config.ini and starting a CoreCycler run.
REM
REM The batch file will continue to the next config file as long as the current config run ends normally.
REM
REM It will stop under the following circumstances:
REM - it encounters a script error, e.g. something has gone terribly wrong
REM - it terminates with a fatal error
REM - all of the cores have thrown an error during the current config run
REM - the "stopOnError" setting has been enabled in the current config
REM
REM There are a few caveats with this right now:
REM - it will create a new logfile for each config
REM - if you use the Automatic Test Mode, it will not continue with multi config, instead it will just
REM contine with the currently active config and then stop if it completes
REM -----------------------------------------------------------------------------------------------------
echo [32mÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»[0m
echo [32mº[0m With this batch file you can run CoreCycler with multiple different configs [32mº[0m
echo [32mº[0m in a row, without having to manually edit/replace the config.ini file. [32mº[0m
echo [32mº[0m [32mº[0m
echo [32mº[0m Instead if you use this batch file, it looks for config files in the format [32mº[0m
echo [32mº[0m [93m"multiconfig-x.ini"[0m, so e.g. [36mmulticonfig-1.ini[0m, [36mmulticonfig-2.ini[0m, etc, and [32mº[0m
echo [32mº[0m will then sequentially run these configs by copying it to the config.ini and [32mº[0m
echo [32mº[0m starting a CoreCycler run. [32mº[0m
echo [32mº[0m [32mº[0m
echo [32mº[0m The batch file will continue to the next config file as long as the current [32mº[0m
echo [32mº[0m config run ends normally. [32mº[0m
echo [32mº[0m [32mº[0m
echo [32mº[0m It will stop under the following circumstances: [32mº[0m
echo [32mº[0m - it encounters a script error, e.g. something has gone terribly wrong [32mº[0m
echo [32mº[0m - it terminates with a fatal error [32mº[0m
echo [32mº[0m - all of the cores have thrown an error during the current config run [32mº[0m
echo [32mº[0m - the "stopOnError" setting has been enabled in the current config [32mº[0m
echo [32mÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹[0m
echo [32mº[91m There are a few caveats with this right now: [32mº[0m
echo [32mº[91m - it will create a new logfile for each config [32mº[0m
echo [32mº[91m - if you use the Automatic Test Mode, it will not continue with the multi [32mº[0m
echo [32mº[91m config, instead it will just contine with the currently active config and [32mº[0m
echo [32mº[91m then stop if it completes [32mº[0m
echo [32mÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ[0m
echo.
echo.
echo Starting a multiconfig run of CoreCycler...
REM Change directory to the file location, just to make sure
pushd %~dp0
REM Prepare the variable for the last config file
SET "LASTCONFIG="
FOR /F %%G IN ('dir /b multiconfig-*.ini') DO SET "LASTCONFIG=%%G"
IF [!LASTCONFIG!] EQU [] (
echo [91mError^^^! No multiconfig files found, aborting^^^![0m
pause
exit 1
)
REM Loop through the config files
FOR /R %%G IN (multiconfig-*.ini) DO (
SET "CURRENTCONFIG=%%~nxG"
echo.
echo [36mÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[0m
echo [36m[!TIME!] Starting run with [93m!CURRENTCONFIG![0m
echo [36mÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[0m
copy /Y "!CURRENTCONFIG!" config.ini >nul
IF !ERRORLEVEL! NEQ 0 (
echo [91mERROR^^^! Could not use "!CURRENTCONFIG!"[0m
pause
exit 2
)
echo.
REM Doesn't really work with the Automatic Test Mode yet
REM start "CoreCycler" cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1" %PARAMS%
REM Extra command for the last iteration, to keep the window open
IF !LASTCONFIG! EQU !CURRENTCONFIG! (
echo This is the last config
cmd.exe /k powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1"
) ELSE (
powershell.exe -ExecutionPolicy Bypass -File "%~dp0script-corecycler.ps1"
)
IF !ERRORLEVEL! NEQ 0 (
echo [91mError level: !ERRORLEVEL![0m
echo [91m[!TIME!] ERROR^^^! CoreCycler run did not complete successfully^^^![0m
pause
exit !ERRORLEVEL!
)
echo.
)
pause