Skip to content
Open
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 MarkInstalledForMigration(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 BNPluginMarkInstalledForMigration(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
15 changes: 15 additions & 0 deletions pluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,21 @@ bool Extension::Install(std::string versionID)
}


/* Registers a plugin as installed without downloading anything, for legacy extension migration: that path
adopts a plugin whose files are already on disk from the old extension manager. A real Install() there
would first delete those files and then need the network to fetch a replacement -- for a plugin that has
since been deprecated, that download is exactly the one most likely to be unavailable, which would destroy
a working install and leave nothing in its place. This never touches the filesystem or the network.
UNNECESSARY FOR USERS. */
bool Extension::MarkInstalledForMigration(std::string versionID)
{
char* versionIDStr = BNAllocString(versionID.c_str());
auto success = BNPluginMarkInstalledForMigration(m_object, versionIDStr);
BNFreeString(versionIDStr);
return success;
}


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