11 Commits

Author SHA1 Message Date
Eric Kilmer
94bd12ac53
Fix peaddrconv example compilation failure (#158)
Add option to build examples with main CMake.

Build examples in CI now.

Add target alias with prefix for main pe-parse library.
2021-05-19 21:56:29 -04:00
William Woodruff
eb7d72a96f
README, examples: Fix lingering names 2020-09-25 15:51:25 -04:00
passthecilantro
a54ea62286
Rename libpe-parser-library -> libpe-parse (#138)
Co-authored-by: William Woodruff <william@yossarian.net>
2020-09-23 23:20:49 -04:00
William Woodruff
79a2333a8b
treewide: CI, cmake fixes (#132)
Massages the pe-parse build into a format that's more accomodating
for vcpkg, in preparation for imminent packaging.
2020-04-24 13:48:46 -04:00
William Woodruff
8736072cc1
pe-parser-library: Use WinAPI for UTF-16 to UTF-8 (#130)
* pe-parser-library: Use WinAPI for UTF-16 to UTF-8

If ICU isn't available and we're on C++17 or later, use
the Windows API for Unicode conversion instead of codecvt.
2020-04-14 10:20:16 -04:00
William Woodruff
14849a5e66
CMake: Set minimum to 3.12 (#117) 2020-03-27 11:50:36 -04:00
William Woodruff
a27dca9321
CMake: Set minimum to 3.11 (#116)
This was incorrectly set to 3.7, despite
add_compile_definitions appearing in 3.11.
2020-03-27 11:42:49 -04:00
William Woodruff
2c775e5d6a
Directory entry retrieval (#90)
* pe-parser-library: Directory entry extraction

Also runs clang-format on all library files.

* dump-pe: Refactor, clang-format

* pe-parser-library: Use enum for directory kinds

* travis: Refactor

* travis: Fixup stages

* travis: Fix matrix

* examples, pe-parser-library, pepy: clang-format

* travis: Use minimal for lint

* travis: Use find

* clang-format: Remove old option

* travis: More experimentation

* travis: Move addons

* travis: Remove coverity

* travis: Hackery

* travis: Move addons up

* .travis: clang-format-8

* examples: clang-format

* travis: Fix homebrew

* CONTRIBUTING: Add contrib guidelines

* travis: Build python ext, reenable coverity

Remove old build files.

* travis: Re-add coverity secret

* travis: Build with coverity in a separate dir
2019-10-21 09:00:54 -04:00
Jack Williams
11685390bb Fix Windows build and VS2017 compiler errors for example project (#70) 2018-09-05 19:03:59 +02:00
Tony Theodore
64989f688a CMake improvements, MinGW compatibility, shared libs support
* mingw-w64 fixes

  - `WIN32` is user-defined, `_WIN32` is pre-defined by toolchain[1]
  - use gcc options instead of MSVC
    - `-fPIC` is redundant on mingw
    - don't error on `old-style-cast`

[1] https://msdn.microsoft.com/en-us/library/b0084kay.aspx

* add option to build shared libs

* add option to disable command line tools

* ignore more Visual Studio files

* enable shared builds on MSVC (with cmake >= 3.4)

https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/

* fix old-style-cast warning
2018-03-27 14:52:05 +02:00
Alessandro Gario
b60b908fa2 Install public headers, add Arch package, build pepy under Travis and more (#57)
* CMake: Added install directives

* CMake: Added support for find_package(pe-parse)

* Fixed a compilation error on Linux

* CMake: Fix cmake module installation

* Added ArchLinux package

* Finished implementing the address converted example

* peaddrconv: Print the image base address.

* peaddrconv: Enable more warnings.

* Update travis to also build the examples

* Fix a compilation warning on Ubuntu 14.04

* Travis: Add macOS support.

* Better output for Travis, fix a compilation error on macOS.

* Travis: Do not build examples under macOS.

* Travis: Also compile the python module (pepy)

* Readme: Add a section to show how to use the library.

* Windows: Fix a compilation error, enable /analyze (see details).

The nt-headers.h include file is defining several constexpr values
using reserved (by windows.h) names.

These names (i.e.: IMAGE_FILE_MACHINE_UNKNOWN) are in fact macros
defined inside the Windows header files, and causes the preprocessor
to break definitions such as the following one:

constexpr std::uint16_t IMAGE_FILE_MACHINE_UNKNOWN = 0x0;

The fix (for now) consists in including the nt-headers.h file before
windows.h, but we should probably choose whether to use different
names or avoid defining those values (since they are inside the
system header anyway).
2017-11-25 16:01:53 -05:00