-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimulator.bat
More file actions
41 lines (34 loc) · 909 Bytes
/
simulator.bat
File metadata and controls
41 lines (34 loc) · 909 Bytes
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
@echo off
REM === CPU SCHEDULER SIMULATOR BUILD & RUN SCRIPT (BAT)
echo.
echo Compiling the CPU Scheduler Simulator...
REM
REM
REM
if exist simulator.exe (
del simulator.exe
if exist simulator.exe (
echo ERROR: Previous simulator.exe is locked. Please close the program in Task Manager.
echo Press any key to continue . . .
pause
exit /b 1
)
)
REM
REM
g++ main.cpp sjf_non_preemptive.cpp fcfs-non-preemptive.cpp scheduler_common.cpp priority_non_preemptive.cpp srtf_preemptive.cpp round_robin.cpp comparison_tool.cpp -o simulator.exe -std=c++11 -finput-charset=UTF-8
REM
if %errorlevel% equ 0 (
REM
REM
chcp 65001 > nul
echo.
echo Compilation successful!
REM
echo Running simulator.exe...
simulator.exe
) else (
echo.
echo ERROR: Compilation failed. Please check the source code for errors.
)
pause