Skip to content

Commit

Permalink
V1.0 (#63)
Browse files Browse the repository at this point in the history
* v1.0 implementation

* progress
  • Loading branch information
PeterMatula committed Jun 15, 2020
1 parent 1eb6d61 commit 3503eb6
Show file tree
Hide file tree
Showing 45 changed files with 3,349 additions and 3,966 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.project
/build/
build-doc/
/.cproject
/.settings/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## dev

## v1.0 (June 15, 2020)

* Enhancement: RetDec JSON output's ASM to C mapping is used to make the plugin address-aware ([#49](https://github.com/avast/retdec-idaplugin/issues/49)).
* Enhancement: RetDec's JSON output is used for syntax highlighting ([#48](https://github.com/avast/retdec-idaplugin/issues/48)).
* Enhancement: The plugin is not a stand-alone package - i.e. a separate RetDec installation is not required ([#8](https://github.com/avast/retdec-idaplugin/issues/8)). There are no longer any external process launches ([#37](https://github.com/avast/retdec-idaplugin/issues/37), [#40](https://github.com/avast/retdec-idaplugin/issues/40), [#56](https://github.com/avast/retdec-idaplugin/issues/56), [#58](https://github.com/avast/retdec-idaplugin/issues/58), [#59](https://github.com/avast/retdec-idaplugin/issues/59), [#60](https://github.com/avast/retdec-idaplugin/issues/60)).
* Fix: Show the decompilation windows always next to a disassembly IDA view window ([#12](https://github.com/avast/retdec-idaplugin/issues/12)).
* Fix: Fixed the build of the plugin under IDA 7.4 ([#54](https://github.com/avast/retdec-idaplugin/pull/54)).

Expand Down
24 changes: 17 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.11)

project(retdec-idaplugin CXX C)
set(RELEASE_VERSION "0.9")
set(RELEASE_VERSION "1.0")

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Set the default build type to 'Release'
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -78,7 +80,7 @@ add_subdirectory(src)
if(RETDEC_IDAPLUGIN_DOC)
set(RELEASE_DIR_NAME "retdec-idaplugin")
set(RELEASE_DIR "${CMAKE_CURRENT_BINARY_DIR}/${RELEASE_DIR_NAME}")
set(RELEASE_LICENSE_DIR "${RELEASE_DIR}/license")
set(RELEASE_RESOURCES_DIR "${RELEASE_DIR}/retdec")
if(MSVC) # Windows
set(RELEASE_OS_NAME "windows")
elseif(APPLE) # macOS
Expand All @@ -88,13 +90,21 @@ if(RETDEC_IDAPLUGIN_DOC)
endif()
add_custom_target(release
DEPENDS user-guide idaplugin32 idaplugin64
# Create directory structure.
COMMAND ${CMAKE_COMMAND} -E make_directory "${RELEASE_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${RELEASE_LICENSE_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/LICENSE" "${RELEASE_LICENSE_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/LICENSE-THIRD-PARTY" "${RELEASE_LICENSE_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/doc/user_guide/user_guide.pdf" "${RELEASE_DIR}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${RELEASE_RESOURCES_DIR}"
# Copy plugins.
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:idaplugin32>" "${RELEASE_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:idaplugin64>" "${RELEASE_DIR}"
# Copy resources.
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/LICENSE" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/LICENSE-THIRD-PARTY" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/doc/user_guide/user_guide.pdf" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/src/idaplugin/decompiler-config.json" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${retdec_SOURCE_DIR}/support/ordinals" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${retdec_SOURCE_DIR}/support/yara_patterns" "${RELEASE_RESOURCES_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy "${retdec_SOURCE_DIR}/support/types" "${RELEASE_RESOURCES_DIR}"
# Create the archive.
COMMAND ${CMAKE_COMMAND} -E tar "cvf" "${CMAKE_CURRENT_BINARY_DIR}/${RELEASE_DIR_NAME}-v${RELEASE_VERSION}-${RELEASE_OS_NAME}.zip" --format=zip "${RELEASE_DIR}"
)
endif()
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Avast Software
Copyright (c) 2020 Avast Software

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal
Expand Down
67 changes: 3 additions & 64 deletions LICENSE-THIRD-PARTY
Original file line number Diff line number Diff line change
Expand Up @@ -5,79 +5,18 @@ In the event that we accidentally failed to list a required notice,
please bring it to our attention by contacting the repository owner.

RetDec idaplugin uses the following third-party libraries or other resources:
1) JsonCpp: https://github.com/open-source-parsers/jsoncpp
2) RetDec: https://github.com/avast/retdec
1) RetDec: https://github.com/avast/retdec

These third-party libraries or other resources are licensed under the
following licenses:

===============================================================================
1) JsonCpp
===============================================================================

The JsonCpp library's source code, including accompanying documentation,
tests and demonstration applications, are licensed under the following
conditions...

Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain.

In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
The JsonCpp Authors, and is released under the terms of the MIT License (see below).

In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose.

The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at:

http://en.wikipedia.org/wiki/MIT_License

The full text of the MIT License follows:

========================================================================
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
========================================================================
(END LICENSE TEXT)

The MIT license is compatible with both the GPL and commercial
software, affording one all of the rights of Public Domain with the
minor nuisance of being required to keep the above copyright notice
and license text in the source code. Note also that by accepting the
Public Domain "license" you can re-license your copy using whatever
license you like.

===============================================================================
2) RetDec
1) RetDec
===============================================================================

The MIT License (MIT)

Copyright (c) 2017 Avast Software
Copyright (c) 2020 Avast Software

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

RetDec plugin for IDA (Interactive Disassembler).

The plugin is compatible with the IDA 7.x versions.
The plugin does NOT work with IDA 6.x, or freeware version of IDA 7.0.
The plugin is compatible with the IDA 7.5+ versions.
The plugin does NOT work with IDA 6.x, IDA 7.0-7.4, or freeware version of IDA 7.0.
The plugin comes at both 32-bit and 64-bit address space variants (both are 64-bit binaries). I.e. it works in both `ida` and `ida64`.
At the moment, it can decompile the following architectures:
* 32-bit: Intel x86, ARM, MIPS, PIC32, and PowerPC.
* 64-bit: x86-64.
* 32-bit: x86, arm, mips, and powerpc.
* 64-bit: x86-64, arm64.

## Installation and Use

Expand All @@ -25,7 +25,7 @@ Currently, we officially support only Windows and Linux. It may be possible to b
* A compiler supporting C++17
* On Windows, only Microsoft Visual C++ is supported (version >= Visual Studio 2017).
* CMake (version >= 3.6)
* IDA SDK (version == 7.0)
* IDA SDK (version == 7.5)

### Process

Expand All @@ -36,22 +36,22 @@ Currently, we officially support only Windows and Linux. It may be possible to b
* `mkdir build && cd build`
* `cmake .. -DIDA_SDK_DIR=<path>`
* `make`
* `make install` (if `IDA_PATH` was set, see below)
* `make install` (if `IDA_DIR` was set, see below)
* Windows:
* Open a command prompt (e.g. `C:\msys64\msys2_shell.cmd` from [MSYS2](https://github.com/avast/retdec/wiki/Windows-Environment))
* `cd retdec-idaplugin`
* `mkdir build && cd build`
* `cmake .. -DIDA_SDK_DIR=<path> -G<generator>`
* `cmake --build . --config Release -- -m`
* `cmake --build . --config Release --target install` (if `IDA_PATH` was set, see below)
* `cmake --build . --config Release --target install` (if `IDA_DIR` was set, see below)
* Alternatively, you can open `retdec-idaplugin.sln` generated by `cmake` in Visual Studio IDE.

You must pass the following parameters to `cmake`:
* `-DIDA_SDK_DIR=</path/to/idasdk>` to tell `cmake` where the IDA SDK directory is located.
* (Windows only) `-G<generator>` is `-G"Visual Studio 15 2017 Win64"` for 64-bit build using Visual Studio 2017. Later versions of Visual Studio may be used. Only 64-bit build is supported.

You can pass the following additional parameters to `cmake`:
* `-DIDA_PATH=</path/to/ida>` to tell `cmake` where to install the plugin. If specified, installation will copy plugin binaries into `IDA_PATH/plugins`, and content of `scripts/idc` directory into `IDA_PATH/idc`. If not set, installation step does nothing.
* `-DIDA_DIR=</path/to/ida>` to tell `cmake` where to install the plugin. If specified, installation will copy plugin binaries into `IDA_DIR/plugins`, and content of `scripts/idc` directory into `IDA_DIR/idc`. If not set, installation step does nothing.
* `-DRETDEC_IDAPLUGIN_DOC=ON` to enable the `user-guide` target which generates the user guide document (disabled by default, the target needs to be explicitly invoked).

## User Guide
Expand All @@ -67,7 +67,7 @@ You can build your own guide by enabling and invoking the `user-guide` target:

## License

Copyright (c) 2017 Avast Software, licensed under the MIT license. See the `LICENSE` file for more details.
Copyright (c) 2020 Avast Software, licensed under the MIT license. See the `LICENSE` file for more details.

RetDec IDA plugin uses third-party libraries or other resources listed, along with their licenses, in the `LICENSE-THIRD-PARTY` file.

Expand Down
4 changes: 3 additions & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
add_subdirectory(jsoncpp)

add_subdirectory(retdec)

set(retdec_SOURCE_DIR ${retdec_SOURCE_DIR} PARENT_SCOPE)
54 changes: 0 additions & 54 deletions deps/jsoncpp/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 3503eb6

Please sign in to comment.