-
Notifications
You must be signed in to change notification settings - Fork 4
/
build_script.bat
87 lines (69 loc) · 1.83 KB
/
build_script.bat
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
@echo off
if /I "%FF_TARGET%"=="x64" (
set FF_MAKE_PARAM=64BIT=yes
set ISCC_PARAM=/dis64bit
) else (
set FF_MAKE_PARAM=
set ISCC_PARAM=
)
echo [Removing files]
call bin\clear.bat
echo. & echo [Compiling with MSVC]
call "%VS100COMNTOOLS%vsvars32.bat"
title %SOLUTIONFILE% /%BUILDTYPE% %BUILDTARGET%
devenv %SOLUTIONFILE% /%BUILDTYPE% %BUILDTARGET%
if %ERRORLEVEL% neq 0 goto GotError
echo. & echo [Compiling with GCC]
pushd src\ffmpeg
if /I not "%BUILDTYPE%"=="build" (
make clean
if %ERRORLEVEL% neq 0 goto GotError
)
if /I not "%BUILDTYPE%"=="clean" (
make -j%NUMBER_OF_PROCESSORS% %FF_MAKE_PARAM%
if %ERRORLEVEL% neq 0 goto GotError
)
popd
if /I "%FF_TARGET%"=="x86" (
pushd src\imgFilters\KernelDeint
if /I not "%BUILDTYPE%"=="build" (
make clean
if %ERRORLEVEL% neq 0 goto GotError
)
if /I not "%BUILDTYPE%"=="clean" (
make -j%NUMBER_OF_PROCESSORS% %FF_MAKE_PARAM%
if %ERRORLEVEL% neq 0 goto GotError
)
popd
)
if /I "%BUILDTYPE%"=="clean" exit /b
echo. & echo [Building installer]
call :SubDetectInnoSetup
set ISCC="%InnoSetupPath%\ISCC.exe"
if exist %ISCC% (
pushd bin\distrib
%ISCC% ffdshow_installer.iss %ISCC_PARAM%
if %ERRORLEVEL% neq 0 goto GotError
popd
) else (
echo InnoSetup not found
pause
)
exit /b
:SubDetectInnoSetup
if defined PROGRAMFILES(x86) (
set "U_=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
) else (
set "U_=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
)
for /F "delims=" %%a in (
'REG QUERY "%U_%\Inno Setup 5_is1" /v "Inno Setup: App Path"2^>Nul^|FIND "REG_"') do (
set "InnoSetupPath=%%a" & CALL :SubInnoSetup %%InnoSetupPath:*Z=%%)
exit /b
:SubInnoSetup
set InnoSetupPath=%*
exit /b
:GotError
echo. & echo There was an error!
pause
exit /b