forked from imp5imp5/dasbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_vs.impl.bat
More file actions
78 lines (66 loc) · 2.81 KB
/
Copy pathbuild_vs.impl.bat
File metadata and controls
78 lines (66 loc) · 2.81 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
@if [%CMAKE_GEN_TARGET: =%] == [] (
exit/b 1
)
@echo off
if [%CONFIGURATION%] == [] (
set CONFIGURATION=Release
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Professional" (
call "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Professional\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Enterprise" (
call "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Community" (
call "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\WDExpress" (
call "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\WDExpress\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\BuildTools" (
call "%programfiles(x86)%\Microsoft Visual Studio\%VS_NUMBER%\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Professional" (
call "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Professional\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Enterprise" (
call "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Community" (
call "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\WDExpress" (
call "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\WDExpress\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
if exist "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\BuildTools" (
call "%programfiles%\Microsoft Visual Studio\%VS_NUMBER%\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_x64
goto on_found
)
@echo.
@echo ERROR: Visual Studio %VS_NUMBER% not found
@exit/b 1
:on_found
rem ============ resources =============
pushd src\resources
call stringify_resources_fs8.bat
popd
set "INCLUDE=%CD%\src;%INCLUDE%"
for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x
echo #pragma once> src\buildDate.h
echo #define DASBOX_BUILD_DATE "%Day%.%Month%.%Year%">> src\buildDate.h
rem ============ dasbox ================
rd /S /Q cmake_tmp
mkdir build
pushd build
cmake -G %CMAKE_GEN_TARGET% -DDASBOX_USE_STATIC_STD_LIBS:BOOL=TRUE ..
msbuild dasbox.vcxproj /p:Configuration=%CONFIGURATION%
popd