diff --git a/CHANGELOG b/CHANGELOG index 1b5e498..7da6217 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,18 +1,18 @@ -Inno Extract 1.3 (2012-07-03) - - Respect --quiet and --silent for multi-file installers - - Compile in C++11 mode if supported - - Warn about unsupported setup data versions - - Add support for Inno Setup 5.5.0 installers +innoextract 1.3 (2012-07-03) + - Fixed --quiet and --silent flags being ignored for some multi-file installers output + - Now compiles in C++11 mode if supported + - Added a warning when extracting unsupported setup data versions + - Added support for Inno Setup 5.5.0 installers -Inno Extract 1.2 (2012-04-01) - - Fix compile errors with older versions of Boost or GCC. - - Don't link against libraries that aren't actually needed. +innoextract 1.2 (2012-04-01) + - Fixed compile errors with older versions of Boost or GCC. + - Prevented linking against libraries that aren't actually needed. -Inno Extract 1.1 (2012-03-19) - - Support extracting files for a specific language. - - Fix a bug in the setup header parsing code. +innoextract 1.1 (2012-03-19) + - Added support to extract files for a specific language. + - Fixed a bug in the setup header parsing code. -Inno Extract 1.0 (2012-03-01) +innoextract 1.0 (2012-03-01) - Initial release. - Can list and extract files but not much more. diff --git a/CMakeLists.txt b/CMakeLists.txt index c6ac65f..a9aa781 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,9 +164,8 @@ include_directories(src ${CMAKE_CURRENT_BINARY_DIR}) configure_file("src/configure.hpp.in" "configure.hpp") -file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/cli") -set(VERSION_FILE "${CMAKE_BINARY_DIR}/cli/version.cpp") -version_file("src/cli/version.cpp.in" "${VERSION_FILE}" "VERSION" ".git") +set(VERSION_FILE "${CMAKE_BINARY_DIR}/version.cpp") +version_file("src/version.cpp.in" "${VERSION_FILE}" "VERSION" ".git") list(APPEND INNOEXTRACT_SOURCES "${VERSION_FILE}") add_executable(innoextract ${INNOEXTRACT_SOURCES} ${ALL_INCLUDES}) diff --git a/README.md b/README.md index 7082f26..b47b9b9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Inno Extract - A tool to unpack installers created by Inno Setup +# innoextract - A tool to unpack installers created by Inno Setup -[Inno Setup](http://www.jrsoftware.org/isinfo.php) is a tool to create installers for Microsoft Windows applications. Inno Extracts allows to extract such installers under non-windows systems without running the actual installer using wine. Inno Extract currently supports installers created by Inno Setup 1.2.10 to 5.5.2. +[Inno Setup](http://www.jrsoftware.org/isinfo.php) is a tool to create installers for Microsoft Windows applications. innoextract allows to extract such installers under non-windows systems without running the actual installer using wine. innoextract currently supports installers created by Inno Setup 1.2.10 to 5.5.2. -Inno Extract is available under the ZLIB license - see the LICENSE file. +innoextract is available under the ZLIB license - see the LICENSE file. See the website for [Linux packages](http://constexpr.org/innoextract/#packages). @@ -22,13 +22,13 @@ For Boost you will need the headers as well as the `iostreams`, `filesystem`, `d While the liblzma dependency is optional, it is highly recommended and you won't be able to extract most installers created by newer Inno Setup versions without it. -To build Inno Extract you will also need **CMake 2.8** and a working C++ compiler, as well as the development headers for liblzma and boost. +To build innoextract you will also need **CMake 2.8** and a working C++ compiler, as well as the development headers for liblzma and boost. -The website might have more [specific instructions for your linux distribution](http://constexpr.org/innoextract/install). +The website might have more [specific instructions for your Linux distribution](http://constexpr.org/innoextract/install). ## Compile and install -To compile Inno Extract, run: +To compile innoextract, run: $ mkdir -p build && cd build && cmake .. $ make @@ -41,7 +41,7 @@ Build options: * `USE_LZMA` (default: `ON`): Use *liblzma* if available. * `CMAKE_BUILD_TYPE` (default: `Release`): Set to `Debug` to enable debug output. -* `CMAKE_INSTALL_PREFIX` (default: `/usr/local` on UNIX): Where to install Inno Extract. +* `CMAKE_INSTALL_PREFIX` (default: `/usr/local` on UNIX): Where to install innoextract. * `DEBUG_EXTRA` (default: `OFF`): Expensive debug options * `MAN_DIR` (default: `share/man`): Install location for man pages (relative to prefix). @@ -63,13 +63,13 @@ Documentation is also available as a man page: ## Limitations -* Inno Extract currently only supports extracting all the data. There is no support for extracting individual files or components and limited support for extracting language-specific files. +* innoextract currently only supports extracting all the data. There is no support for extracting individual files or components and limited support for extracting language-specific files. * Included scripts and checks are not executed. * Data is always extracted to the current directory and the mapping from Inno Setup variables like the application directory to subdirectories is hard-coded. -* Inno Extract does not check if an installer includes multiple files with the same name and will continually overwrite the destination file when extracting. +* innoextract does not check if an installer includes multiple files with the same name and will continually overwrite the destination file when extracting. * Names for data files in multi-file installers must follow the standard naming scheme. diff --git a/VERSION b/VERSION index a14b1b2..0e0fcb7 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ -Inno Extract 1.3-git +innoextract 1.3-git Inno Setup 1.2.10 to 5.5.2 (C) 2011-2012 Daniel Scharrer diff --git a/doc/innoextract.1 b/doc/innoextract.1 index f374014..4ac8808 100644 --- a/doc/innoextract.1 +++ b/doc/innoextract.1 @@ -14,7 +14,7 @@ innoextract \- tool to extract installers created by Inno Setup is a tool that can extract installer executables created by Inno Setup. .PP .B innoextract -will extract files from a installers specified on the command line. +will extract files from installers specified on the command line. .PP To extract a multi-part installer with external data files, only the executable (.exe) file needs to be given as an argument to .B innoextract. diff --git a/src/cli/main.cpp b/src/cli/main.cpp index b9ab124..cb990d1 100644 --- a/src/cli/main.cpp +++ b/src/cli/main.cpp @@ -37,8 +37,9 @@ #include #include +#include "version.hpp" + #include "cli/debug.hpp" -#include "cli/version.hpp" #include "loader/offsets.hpp" diff --git a/src/stream/block.cpp b/src/stream/block.cpp index f1d64f8..7ba3b67 100644 --- a/src/stream/block.cpp +++ b/src/stream/block.cpp @@ -35,6 +35,7 @@ #include #include +#include "version.hpp" #include "crypto/crc32.hpp" #include "setup/version.hpp" #include "stream/lzma.hpp" @@ -198,7 +199,8 @@ block_reader::pointer block_reader::get(std::istream & base, const setup::versio #ifdef HAVE_LZMA case LZMA1: fis->push(inno_lzma1_decompressor(), 8192); break; #else - case LZMA1: throw block_error("LZMA decompression not supported by this Inno Extract build"); + case LZMA1: throw block_error("LZMA decompression not supported by this " + + std::string(innoextract_name) + " build"); #endif } diff --git a/src/stream/chunk.cpp b/src/stream/chunk.cpp index 3b3d3dc..9c69307 100644 --- a/src/stream/chunk.cpp +++ b/src/stream/chunk.cpp @@ -26,6 +26,7 @@ #include #include +#include "version.hpp" #include "stream/lzma.hpp" #include "stream/slice.hpp" #include "util/log.hpp" @@ -84,7 +85,8 @@ chunk_reader::pointer chunk_reader::get(slice_reader & base, const chunk & chunk case LZMA2: result->push(inno_lzma2_decompressor(), 8192); break; #else case LZMA1: case LZMA2: - throw chunk_error("LZMA decompression not supported by this Inno Extract build"); + throw chunk_error("LZMA decompression not supported by this " + + std::string(innoextract_name) + " build"); #endif default: throw chunk_error("unknown compression"); } diff --git a/src/util/console.cpp b/src/util/console.cpp index e69bab8..973739f 100644 --- a/src/util/console.cpp +++ b/src/util/console.cpp @@ -66,7 +66,7 @@ shell_command current = reset; void init(is_enabled color, is_enabled progress) { - bool is_tty = isatty(1) && isatty(2); + bool is_tty = isatty(1) && isatty(2); // TODO use HAVE_ISATTY show_progress = (progress == enable) || (progress == automatic && is_tty); diff --git a/src/cli/version.cpp.in b/src/version.cpp.in similarity index 83% rename from src/cli/version.cpp.in rename to src/version.cpp.in index 11f5f03..613a82e 100644 --- a/src/cli/version.cpp.in +++ b/src/version.cpp.in @@ -18,7 +18,7 @@ * 3. This notice may not be removed or altered from any source distribution. */ -#include "cli/version.hpp" +#include "version.hpp" /* * This file is automatically processed by cmake if the version or commit id changes. @@ -30,8 +30,10 @@ #error "Configure error - the VERSION file should specify exactly three lines!" #endif -const std::string innoextract_version = "${BASE_VERSION_0}${GIT_SUFFIX_5}"; +const char innoextract_name[] = "${BASE_NAME_0}"; -const std::string innosetup_versions = "${BASE_VERSION_1}"; +const char innoextract_version[] = "${BASE_VERSION_0}${GIT_SUFFIX_5}"; -const std::string innoextract_copyright = "${BASE_VERSION_2}"; +const char innosetup_versions[] = "${BASE_VERSION_1}"; + +const char innoextract_copyright[] = "${BASE_VERSION_2}"; diff --git a/src/cli/version.hpp b/src/version.hpp similarity index 85% rename from src/cli/version.hpp rename to src/version.hpp index f81566e..1383de6 100644 --- a/src/cli/version.hpp +++ b/src/version.hpp @@ -21,15 +21,16 @@ #ifndef INNOEXTRACT_VERSION_HPP #define INNOEXTRACT_VERSION_HPP -#include +//! Name of the program being built +extern const char innoextract_name[]; //! Name + version of the program being built -extern const std::string innoextract_version; +extern const char innoextract_version[]; //! Range of supported Inno Setup versions -extern const std::string innosetup_versions; +extern const char innosetup_versions[]; //! Copyright line for the current program -extern const std::string innoextract_copyright; +extern const char innoextract_copyright[]; #endif // INNOEXTRACT_VERSION_HPP