-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathBUILD_DARKAGES.bat
More file actions
103 lines (86 loc) · 3.18 KB
/
Copy pathBUILD_DARKAGES.bat
File metadata and controls
103 lines (86 loc) · 3.18 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
@echo off
REM ============================================================================
REM DOOM: The Dark Ages - Windows Build Script
REM Run this on your ThinkPad T460s with Visual Studio installed
REM ============================================================================
echo =============================================
echo DOOM: The Dark Ages - Build Script
echo =============================================
echo.
REM Try to find Visual Studio
set "VS_FOUND=0"
REM Visual Studio 2022
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
set "VS_FOUND=1"
echo Found Visual Studio 2022 Community
)
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Professional\Common7\Tools\VsDevCmd.bat"
set "VS_FOUND=1"
echo Found Visual Studio 2022 Professional
)
REM Visual Studio 2019
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
set "VS_FOUND=1"
echo Found Visual Studio 2019 Community
)
REM Visual Studio 2017
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
set "VS_FOUND=1"
echo Found Visual Studio 2017 Community
)
if "%VS_FOUND%"=="0" (
echo ERROR: Visual Studio not found!
echo Please install Visual Studio 2017/2019/2022 with C++ tools
echo Or open "Developer Command Prompt" and run this script from there
pause
exit /b 1
)
echo.
echo [1/3] Building DOOM: The Dark Ages...
echo.
cd /d "%~dp0neo"
REM Build Release configuration
msbuild doom3.sln /p:Configuration=Release /p:Platform=Win32 /m /v:minimal
if errorlevel 1 (
echo.
echo BUILD FAILED! Check errors above.
pause
exit /b 1
)
echo.
echo [2/3] Build successful!
echo.
REM Copy output
set OUTPUT_DIR=%~dp0build\Win32\Release
echo Output directory: %OUTPUT_DIR%
if exist "%OUTPUT_DIR%\DarkAges.exe" (
echo.
echo [3/3] Packaging standalone...
REM Create standalone directory
set STANDALONE_DIR=%~dp0DOOM_Dark_Ages_Standalone
mkdir "%STANDALONE_DIR%" 2>nul
copy "%OUTPUT_DIR%\DarkAges.exe" "%STANDALONE_DIR%\" /Y
xcopy "%~dp0darkages" "%STANDALONE_DIR%\darkages\" /E /I /Y /Q
xcopy "%~dp0base\renderprogs" "%STANDALONE_DIR%\base\renderprogs\" /E /I /Y /Q
copy "%~dp0darkages\icon\darkages.ico" "%STANDALONE_DIR%\" /Y
echo.
echo =============================================
echo BUILD COMPLETE!
echo =============================================
echo.
echo EXE: %STANDALONE_DIR%\DarkAges.exe
echo Icon: darkages.ico (embedded in EXE)
echo.
echo To play: Run DarkAges.exe
echo =============================================
) else (
echo WARNING: DarkAges.exe not found at expected location
echo Check: %OUTPUT_DIR%
dir "%OUTPUT_DIR%\*.exe" 2>nul
)
echo.
pause