-
-
Notifications
You must be signed in to change notification settings - Fork 492
/
Copy pathacquire.cmd
93 lines (75 loc) · 2.19 KB
/
acquire.cmd
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
@echo off
set PATCH_DIR=%~dp0
echo.
echo Downloading the depot_tools...
curl https://storage.googleapis.com/chrome-infra/depot_tools.zip --output depot_tools.zip
if errorlevel 1 goto :error
echo.
echo Opening the zip file...
c:
mkdir c:\depot_tools
if errorlevel 1 goto :error
tar -xf depot_tools.zip -C /../depot_tools/
if errorlevel 1 goto :error
echo.
echo Deleting the depot_tools.zip file
del depot_tools.zip
echo.
echo Setting environment variables
set PATH=c:\depot_tools;%PATH%
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION=2022
echo.
echo Creating the folder where the code base will be placed...
c:
mkdir c:\webrtc
if errorlevel 1 goto :error
cd c:\webrtc
if errorlevel 1 goto :error
REM Downloading the bits
echo.
echo Telling the gclient tool to initialize your local copy of the repos...
call gclient
if errorlevel 1 goto :error
echo.
echo Requesting the tools to fetch the WebRTC code base...
call fetch --nohooks webrtc
if errorlevel 1 goto :error
echo.
echo Changing to the branch-heads/6312 branch...
cd src
if errorlevel 1 goto :error
call git checkout branch-heads/6312
if errorlevel 1 goto :error
echo.
echo Instructing the tools to bring the bits from all the sub repositories to your dev box...
call gclient sync -D -r branch-heads/6312
if errorlevel 1 goto :error
echo.
echo Adding forked Telegram+UWP upstream
call git remote add upstream https://github.com/FrayxRulez/webrtc-uwp.git
call git remote update
call git fetch
call git checkout m123
pushd build
call git apply --3way --ignore-whitespace "%PATCH_DIR%/build/fix.patch"
echo Checking the Architecture type
for /f "skip=1" %%a in ('wmic cpu get architecture') do (
set "cpu_arch=%%a"
goto :woa-patch
)
:woa-patch
if "%cpu_arch%"=="12" (
call git apply --3way --ignore-whitespace "%PATCH_DIR%/build/woa_support.patch"
)
pushd ..\third_party
call git apply --3way --ignore-whitespace "%PATCH_DIR%/third_party/fix.patch"
pushd boringssl\src
call git apply --3way --ignore-whitespace "%PATCH_DIR%/third_party/string.patch"
pushd ..\..\libyuv
call git apply --3way --ignore-whitespace "%PATCH_DIR%/third_party/libyuv/fix.patch"
goto :exit
:error
echo Last command failed with erro code: %errorlevel%
:exit
exit /b %errorlevel%