diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20676d4f9..615c27ba3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -129,29 +129,29 @@ jobs: path: | build/*.msi -# macos-build: -# runs-on: macos-11.0 -# name: 🍎 macOS 11.0 -# steps: + macos-build: + runs-on: macos-11.0 + name: 🍎 macOS 11.0 + steps: -# - name: 🧰 Checkout -# uses: actions/checkout@v2 -# with: -# fetch-depth: 0 + - name: 🧰 Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 -# - name: ⬇️ Install dependencies -# run: | -# brew bundle --no-lock --file dist/Brewfile + - name: ⬇️ Install dependencies + run: | + brew bundle --no-lock --file dist/Brewfile -# - name: ✋ Build -# run: | -# mkdir build -# cd build -# CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCREATE_BUNDLE=ON -DCREATE_PACKAGE=ON .. -# make -j 4 package + - name: ✋ Build + run: | + mkdir build + cd build + CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig":"$(brew --prefix)/lib/pkgconfig" cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCREATE_BUNDLE=ON -DCREATE_PACKAGE=ON .. + make -j 4 package -# - name: 📦 Upload DMG -# uses: actions/upload-artifact@v2 -# with: -# name: macOS DMG -# path: build/*.dmg + - name: 📦 Upload DMG + uses: actions/upload-artifact@v2 + with: + name: macOS DMG + path: build/*.dmg diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a2c0320b..7bc791408 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(PLUGINS # List extra magic databases to compile here set(MAGICDBS - nintendo_magic + magic_dbs/nintendo_magic ) createMagicDbList() diff --git a/README.md b/README.md index 8fd78abee..e69f11279 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,15 @@ For format patterns, includable libraries and magic files, check out the [ImHex- ## Nightly builds -See latest nightly builds on the artifacts result of the Build action [here](https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild). +Nightlies are available via GitHub Actions [here](https://github.com/WerWolv/ImHex/actions?query=workflow%3ABuild). -NOTE: **We currently only provide nightly builds for macOS (x86_64)** +- Windows • __x86_64__ + - [MSI Installer](https://nightly.link/WerWolv/ImHex/workflows/build/master/Windows%20Installer.zip) + - [Portable ZIP](https://nightly.link/WerWolv/ImHex/workflows/build/master/Windows%20Portable%20ZIP.zip) +- MacOS • __x86_64__ + - [DMG](https://nightly.link/WerWolv/ImHex/workflows/build/master/macOS%20DMG.zip) +- Linux • __x86_64__ + - [ELF](https://nightly.link/WerWolv/ImHex/workflows/build/master/Linux%20ELF.zip) ## Compiling diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 8e403139a..4b63a1797 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -37,10 +37,12 @@ macro(findLibraries) find_package(PkgConfig REQUIRED) pkg_search_module(CRYPTO libcrypto) - if(NOT CRYPTO_FOUND) find_library(CRYPTO crypto REQUIRED) + else() + set(CRYPTO_INCLUDE_DIRS ${CRYPTO_INCLUDEDIR}) endif() + pkg_search_module(CAPSTONE REQUIRED capstone) find_package(OpenGL REQUIRED) @@ -60,6 +62,8 @@ macro(findLibraries) pkg_search_module(MAGIC libmagic) if(NOT MAGIC_FOUND) find_library(MAGIC magic REQUIRED) + else() + set(MAGIC_INCLUDE_DIRS ${MAGIC_INCLUDEDIR}) endif() endmacro() diff --git a/include/helpers/disassembler.hpp b/include/helpers/disassembler.hpp index 0ff8b96bb..03f6a8bcd 100644 --- a/include/helpers/disassembler.hpp +++ b/include/helpers/disassembler.hpp @@ -1,6 +1,10 @@ #pragma once +#if __has_include() #include +#else +#include +#endif #include namespace hex { diff --git a/include/views/view_disassembler.hpp b/include/views/view_disassembler.hpp index 054082e63..8349e67c4 100644 --- a/include/views/view_disassembler.hpp +++ b/include/views/view_disassembler.hpp @@ -4,8 +4,6 @@ #include "helpers/disassembler.hpp" -#include - #include #include #include