forked from vor0nwe/npp_preview
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.cmd
More file actions
58 lines (43 loc) · 1.85 KB
/
build.cmd
File metadata and controls
58 lines (43 loc) · 1.85 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
@Echo off
pushd %~dp0
where lazbuild >NUL: 2>&1
if %errorlevel%==0 ( goto :FPC )
if "%CI%" NEQ "" ( goto :FPC )
:DELPHI
:: prepare to build the DLLs
call rsvars.bat
MSBuild /v:q /p:Config=Debug;Platform=Win32 /t:build src\prj\PreviewHTML.dproj > out\PreviewHTML_Win32_Debug.log
if errorlevel 1 echo Compilation errors, aborting... && start "" out\PreviewHTML_Win32_Debug.log && goto TheEnd
MSBuild /v:q /p:Config=Debug;Platform=Win64 /t:build src\prj\PreviewHTML.dproj > out\PreviewHTML_Win64_Debug.log
if errorlevel 1 echo Compilation errors, aborting... && start "" out\PreviewHTML_Win64_Debug.log && goto TheEnd
MSBuild /v:q /p:Config=Release;Platform=Win32 /t:build src\prj\PreviewHTML.dproj > out\PreviewHTML_Win32.log
if errorlevel 1 echo Compilation errors, aborting... && start "" out\PreviewHTML_Win32.log && goto TheEnd
MSBuild /v:q /p:Config=Release;Platform=Win64 /t:build src\prj\PreviewHTML.dproj > out\PreviewHTML_Win64.log
if errorlevel 1 echo Compilation errors, aborting... && start "" out\PreviewHTML_Win64.log && goto TheEnd
goto :TheEnd
:FPC
SETLOCAL
set "FPC_PLATFORM=x86_64"
set "FPC_BUILD_TYPE=Debug"
if "%1" NEQ "" ( set "FPC_BUILD_TYPE=%1" )
if "%2" NEQ "" ( set "FPC_PLATFORM=%2" )
set "FPC_BUILD_ALL="
if "%3"=="clean" ( set "FPC_BUILD_ALL=-B" )
call :%FPC_PLATFORM% 2>NUL:
if %errorlevel%==1 ( goto :USAGE ) else ( goto :TheEnd )
:32
:i386
if "%FPC_BUILD_ALL%" NEQ "" ( rmdir /S /Q "out\obj\i386-win32\%FPC_BUILD_TYPE%" 2>NUL: )
lazbuild %FPC_BUILD_ALL% --bm=%FPC_BUILD_TYPE% --cpu=i386 src\prj\PreviewHTML.lpi -q
goto :TheEnd
:64
:x86_64
if "%FPC_BUILD_ALL%" NEQ "" ( rmdir /S /Q "out\obj\x86_64-win64\%FPC_BUILD_TYPE%" 2>NUL: )
lazbuild %FPC_BUILD_ALL% --bm=%FPC_BUILD_TYPE% --cpu=x86_64 src\prj\PreviewHTML.lpi -q
goto :TheEnd
:USAGE
echo Usage: ".\%~n0 [Debug,Release] [32,i386,64,x86_64] [clean]"
ENDLOCAL
:TheEnd
exit /B %errorlevel%
popd