summaryrefslogtreecommitdiff
path: root/examples/bin-info/src/bin-info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bin-info/src/bin-info.cpp')
-rw-r--r--examples/bin-info/src/bin-info.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/examples/bin-info/src/bin-info.cpp b/examples/bin-info/src/bin-info.cpp
index 9503c734..3d2b2451 100644
--- a/examples/bin-info/src/bin-info.cpp
+++ b/examples/bin-info/src/bin-info.cpp
@@ -1,6 +1,6 @@
/*
* Command line executable file that outputs
- * some information about the exectuable passed to.
+ * some information about the executable passed to.
*/
#include <sys/stat.h>
@@ -15,26 +15,6 @@
using namespace BinaryNinja;
using namespace std;
-#ifndef _WIN32
- #include <libgen.h>
- #include <dlfcn.h>
-string get_plugins_directory()
-{
- Dl_info info;
- if (!dladdr((void*)BNGetBundledPluginDirectory, &info))
- return NULL;
-
- stringstream ss;
- ss << dirname((char*)info.dli_fname) << "/plugins/";
- return ss.str();
-}
-#else
-string get_plugins_directory()
-{
- return "C:\\Program Files\\Vector35\\BinaryNinja\\plugins\\";
-}
-#endif
-
bool is_file(char* fname)
{
struct stat buf;
@@ -60,10 +40,8 @@ int main(int argc, char* argv[])
}
/* In order to initiate the bundled plugins properly, the location
- * of where bundled plugins directory is must be set. Since
- * libbinaryninjacore is in the path get the path to it and use it to
- * determine the plugins directory */
- SetBundledPluginDirectory(get_plugins_directory());
+ * of where bundled plugins directory is must be set. */
+ SetBundledPluginDirectory(GetBundledPluginDirectory());
InitPlugins();
Ref<BinaryData> bd = new BinaryData(new FileMetadata(), argv[1]);