Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions binaryninjaapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20915,6 +20915,7 @@ namespace BinaryNinja {
bool Uninstall();
bool CancelUninstall();
bool Install(std::string versionID);
bool InstallForMigration(std::string versionID);
bool InstallDependencies();
bool InstallDependencies(const std::string& versionID);
bool InstallDependencies(const std::vector<std::string>& excludedPackageNames);
Expand Down
3 changes: 2 additions & 1 deletion binaryninjacore.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// Current ABI version for linking to the core. This is incremented any time
// there are changes to the API that affect linking, including new functions,
// new types, or modifications to existing functions or types.
#define BN_CURRENT_CORE_ABI_VERSION 188
#define BN_CURRENT_CORE_ABI_VERSION 189

// Minimum ABI version that is supported for loading of plugins. Plugins that
// are linked to an ABI version less than this will not be able to load and
Expand Down Expand Up @@ -8910,6 +8910,7 @@ extern "C"
BINARYNINJACOREAPI bool BNPluginEnable(BNPlugin* p, bool force);
BINARYNINJACOREAPI bool BNPluginDisable(BNPlugin* p);
BINARYNINJACOREAPI bool BNPluginInstall(BNPlugin* p, const char* versionID);
BINARYNINJACOREAPI bool BNPluginInstallForMigration(BNPlugin* p, const char* versionID);
BINARYNINJACOREAPI bool BNPluginInstallDependencies(BNPlugin* p);
BINARYNINJACOREAPI bool BNPluginInstallDependenciesForVersion(BNPlugin* p, const char* versionID);
BINARYNINJACOREAPI bool BNPluginInstallDependenciesWithExclusions(BNPlugin* p,
Expand Down
13 changes: 13 additions & 0 deletions pluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,19 @@ bool Extension::Install(std::string versionID)
}


/* Like Install, but also allows you to install previously installed deprecated plugin.
Intended only for plugin migration: deprecation should block fresh installs, but must never strand a
previously-installed plugin where it can't be registered as installed (and so can't be uninstalled).
UNNECESSARY FOR USERS. */
bool Extension::InstallForMigration(std::string versionID)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine, but where are the Python and Rust equivalents? Also, see other note about moving documentation to here.

{
char* versionIDStr = BNAllocString(versionID.c_str());
auto success = BNPluginInstallForMigration(m_object, versionIDStr);
BNFreeString(versionIDStr);
return success;
}


bool Extension::InstallDependencies()
{
return InstallDependencies("");
Expand Down