forked from reachithard/hive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
40 lines (33 loc) · 1011 Bytes
/
build.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
@echo off
SETLOCAL EnableDelayedExpansion
if exist .\bin\lib (
del .\bin\lib\*.dll /f /s /q
del .\bin\*.exe /f /s /q
echo "delete old lib"
) else (
md .\bin\lib
)
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" (
echo "WARNING: You need VS 2019 version or later (for vswhere.exe)"
)
set vswherestr=^"!ProgramFiles(x86)!\Microsoft Visual Studio\Installer\vswhere.exe^" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
for /f "usebackq tokens=*" %%i in (`!vswherestr!`) do (
set BUILDVCTOOLS=%%i\Common7\IDE
echo BUILDVCTOOLS: !BUILDVCTOOLS!
if not exist !BUILDVCTOOLS!\devenv.com (
echo Error: Cannot find VS2019 or later
exit /b 2
)
"!BUILDVCTOOLS!\devenv.com" .\hive.sln /Rebuild
"!BUILDVCTOOLS!\devenv.com" .\hive.sln /Build
goto :break
)
:break
move .\bin\*.dll .\bin\lib
:: copy hooks
if not exist .git\hooks (
md .git\hooks
)
xcopy .githooks\* .git\hooks\ /y /s
echo "copy hooks"
pause