Skip to content

Commit

Permalink
Manalyze now compiles and runs on OS X (fixes #23).
Browse files Browse the repository at this point in the history
  • Loading branch information
JusticeRage committed Feb 16, 2020
1 parent 2bcf633 commit eb636a0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ if (WIN32)
set(Boost_USE_STATIC_RUNTIME ON)
endif()

if (APPLE)
set(CMAKE_MACOSX_RPATH 1)
endif()

if (GitHub MATCHES [Oo][Nn])
find_package(Git REQUIRED)
endif()
Expand Down Expand Up @@ -115,7 +119,7 @@ else()
plugins/plugin_authenticode/commons.cpp
plugins/plugin_authenticode/asn1.cpp
plugins/plugin_authenticode/pe_authenticode_digest.cpp)
target_link_libraries(plugin_authenticode ${OPENSSL_LIBRARIES})
target_link_libraries(plugin_authenticode manacommons manape hash-library yara ${OPENSSL_LIBRARIES})
endif()
endif()

Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ Manalyze was written in C++ for Windows and Linux and is released under the term
## How to build
There are few things I hate more than checking out an open-source project and spending two hours trying to build it. This is why I did my best to make Manalyze as easy to build as possible. If these few lines don't work for you, then I have failed at my job and you should drop me a line so I can fix this.

### On Linux and BSD (tested on Debian Jessie and FreeBSD 10.2)
### On Linux and BSD (tested on Debian Buster and FreeBSD 10.2)
```
$> [sudo or as root] apt-get install libboost-regex-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libssl-dev build-essential cmake git
$> [alternatively, also sudo or as root] pkg install boost-libs-1.55.0_8 libressl cmake git
$> git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze
$> cmake .
$> make
$> make -j5
$> cd bin && ./manalyze --version
```

Expand All @@ -48,6 +48,18 @@ $> cd bin && ./manalyze --version
- `git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze && cmake .`
- A Visual Studio project `manalyze.sln` should have appeared in the `Manalyze` folder!

### On OS X (tested on Mojave)
```
# Skip these two lines if you already have a sane build environment
user$ xcode-select --install
user$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
user$ git clone https://github.com/JusticeRage/Manalyze.git && cd Manalyze
user$ brew install openssl boost
user$ cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ && make -j5
user$ bin && ./manalyze --version
```

### Offline builds
If you need to build Manalyze on a machine with no internet access, you have to manually check out the following projects:
- [Yara](https://github.com/JusticeRage/yara/archive/master.zip)
Expand Down
4 changes: 4 additions & 0 deletions src/plugin_framework/plugin_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ void PluginManager::load_all(const std::string& path)
#ifdef BOOST_WINDOWS_API
std::string ext(".dll");
#elif defined BOOST_POSIX_API
# if defined __APPLE__
std::string ext(".dylib");
# else
std::string ext(".so");
# endif
#endif

if (!bfs::exists(path)) {
Expand Down

0 comments on commit eb636a0

Please sign in to comment.