mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 19:36:11 +00:00
parent
b01de2d724
commit
87026dfe28
@ -46,10 +46,11 @@ before_build:
|
|||||||
|
|
||||||
# Build config
|
# Build config
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat )
|
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat CUTTER_APPVEYOR_R2DEC=true )
|
||||||
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
|
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
|
- cmd: if defined QMAKE ( set "PATH=%CD%\r2_dist_%ARCH%;%PATH%" && powershell scripts\bundle_r2dec.ps1 "%CD%\%ARTIFACT_PATH%" )
|
||||||
- ps: $env:py_version = (python --version).Split()[1]
|
- ps: $env:py_version = (python --version).Split()[1]
|
||||||
- ps: $env:py_platform = If ($env:ARCH -eq "x64") {"amd64"} Else {"win32"}
|
- ps: $env:py_platform = If ($env:ARCH -eq "x64") {"amd64"} Else {"win32"}
|
||||||
- ps: $env:py_url = "https://www.python.org/ftp/python/${env:py_version}/python-${env:py_version}-embed-${env:py_platform}.zip"
|
- ps: $env:py_url = "https://www.python.org/ftp/python/${env:py_version}/python-${env:py_version}-embed-${env:py_platform}.zip"
|
||||||
|
@ -16,6 +16,6 @@ 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" "c_args=-D_UNICODE -DUNICODE"
|
python sys\meson.py --release --shared --install=..\%R2DIST% --options "r2_datdir=radare2/share" "r2_libdir=radare2/lib" "c_args=-D_UNICODE -DUNICODE"
|
||||||
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
|
||||||
COPY /Y build\shlr\libr2sdb.a ..\%R2DIST%\lib\r_sdb.lib
|
COPY /Y build\shlr\libr2sdb.a ..\%R2DIST%\radare2\lib\r_sdb.lib
|
||||||
|
13
scripts/bundle_r2dec.ps1
Normal file
13
scripts/bundle_r2dec.ps1
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
$dist = $args[0]
|
||||||
|
$python = Split-Path((Get-Command python.exe).Path)
|
||||||
|
|
||||||
|
git clone https://github.com/wargio/r2dec-js.git
|
||||||
|
cd r2dec-js
|
||||||
|
& $python\Scripts\meson.exe --buildtype=release p build
|
||||||
|
ninja -C build
|
||||||
|
Copy-Item . -Recurse -Destination $dist\radare2\lib\plugins\r2dec-js
|
||||||
|
Copy-Item build\core_pdd.dll -Destination $dist\radare2\lib\plugins
|
||||||
|
Remove-Item -Recurse -Force $dist\radare2\lib\plugins\r2dec-js\p
|
||||||
|
Remove-Item -Recurse -Force $dist\radare2\lib\plugins\r2dec-js\build
|
||||||
|
Remove-Item -Recurse -Force $dist\radare2\lib\plugins\r2dec-js\.git
|
||||||
|
Remove-Item -Recurse -Force $dist\radare2\lib\plugins\r2dec-js\.github
|
@ -41,6 +41,9 @@ equals(CUTTER_ENABLE_JUPYTER, true) {
|
|||||||
!defined(CUTTER_BUNDLE_R2_APPBUNDLE, var) CUTTER_BUNDLE_R2_APPBUNDLE=false
|
!defined(CUTTER_BUNDLE_R2_APPBUNDLE, var) CUTTER_BUNDLE_R2_APPBUNDLE=false
|
||||||
equals(CUTTER_BUNDLE_R2_APPBUNDLE, true) CONFIG += CUTTER_BUNDLE_R2_APPBUNDLE
|
equals(CUTTER_BUNDLE_R2_APPBUNDLE, true) CONFIG += CUTTER_BUNDLE_R2_APPBUNDLE
|
||||||
|
|
||||||
|
!defined(CUTTER_APPVEYOR_R2DEC, var) CUTTER_APPVEYOR_R2DEC=false
|
||||||
|
equals(CUTTER_APPVEYOR_R2DEC, true) CONFIG += CUTTER_APPVEYOR_R2DEC
|
||||||
|
|
||||||
CUTTER_ENABLE_JUPYTER {
|
CUTTER_ENABLE_JUPYTER {
|
||||||
message("Jupyter support enabled.")
|
message("Jupyter support enabled.")
|
||||||
DEFINES += CUTTER_ENABLE_JUPYTER
|
DEFINES += CUTTER_ENABLE_JUPYTER
|
||||||
@ -112,6 +115,11 @@ macx:CUTTER_BUNDLE_R2_APPBUNDLE {
|
|||||||
DEFINES += MACOS_R2_BUNDLED
|
DEFINES += MACOS_R2_BUNDLED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUTTER_APPVEYOR_R2DEC {
|
||||||
|
message("Appveyor r2dec")
|
||||||
|
DEFINES += CUTTER_APPVEYOR_R2DEC
|
||||||
|
}
|
||||||
|
|
||||||
QMAKE_SUBSTITUTES += CutterConfig.h.in
|
QMAKE_SUBSTITUTES += CutterConfig.h.in
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
|
@ -189,6 +189,10 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
|||||||
|
|
||||||
// Load plugins
|
// Load plugins
|
||||||
loadPlugins();
|
loadPlugins();
|
||||||
|
|
||||||
|
#ifdef CUTTER_APPVEYOR_R2DEC
|
||||||
|
qputenv("R2DEC_HOME", "radare2\\lib\\plugins\\r2dec-js");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CutterApplication::~CutterApplication()
|
CutterApplication::~CutterApplication()
|
||||||
|
@ -3,10 +3,10 @@ win32 {
|
|||||||
DEFINES += _CRT_SECURE_NO_WARNINGS
|
DEFINES += _CRT_SECURE_NO_WARNINGS
|
||||||
INCLUDEPATH += "$$PWD/../radare2/libr/include/msvc"
|
INCLUDEPATH += "$$PWD/../radare2/libr/include/msvc"
|
||||||
!contains(QT_ARCH, x86_64) {
|
!contains(QT_ARCH, x86_64) {
|
||||||
LIBS += -L"$$PWD/../r2_dist_x86/lib"
|
LIBS += -L"$$PWD/../r2_dist_x86/radare2/lib"
|
||||||
INCLUDEPATH += "$$PWD/../r2_dist_x86/include"
|
INCLUDEPATH += "$$PWD/../r2_dist_x86/include"
|
||||||
} else {
|
} else {
|
||||||
LIBS += -L"$$PWD/../r2_dist_x64/lib"
|
LIBS += -L"$$PWD/../r2_dist_x64/radare2/lib"
|
||||||
INCLUDEPATH += "$$PWD/../r2_dist_x64/include"
|
INCLUDEPATH += "$$PWD/../r2_dist_x64/include"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user