mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Adjust r2 paths (#2338)
This commit is contained in:
parent
32adf0b5ba
commit
724d3f26b4
@ -40,9 +40,10 @@ install:
|
|||||||
- cmd: set "PATH=%CD%;%PYTHON%;%PATH%"
|
- cmd: set "PATH=%CD%;%PYTHON%;%PATH%"
|
||||||
- cmd: call "%VSVARSALLPATH%" %ARCH%
|
- cmd: call "%VSVARSALLPATH%" %ARCH%
|
||||||
- cmd: if "%USE_APPVEYOR_QT%" == "false" ( set "QTPATH=%APPVEYOR_BUILD_FOLDER%\%QTPATH%" )
|
- cmd: if "%USE_APPVEYOR_QT%" == "false" ( set "QTPATH=%APPVEYOR_BUILD_FOLDER%\%QTPATH%" )
|
||||||
- cmd: set "PATH=%QTPATH%\bin;%PATH%"
|
- cmd: set "PATH=%QTPATH%\bin;%PYTHON%\Scripts\;%PATH%"
|
||||||
- cmd: echo %PATH%
|
- cmd: echo %PATH%
|
||||||
- cmd: python -m pip install meson==0.52
|
- cmd: python -m pip install meson==0.52
|
||||||
|
- cmd: where meson.exe
|
||||||
- cmd: powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %NINJA_URL% -OutFile ninja.zip; Expand-Archive .\ninja.zip -DestinationPath ."
|
- cmd: powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget %NINJA_URL% -OutFile ninja.zip; Expand-Archive .\ninja.zip -DestinationPath ."
|
||||||
# Artifacts
|
# Artifacts
|
||||||
- cmd: set "ARTIFACT_NAME=Cutter-v1.11.0-%ARCH%.Windows"
|
- cmd: set "ARTIFACT_NAME=Cutter-v1.11.0-%ARCH%.Windows"
|
||||||
@ -56,11 +57,11 @@ before_build:
|
|||||||
build_script:
|
build_script:
|
||||||
- cmd: if defined QMAKE ( call prepare_r2.bat )
|
- cmd: if defined QMAKE ( call prepare_r2.bat )
|
||||||
- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
|
- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
|
||||||
- cmd: if defined QMAKE ( call build.bat CUTTER_APPVEYOR_R2DEC=true CUTTER_R2GHIDRA_STATIC=true R2GHIDRA_SOURCE="%APPVEYOR_BUILD_FOLDER%/r2ghidra-dec" R2GHIDRA_INSTALL_PATH="%APPVEYOR_BUILD_FOLDER%/r2_dist_%ARCH%/radare2/lib/plugins" CUTTER_ENABLE_CRASH_REPORTS=true CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=true CUTTER_DEPS_DIR="%CUTTER_DEPS_DIR%" )
|
- cmd: if defined QMAKE ( call build.bat CUTTER_APPVEYOR_R2DEC=true CUTTER_R2GHIDRA_STATIC=true R2GHIDRA_SOURCE="%APPVEYOR_BUILD_FOLDER%/r2ghidra-dec" R2GHIDRA_INSTALL_PATH="%APPVEYOR_BUILD_FOLDER%/r2_dist/lib/plugins" CUTTER_ENABLE_CRASH_REPORTS=true CUTTER_ENABLE_PYTHON=true CUTTER_ENABLE_PYTHON_BINDINGS=true CUTTER_DEPS_DIR="%CUTTER_DEPS_DIR%" )
|
||||||
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --python )
|
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --python )
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%\bin;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )
|
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist\bin;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )
|
||||||
#- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
|
#- cmd: if defined QMAKE ( C:\msys64\usr\bin\bash -lc "export PATH=\"/c/msys64/usr/bin:$PATH\" && cd \"$APPVEYOR_BUILD_FOLDER\" && scripts/appveyor_r2ghidra.sh" )
|
||||||
#- cmd: powershell scripts\bundle_openssl.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
|
#- cmd: powershell scripts\bundle_openssl.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
|
||||||
- cmd: powershell scripts\bundle_python.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
|
- cmd: powershell scripts\bundle_python.ps1 %ARCH% "%CD%\%ARTIFACT_PATH%"
|
||||||
|
@ -10,7 +10,7 @@ IF !ERRORLEVEL! NEQ 0 (
|
|||||||
EXIT /B 1
|
EXIT /B 1
|
||||||
)
|
)
|
||||||
|
|
||||||
SET "R2DIST=r2_dist_%PLATFORM%"
|
SET "R2DIST=r2_dist"
|
||||||
SET "BUILDDIR=build_%PLATFORM%"
|
SET "BUILDDIR=build_%PLATFORM%"
|
||||||
SET "BREAKPAD_SOURCE_DIR=%CD%\src\breakpad\src\src"
|
SET "BREAKPAD_SOURCE_DIR=%CD%\src\breakpad\src\src"
|
||||||
|
|
||||||
@ -36,8 +36,9 @@ IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
|||||||
ECHO Deploying cutter
|
ECHO Deploying cutter
|
||||||
MKDIR cutter
|
MKDIR cutter
|
||||||
COPY release\cutter.exe cutter\cutter.exe
|
COPY release\cutter.exe cutter\cutter.exe
|
||||||
XCOPY /S /I ..\%R2DIST%\radare2 cutter\radare2
|
XCOPY /S /I ..\%R2DIST%\share cutter\share
|
||||||
DEL cutter\radare2\lib\*.lib
|
XCOPY /S /I ..\%R2DIST%\lib cutter\lib
|
||||||
|
DEL cutter\lib\*.lib
|
||||||
COPY ..\%R2DIST%\bin\*.dll cutter\
|
COPY ..\%R2DIST%\bin\*.dll cutter\
|
||||||
windeployqt cutter\cutter.exe
|
windeployqt cutter\cutter.exe
|
||||||
FOR %%i in (..\src\translations\*.qm) DO MOVE "%%~fi" cutter\translations
|
FOR %%i in (..\src\translations\*.qm) DO MOVE "%%~fi" cutter\translations
|
||||||
|
@ -10,11 +10,13 @@ IF !ERRORLEVEL! NEQ 0 (
|
|||||||
)
|
)
|
||||||
|
|
||||||
SET "PATH=%CD%;%PATH%"
|
SET "PATH=%CD%;%PATH%"
|
||||||
SET "R2DIST=r2_dist_%PLATFORM%"
|
SET "R2DIST=r2_dist"
|
||||||
|
|
||||||
ECHO Building radare2 (%PLATFORM%)
|
ECHO Building radare2 (%PLATFORM%)
|
||||||
CD radare2
|
CD radare2
|
||||||
git clean -xfd
|
git clean -xfd
|
||||||
RMDIR /S /Q ..\%R2DIST%
|
RMDIR /S /Q ..\%R2DIST%
|
||||||
python sys\meson.py --release --shared --install=..\%R2DIST% --options "r2_datdir=radare2/share" "r2_libdir=radare2/lib" "c_args=-D_UNICODE -DUNICODE"
|
rem python sys\meson.py --release --shared --install=..\%R2DIST% --options "r2_datdir=radare2/share" "r2_libdir=radare2/lib" #"c_args=-D_UNICODE -DUNICODE"
|
||||||
|
meson.exe r2_builddir --buildtype=release --prefix=%CD%\..\%R2DIST% || EXIT /B 1
|
||||||
|
ninja -C r2_builddir install || EXIT /B 1
|
||||||
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
scripts/r2ghidra.sh \
|
scripts/r2ghidra.sh \
|
||||||
-DCMAKE_C_COMPILER=cl \
|
-DCMAKE_C_COMPILER=cl \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_PREFIX_PATH="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH;$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2;$QT64PATH" \
|
-DCMAKE_PREFIX_PATH="$APPVEYOR_BUILD_FOLDER/r2_dist;$APPVEYOR_BUILD_FOLDER/r2_dist/include/libr;$QT64PATH" \
|
||||||
-DCMAKE_INSTALL_PREFIX="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2" \
|
-DCMAKE_INSTALL_PREFIX="$APPVEYOR_BUILD_FOLDER/r2_dist" \
|
||||||
-DRADARE2_INSTALL_PLUGDIR="$APPVEYOR_BUILD_FOLDER/r2_dist_$ARCH/radare2/lib/plugins"
|
-DRADARE2_INSTALL_PLUGDIR="$APPVEYOR_BUILD_FOLDER/r2_dist/lib/plugins"
|
@ -3,6 +3,6 @@ $python = Split-Path((Get-Command python.exe).Path)
|
|||||||
|
|
||||||
git clone https://github.com/wargio/r2dec-js.git
|
git clone https://github.com/wargio/r2dec-js.git
|
||||||
cd r2dec-js
|
cd r2dec-js
|
||||||
& $python\Scripts\meson.exe --buildtype=release -Dc_args=-DDUK_USE_DATE_NOW_WINDOWS --prefix=$dist\radare2 --libdir=lib\plugins --datadir=lib\plugins p build
|
& meson.exe --buildtype=release -Dc_args=-DDUK_USE_DATE_NOW_WINDOWS --prefix=$dist --libdir=lib\plugins --datadir=lib\plugins p build
|
||||||
ninja -C build install
|
ninja -C build install
|
||||||
Remove-Item -Recurse -Force $dist\radare2\lib\plugins\core_pdd.lib
|
Remove-Item -Recurse -Force $dist\lib\plugins\core_pdd.lib
|
||||||
|
@ -144,9 +144,6 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
mainWindow->openNewFile(clOptions.fileOpenOptions, askOptions);
|
mainWindow->openNewFile(clOptions.fileOpenOptions, askOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CUTTER_APPVEYOR_R2DEC
|
|
||||||
qputenv("R2DEC_HOME", "radare2\\lib\\plugins\\r2dec-js");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef APPIMAGE
|
#ifdef APPIMAGE
|
||||||
{
|
{
|
||||||
@ -179,10 +176,13 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CUTTER_APPVEYOR_R2DEC
|
||||||
|
qputenv("R2DEC_HOME", "lib\\plugins\\r2dec-js");
|
||||||
|
#endif
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
{
|
{
|
||||||
auto sleighHome = QDir(QCoreApplication::applicationDirPath());
|
auto sleighHome = QDir(QCoreApplication::applicationDirPath());
|
||||||
sleighHome.cd("radare2/lib/plugins/r2ghidra_sleigh");
|
sleighHome.cd("lib/plugins/r2ghidra_sleigh");
|
||||||
Core()->setConfig("r2ghidra.sleighhome", sleighHome.absolutePath());
|
Core()->setConfig("r2ghidra.sleighhome", sleighHome.absolutePath());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
win32 {
|
win32 {
|
||||||
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
DEFINES += _CRT_NONSTDC_NO_DEPRECATE
|
||||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
!contains(QT_ARCH, x86_64) {
|
LIBS += -L"$$PWD/../r2_dist/lib"
|
||||||
LIBS += -L"$$PWD/../r2_dist_x86/radare2/lib"
|
R2_INCLUDEPATH += "$$PWD/../r2_dist/include/libr"
|
||||||
R2_INCLUDEPATH += "$$PWD/../r2_dist_x86/include"
|
|
||||||
} else {
|
|
||||||
LIBS += -L"$$PWD/../r2_dist_x64/radare2/lib"
|
|
||||||
R2_INCLUDEPATH += "$$PWD/../r2_dist_x64/include"
|
|
||||||
}
|
|
||||||
INCLUDEPATH += $$R2_INCLUDEPATH
|
INCLUDEPATH += $$R2_INCLUDEPATH
|
||||||
|
|
||||||
LIBS += \
|
LIBS += \
|
||||||
|
Loading…
Reference in New Issue
Block a user