-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.bat
More file actions
49 lines (40 loc) · 1.06 KB
/
run.bat
File metadata and controls
49 lines (40 loc) · 1.06 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
@echo off
setlocal enabledelayedexpansion
echo Compiling CSOPESY Emulator...
:: Check if g++ is available
where g++ >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Error: g++ not found. Please install MinGW or another C++ compiler.
exit /b 1
)
echo Using compiler: g++
:: Define include directory and output path
set "INCLUDE_DIR=include"
set "OUTPUT=main.exe"
:: Define command source files
set "COMMAND_SRCS=^
commands\AddCommand.cpp ^
commands\DeclareCommand.cpp ^
commands\ForCommand.cpp ^
commands\PrintCommand.cpp ^
commands\SleepCommand.cpp ^
commands\SubtractCommand.cpp"
:: Define core source files
set "CORE_SRCS=^
main.cpp ^
main-console.cpp ^
screen-console.cpp ^
scheduler.cpp ^
process.cpp ^
globals.cpp ^
PagingAllocator.cpp"
:: Compile all sources
g++ -std=c++20 -Wall -Wextra -I%INCLUDE_DIR% %CORE_SRCS% %COMMAND_SRCS% -o %OUTPUT%
:: Check if compilation succeeded
if %ERRORLEVEL% EQU 0 (
echo Compilation successful!
echo You can run the emulator by typing: %OUTPUT%
) else (
echo Compilation failed. Please check the errors above.
)
endlocal