-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.cmd
More file actions
53 lines (41 loc) · 1.96 KB
/
build.cmd
File metadata and controls
53 lines (41 loc) · 1.96 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
@echo off
REM THIS LINE NEEDED TO SUPPORT CRUISECONTROL
SET DEVROOT=%CD%
SET VISUALIZER_FILE_NAME=roc-optiq
if %ERRORLEVEL%==0 ECHO. > %DEVROOT%\success
REM Create build directory
IF NOT EXIST "%DEVROOT%\build" mkdir "%DEVROOT%\build"
REM Run cmake build commands
cmake --preset "x64-release" -D ROCPROFVIS_ENABLE_INTERNAL_BANNER=OFF
cmake --build %DEVROOT%\build\x64-release --preset "Windows Release Build" --parallel 4
IF NOT EXIST "%DEVROOT%\build\x64-release\Release\%VISUALIZER_FILE_NAME%.exe" (
ECHO ❌ %VISUALIZER_FILE_NAME% was not built!
GOTO BUILDISSUE
) ELSE (
ECHO ✅ %VISUALIZER_FILE_NAME% has been successfully built!
)
ECHO Build.cmd: Creating standard release folder structure
CALL %DEVROOT%\CreateReleaseFolderStructure.cmd
if %ERRORLEVEL% NEQ 0 GOTO BUILDISSUE
REM Use : "%DEVROOT%\ReleaseCommon\64Bit\All\" - For Public release files , if any
REM Use : "%DEVROOT%\ReleaseInternal\64Bit\All\" - For Internal release files , if any
REM Use : "%DEVROOT%\ReleaseNDA\64Bit\All\" - For NDA release files , if any
REM Keep using md to create subfolders if needed.
REM Example : md %DEVROOT%\ReleaseCommon\64Bit\All\bin
REM copy /y "%DEVROOT%\somefile" "%DEVROOT%\ReleaseCommon\64Bit\All\bin"
REM if %ERRORLEVEL% NEQ 0 GOTO BUILDISSUE
REM Copy the built executable to proper folder structure for release
ECHO Build.cmd: Copying files to standard folder structure
copy /y "%DEVROOT%\build\x64-release\Release\%VISUALIZER_FILE_NAME%.exe" "%DEVROOT%\ReleaseCommon\64Bit\All\"
copy /y "%DEVROOT%\build\x64-release\Release\glfw3.dll" "%DEVROOT%\ReleaseCommon\64Bit\All\"
copy /y "%DEVROOT%\README.md" "%DEVROOT%\ReleaseCommon\64Bit\All\"
md "%DEVROOT%\ReleaseCommon\64Bit\All\docs"
md "%DEVROOT%\ReleaseCommon\64Bit\All\docs\images"
copy /y "%DEVROOT%\docs\images\ui_sections.png" "%DEVROOT%\ReleaseCommon\64Bit\All\docs\images\ui_sections.png"
if %ERRORLEVEL% NEQ 0 GOTO BUILDISSUE
GOTO END
:BUILDISSUE
del /Q /F %DEVROOT%\success
ECHO Build failed!
:END
ECHO Build completed.