-
Notifications
You must be signed in to change notification settings - Fork 44
/
preconfigure.bat
54 lines (50 loc) · 2.36 KB
/
preconfigure.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
set PKG_CONFIG_PATH=%CD%\radare2\lib\pkgconfig
set PATH=%CD%\radare2\bin;%PATH%
set VSARCH=x64
git submodule update --init
set GNV=0.4.5
python -m wget https://github.com/radareorg/ghidra-native/releases/download/%GNV%/ghidra-native-%GNV%.zip
unzip -q ghidra-native-%GNV%.zip
if %ERRORLEVEL% NEQ 0 (
powershell "Expand-Archive -LiteralPath ghidra-native-%GNV%.zip -DestinationPath ."
)
ren ghidra-native-%GNV% ghidra-native
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
echo === Finding Visual Studio...
cl --help > NUL 2> NUL
if %ERRORLEVEL% == 0 (
echo FOUND
) else (
if EXIST "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" (
echo "Found 2022 Enterprise edition"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
if EXIST "C:\Program Files\Microsoft Visual Studio\2022\Community" (
echo "Found 2022 Community edition"
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
if EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community" (
echo "Found 2019 community edition"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
if EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" (
echo "Found 2019 Enterprise edition"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
if EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" (
echo "Found 2019 Professional edition"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
if EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" (
echo "Found 2019 BuildTools"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %VSARCH%
) else (
echo "Not Found"
exit /b 1
)
)
)
)
)
)
)