-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_environment.bat
More file actions
95 lines (85 loc) · 3.14 KB
/
build_environment.bat
File metadata and controls
95 lines (85 loc) · 3.14 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
REM Usage: build_environment.bat x86 Release
@ECHO off
set MACHINE_X86="%1" == "x86"
set CONFIG_RELEASE="%2" == "Release"
if %MACHINE_X86% (
echo Building for x86.
set MACHINE_X=x86
) else (
echo Building for x64.
set MACHINE_X=x64
)
if %CONFIG_RELEASE% (
echo Building release mode.
) else (
echo Building debug mode.
)
rem Use all CPU cores
set CL=/MP
rem Edit to suit your environment
SET MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
SET VCVERSION=140
SET BUILDTOOLS_PATH=E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\
SET BUILDTOOLS_SCRIPT=vcvarsall.bat
rem If using the Visual C++ Build Tools, uncomment & adjust the following
rem SET BUILDTOOLS_PATH=C:\Program Files (x86)\Microsoft Visual C++ Build Tools
rem SET BUILDTOOLS_SCRIPT=vcbuildtools.bat
rem If building for XP and using the C++ Build Tools package (not full VS,)
rem install the Windows 7.1 SDK then uncomment and adjust the following
rem SET WindowsSdkDir_71A=E:\Program Files\Microsoft SDKs\Windows\v7.1\
SET XCOPY=xcopy /S /Y /I
SET MSBUILD=msbuild /m /p:PlatformToolset=v%VCVERSION%_xp
rem If using the Visual C++ Build Tools, uncomment & adjust the following
rem SET MSBUILD=msbuild /m /p:PlatformToolset=v140_xp /p:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\\"
set ROOT_DIR=%CD%
SET BIN_DIR=%CD%\bin\
SET LIB_DIR=%CD%\lib\
SET INCLUDE_DIR=%CD%\include\
SET BUILD_DIR=%CD%\build\
set OLDPATH=%PATH%
if %MACHINE_X86% (
rem If build OS is 64-bit:
rem call "%BUILDTOOLS_PATH%\vcbuildtools.bat" amd64_x86
call "%BUILDTOOLS_PATH%\%BUILDTOOLS_SCRIPT%" amd64_x86
rem If build OS is 32-bit, uncomment the following:
rem call "%BUILDTOOLS_PATH%\vcbuildtools.bat" x86
) else (
rem If build OS is 64-bit:
rem call "%BUILDTOOLS_PATH%\vcbuildtools.bat" amd64
call "%BUILDTOOLS_PATH%\%BUILDTOOLS_SCRIPT%" amd64
rem If build OS is 32-bit, uncomment the following:
rem call "%BUILDTOOLS_PATH%\vcbuildtools.bat" x86_amd64
)
md %LIB_DIR%
md %INCLUDE_DIR%
md %BIN_DIR%
call build_sqlite3.bat
call build_zlib.bat
call build_pthreads.bat
call build_protobuf.bat
call build_portmidi.bat
call build_libid3tag.bat REM depends on zlib
call build_libmad.bat
call build_libogg.bat
call build_libopus.bat REM depends on libogg
call build_libvorbis.bat
call build_libshout.bat
call build_libflac.bat
call build_libsndfile.bat
call build_rubberband.bat
call build_portaudio.bat
call build_hss1394.bat
call build_fftw3.bat
call build_chromaprint.bat REM depends on fftw3
call build_taglib.bat REM depends on zlib
REM We do not distribute LAME with Mixxx. If you wish to build it locally, uncomment.
REM call build_lame.bat
call build_qt4.bat REM depends on sqlite3
REM Copy debug runtime DLLs for debug builds.
if not %CONFIG_RELEASE% (
%XCOPY% "%MSVC_PATH%\redist\Debug_NonRedist\%MACHINE_X%\Microsoft.VC%VCVERSION%.DebugCRT\*.dll" %LIB_DIR%
%XCOPY% "%MSVC_PATH%\redist\Debug_NonRedist\%MACHINE_X%\Microsoft.VC%VCVERSION%.DebugCXXAMP\*.dll" %LIB_DIR%
%XCOPY% "%MSVC_PATH%\redist\Debug_NonRedist\%MACHINE_X%\Microsoft.VC%VCVERSION%.DebugOpenMP\*.dll" %LIB_DIR%
)
REM Clean up after vcbuildtools.bat since repeated running eventually overflows PATH.
SET PATH=%OLDPATH%