-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathbootstrap.bat
67 lines (57 loc) · 1.53 KB
/
bootstrap.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
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
@echo off
setlocal EnableDelayedExpansion
set __CS_FRIDA_VERSION=15.0.8
set __CS_ARCH=%1
if "!__CS_ARCH!" == "" (
if defined CRYPTOSHARK_ARCH (
set __CS_ARCH=%CRYPTOSHARK_ARCH%
) else (
set __CS_ARCH=x86_64
)
)
if not defined CRYPTOSHARK_ARCH (
call %~dp0tools\windows\activate-env.bat !__CS_ARCH! || exit /b
)
pushd %~dp0
if not exist ext\frida-qml\frida-qml.pri (
echo.
echo ***
echo *** Fetching submodules
echo ***
git submodule init
git submodule update || exit /b
)
set __CS_DEVKITURL=https://github.com/frida/frida/releases/download/!__CS_FRIDA_VERSION!/frida-core-devkit-!__CS_FRIDA_VERSION!-windows-!__CS_ARCH!.exe
set __CS_DEVKITDIR=ext\frida-core\!__CS_ARCH!
if not exist !__CS_DEVKITDIR!\frida-core.lib (
echo.
echo ***
echo *** Fetching frida-core devkit for !__CS_ARCH!
echo ***
rmdir /s /q !__CS_DEVKITDIR! 2>nul
mkdir !__CS_DEVKITDIR! || exit /b
pushd !__CS_DEVKITDIR!
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; " ^
"Invoke-WebRequest -Uri !__CS_DEVKITURL! -OutFile devkit.exe" || exit /b
devkit.exe || exit /b
del devkit.exe
popd
)
if not exist ext\radare2\build\priv_install_dir\lib\libr_core.a (
echo.
echo ***
echo *** Building Radare
echo ***
call tools\windows\build-radare.bat || exit /b
)
if not exist app\agent.js (
echo.
echo ***
echo *** Building Agent
echo ***
pushd app\agent
npm install || exit /b
popd
)
popd
endlocal