mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Add JSDec packaging for macos. (#2580)
This commit is contained in:
parent
4501a6ba44
commit
0553d3ffdb
1
.github/workflows/ccpp.yml
vendored
1
.github/workflows/ccpp.yml
vendored
@ -184,6 +184,7 @@ jobs:
|
||||
-DCUTTER_PACKAGE_DEPENDENCIES=ON \
|
||||
-DCUTTER_ENABLE_DEPENDENCY_DOWNLOADS=ON \
|
||||
-DCUTTER_PACKAGE_RZ_GHIDRA=ON \
|
||||
-DCUTTER_PACKAGE_JSDEC=ON \
|
||||
-DCMAKE_FRAMEWORK_PATH="$BREAKPAD_FRAMEWORK_DIR" \
|
||||
-DCPACK_BUNDLE_APPLE_CERT_APP="-" \
|
||||
.. && \
|
||||
|
@ -55,9 +55,7 @@ target_include_directories(Rizin INTERFACE
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/librz>")
|
||||
|
||||
install(TARGETS Rizin EXPORT CutterTargets)
|
||||
if (APPLE)
|
||||
install(DIRECTORY "${RIZIN_INSTALL_DIR}/" DESTINATION ".")
|
||||
elseif (WIN32)
|
||||
if (WIN32)
|
||||
foreach(_lib ${RZ_LIBS} ${RZ_EXTRA_LIBS})
|
||||
install(FILES "${RIZIN_INSTALL_DIR}/${RZ_INSTALL_BINPATH}/${_lib}.dll" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
endforeach()
|
||||
|
14
dist/CMakeLists.txt
vendored
14
dist/CMakeLists.txt
vendored
@ -80,7 +80,19 @@ if(APPLE)
|
||||
get_filename_component(QT_PREFIX "${MACDEPLOYQT_PATH}/../.." ABSOLUTE)
|
||||
list(APPEND RZ_GHIDRA_PREFIX_PATH "${QT_PREFIX}")
|
||||
set(RIZIN_INSTALL_PLUGDIR "share/rizin/plugins") # escaped backslash on purpose, should be evaluated later
|
||||
|
||||
|
||||
if (CUTTER_PACKAGE_JSDEC AND CUTTER_ENABLE_DEPENDENCY_DOWNLOADS)
|
||||
install(CODE "
|
||||
execute_process(COMMAND \"${CMAKE_CURRENT_SOURCE_DIR}/../scripts/jsdec.sh\" --prefix=\${CMAKE_INSTALL_PREFIX}
|
||||
\"-Drizin_incdir=\${CMAKE_INSTALL_PREFIX}/include/librz\"
|
||||
\"-Drizin_libdir=\${CMAKE_INSTALL_PREFIX}/lib\"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE SCRIPT_RESULT)
|
||||
if (SCRIPT_RESULT)
|
||||
message(FATAL_ERROR \"Failed to package jsdec\")
|
||||
endif()
|
||||
")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
|
2
dist/macos/Info.plist.in
vendored
2
dist/macos/Info.plist.in
vendored
@ -5,7 +5,7 @@
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Cutter</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Cutter</string>
|
||||
<string>cutter</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@FULL_VERSION@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
@ -515,7 +515,7 @@ if (CUTTER_APPIMAGE_BUILD)
|
||||
endif()
|
||||
|
||||
if (CUTTER_PACKAGE_JSDEC)
|
||||
target_compile_definitions(Cutter PRIVATE CUTTER_APPVEYOR_JSDEC)
|
||||
target_compile_definitions(Cutter PRIVATE CUTTER_BUNDLE_JSDEC)
|
||||
endif()
|
||||
|
||||
if(APPLE AND CUTTER_ENABLE_PACKAGING AND CUTTER_USE_BUNDLED_RIZIN)
|
||||
|
@ -173,18 +173,20 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
"share/rizin/plugins/rz_ghidra_sleigh"); // Contents/Resources/rz/share/rizin/plugins/rz_ghidra_sleigh
|
||||
Core()->setConfig("ghidra.sleighhome", sleighHome.absolutePath());
|
||||
|
||||
# ifdef CUTTER_BUNDLE_JSDEC
|
||||
auto jsdecHome = rzprefix;
|
||||
jsdecHome.cd(
|
||||
"share/rizin/plugins/jsdec"); // Contents/Resources/rz/share/rizin/plugins/jsdec
|
||||
qputenv("JSDEC_HOME", jsdecHome.absolutePath().toLocal8Bit());
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CUTTER_APPVEYOR_JSDEC
|
||||
qputenv("JSDEC_HOME", "lib\\plugins\\jsdec");
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
{
|
||||
# ifdef CUTTER_BUNDLE_JSDEC
|
||||
qputenv("JSDEC_HOME", "lib\\plugins\\jsdec");
|
||||
# endif
|
||||
auto sleighHome = QDir(QCoreApplication::applicationDirPath());
|
||||
sleighHome.cd("lib/plugins/rz_ghidra_sleigh");
|
||||
Core()->setConfig("ghidra.sleighhome", sleighHome.absolutePath());
|
||||
|
Loading…
Reference in New Issue
Block a user