The Official Radare2 Book | страница 7
Visual Studio 2017:
Note 1: Change Community to either Professional or Enterprise in the command below depending on the version installed.
Note 2: Change vcvars32.bat to vcvars64.bat in the command below for the 64-bit version.
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
Visual Studio Preview:
Note 1: Change Community to either Professional or Enterprise in the command below depending on the version installed.
Note 2: Change vcvars32.bat to vcvars64.bat in the command below for the 64-bit version.
"%ProgramFiles(x86)%\Microsoft Visual Studio\Preview\Community\VC\Auxiliary\Build\vcvars32.bat"
4. Generate the build system with Meson:
Note 1: Change debug to release in the command below depending on whether the latest version or release version is desired.
Note 2: If you are using visual studio 2017, you can change swap vs2015 for vs2017.
meson build --buildtype debug --backend vs2015 --prefix %cd%\dest
Meson currently requires --prefix to point to an absolute path. We use the %CD% pseudo-variable to get the absolute path to the current working directory.
5. Start a build:
Note: Change Debug to Release in the command below depending on the version desired.
msbuild build\radare2.sln /p:Configuration=Debug /m
The /m[axcpucount] switch creates one MSBuild worker process per logical processor on your machine. You can specify a numeric value (e.g. /m:2) to limit the number of worker processes if needed. (This should not be confused with the Visual C++ Compiler switch /MP.)
If you get an error with the 32-bit install that says something along the lines of error MSB4126: The specified solution configuration "Debug|x86" is invalid. Get around this by adding the following argument to the command: /p:Platform=Win32
6. Install into your destination folder: meson install -C build --no-rebuild
7. Check your Radare2 version: dest\bin\radare2.exe -v
1. In the file explorer go to the folder Radare2 was just installed in.
2. From this folder go to dest > bin and keep this window open.
3. Go to System Properties: In the Windows search bar enter sysdm.cpl.
4. Go to Advanced > Environment Variables.
5. Click on the PATH variable and then click edit (if it exists within both the user and system variables, look at the user version).
6. Ensure the file path displayed in the window left open is listed within the PATH variable. If it is not add it and click ok.