blob: 3d951f27193b47b3cef0e337e4cf77206bee605c (
plain) (
blame)
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
|
@if not "%verboseBuild%"=="y" echo off
rem Shave and a Haircut
rem (c) 2019 Epic Games
rem US Patent 6720962
rem
rem Rebuild a Visual Studio project
rem
rem Note that our usage of the terms 'build' and 'rebuild' are the reverse
rem of Visual Studio's. For us 'build' means to clean out the old stuff
rem and do a full build while 'rebuild' means to just rebuild those bits
rem which have changed.
rem
setlocal
if a%5b==ab (
echo Usage: vcrebuild directory project config vsVersion solutionBaseName [bits]
goto done
)
set builddir=%1
set project=%2
set config=%3
set vsVersion=%4
set solution=%5
set platform=Win32
if "%6"=="64" set platform=x64
rem For Visual Studio 7.* we used the normal solution and project file names,
rem but from VS8 onward the solution and project files have Visual Studio major
rem version number before the extension. E.g. "shaveHaircut-vs8.sln".
rem Since the paths may contain parentheses, we cannot use the new style of
rem 'if' statements here.
if /i not "%vsVersion%"=="vs7" goto notVS7
set solution=%solution%.sln
set project=%project%.vcproj
set vsPath=%VS71COMNTOOLS%\..\IDE\devenv
goto doneVSVersion
:notVS7
set solution=%solution%-%vsVersion%.sln
set project=%project%-%vsVersion%.vcproj
set vsPath=%VS80COMNTOOLS%\..\IDE\devenv
:doneVSVersion
if not exist "%solution%" (
echo vcbuild: Could not find solution file '%solution%'.
echo vcbuild: Note that you must be in the same directory as the solution file
goto done
)
rem
rem Visual Studio has problems with .\dir notation. It's fine with
rem dir1\dir2 it just seems to have trouble with using '.' for the current
rem directory. So we only add the path to the project file if the build dir
rem is not the current directory.
rem
if not "%builddir%"=="." set project=%builddir%\%project%
@echo on
"%vsPath%" %solution% /build "%config%" /project %project% /projectconfig "%config%|%platform%"
@if not "%verboseBuild%"=="y" echo off
:done
endlocal
|