-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_parsec.bat
More file actions
85 lines (74 loc) · 2 KB
/
build_parsec.bat
File metadata and controls
85 lines (74 loc) · 2 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
@echo off
echo Building ParsecCore - StarSim Physics Engine
echo ===========================================
cd /d "%~dp0"
echo Current directory: %CD%
echo.
if not exist "int\StarSim\ParsecCore" (
echo Error: ParsecCore directory not found at int\StarSim\ParsecCore
pause
exit /b 1
)
echo Navigating to ParsecCore directory...
cd int\StarSim\ParsecCore
echo.
echo Step 1: Cleaning existing build directory...
if exist build (
echo Removing existing build directory...
rmdir /s /q build 2>nul
if exist build (
echo Warning: Some files couldn't be removed. Trying force removal...
attrib -r build\* /s 2>nul
rmdir /s /q build 2>nul
if exist build (
echo Warning: Build directory still exists. Continuing anyway...
)
)
echo Build directory cleanup completed
)
echo.
echo Step 2: Creating fresh build directory...
mkdir build
cd build
echo.
echo Step 3: Running CMake configuration...
echo This will download dependencies (googletest, nlohmann/json, muParser)
echo This may take several minutes on first run...
cmake .. -G "Visual Studio 17 2022"
if errorlevel 1 (
echo.
echo CMake configuration failed!
echo.
echo Common solutions:
echo 1. Install Visual Studio 2022 with C++ development tools
echo 2. Install CMake and ensure it's in your PATH
echo 3. Check internet connection for dependency downloads
echo 4. Try running as Administrator
echo.
pause
exit /b 1
)
echo.
echo Step 4: Building the project...
cmake --build .
if errorlevel 1 (
echo.
echo Build failed!
echo Check the error messages above for details.
echo.
pause
exit /b 1
)
echo.
echo ============================================
echo SUCCESS: ParsecCore built successfully!
echo ============================================
echo.
echo You can now:
echo 1. Run tests: ctest
echo 2. Run examples: .\Debug\parsec_windows_app.exe
echo 3. Use HyperThreader to start StarSim integration
echo.
echo Build directory: %CD%
echo.
pause