Giter Club home page Giter Club logo

innoextract's People

Contributors

a-detiste avatar dscharrer avatar iglu47 avatar undef21 avatar yepoleb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

innoextract's Issues

Extract embedded license information from the setup file

Same goes for additional info text.

Or maybe add an option to print the value of any variable available to Inno Setup scripts (if the license even is available there)?

innounp has this option:

-m     process internal embedded files (such as license and uninstall.exe)

ubuntu 15.10 / GCC 5.2 fix

  • default packaged version (apt-get install innoextract) does not work because of boost linker errors
  • compile from source does not work because you need to add this line to CMakeLists.txt:
    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
    this can be a problem of my setup, but in any case, it can help someone

Cmake configure error on windows.

Hello.
I'm trying to compile innoextract on windows i tried both without cygwin and with cygwin
(with dependencies installed from the installer)
But both fail with the same error:

Luckcolors@Luckcolors-PC ~/innoextract
$ mkdir -p build && cd build && cmake ..
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found PythonInterp: D:/cygwin64/bin/python (found version "1.4")
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindPackageH
andleStandardArgs.cmake:138 (message):
Could NOT find LZMA (missing: LZMA_LIBRARY LZMA_INCLUDE_DIR)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindPackageHandleStandard
Args.cmake:374 (_FPHSA_FAILURE_MESSAGE)
cmake/FindLZMA.cmake:74 (find_package_handle_standard_args)
CMakeLists.txt:102 (find_package)

-- Configuring incomplete, errors occurred!
See also "D:/cygwin64/home/Luckcolors/innoextract/build/CMakeFiles/CMakeOutput.l
og".

Don't extract temporary files by default

Need to check first if any scripts using innoextract rely on them being there.

Either way, there should be an option to (not) extract them if you really (don't) want them.

Related to #12

Build fails if path contains an invalid regex expression

This is the error I get:

RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at cmake/CreateSourceGroups.cmake:7 (string):
  string sub-command REGEX, mode REPLACE failed to compile regex
  "/home/gabriel/Code/c++/innoextract".
Call Stack (most recent call first):
  CMakeLists.txt:395 (create_source_groups)

The problem seems to be the c++ folder. The pluses get interpreted as quantifiers and break the regex compiler.

Improve handling of constants (variables) in filenames

Currently we replace constants with their names and parameters. This is a sensible default for most constants - although an --install option that uses proper default/user supplied values could be useful.

However, this produces ugly results for some special constants:

  • environment variables: {%NAME|DefaultValue}
  • ini values: {ini:Filename,Section,Key|DefaultValue}
  • custom messages: {cm:MessageName}, {cm:MessageName,Arguments}
  • registry keys: {reg:HKxx\SubkeyName,ValueName|DefaultValue}
  • command-line parameters: {param:ParamName|DefaultValue}
  • built-in functions: {drive:Path}
  • user code: {code:FunctionName|Param}

Here, using the referenced or default value would be a better approach. The only real problem is user code - adding complete support for that may be out of the scope of this project. However, at least the GOG.com installers for DOSBox-based games use this, so some support is a good idea.

Additionally, we need to handle percent-encoded characters in constants/constant names.

Inno Setup constants are documented here and here.

Note: the constants are not only used in filenames - for example the "program name" in recent installers for Inno Setup itself uses something like "{cm:NameAndVersion,Inno Setup,5.1.10}" - that needs to be expanded as well.

Cannot build on CentOS

I'm use centos 6. Boost has version 1.41 and name like libboost_system-mt.so. But linker need libboost_system-mt**-shared**.so. When make i symlink,

ln -s /usr/lib/libboost_system-mt.so /usr/lib/libboost_system-mt-shared.so

then make don`t work

make
...
make[2]: *** No rule to make target `/usr/lib/lib/libboost_iostreams-mt.so.5', needed by `innoextract'.  Stop.
make[1]: *** [CMakeFiles/innoextract.dir/all] Error 2
make: *** [all] Error 2

😵

not a supported Inno Setup installer Done with 1 errors.

I'm having this issue with innoextract, I'm following this tutorial: https://www.youtube.com/watch?v=gpu70RvNRyQ

Already downloaded that setup_ut_goty.exe file, but doesn't seem to work, it keeps giving me that error message.

BTW my innoxtract -v throws version 1.2 (Maybe outdated?)

Is there a way I can find out if this file was packed using innoextract?

The stup was downloaded from this link: (LINK REMOVED)

Thanks in advance!

PS = I'm on a Debian x86 Wheezy 7.6

innoextract fails to build on OSX (again)

I tried building innoextract on OSX after installing all necessary dependencies with macports but ran into the same problem as other people have been running into before:

Linking CXX executable innoextract
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      to_utf8(std::string const&, std::string&, unsigned int) in load.cpp.o
  "_libiconv_open", referenced from:
      to_utf8(std::string const&, std::string&, unsigned int) in load.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [innoextract] Error 1
make[1]: *** [CMakeFiles/innoextract.dir/all] Error 2
make: *** [all] Error 2

The problem is that OSX already installed its own version of libiconv in /usr/lib/libiconv.dylib in which the symbols are actually _iconv and _iconv_open (without lib) and innoextract tries to link to that version.

I worked around the problem with a simple set(iconv_LIBRARIES /opt/local/lib/libiconv.dylib) at the end of Findiconv.cmake to pick up the macports version instead, but that is of course a very nasty solution.

Improve handling of duplicate files

Inno Setup installers can contain multiple files with the same name (for different languages/setup options/...).

Currently they are all extracted to the same location, each file overwriting the previous one. The only option to get a specific variant is the --language option.

innounp has the following option:

-a     process all copies of duplicate files

We should also have something like that and then automatically give the files unique names (maybe like "filename@en", "filename@de", ...?)

Something like --overwrite=ask|rename|clobber where clobber is the current behavior and rename is the proposed one (maybe the future default).

One concern is how this would interact when selecting specific components/languages/...: it's not really intuitive when extracting only component a gives file "file" but extracting all components only gives "file@a", "file@b", ....

fails to build with cmake 3.5rc

/builddir/build/BUILD/innoextract-1.5/release.cpp
/builddir/build/BUILD/innoextract-1.5/release.cpp:31:6: error: operator '!=' has no left operand
 #if  != 5
      ^~
/builddir/build/BUILD/innoextract-1.5/release.cpp:35:6: error: operator '<' has no left operand
 #if  < 3
      ^
CMakeFiles/innoextract.dir/build.make:1105: recipe for target 'CMakeFiles/innoextract.dir/release.cpp.o' failed

https://apps.fedoraproject.org/koschei/package/innoextract

Add options to extract only some files/components/...

Currently we only have --language (which should be extended to accept a list!).

Users should be able to limit th files to be extracted should by

  1. Filenames(+path) (--include/--exclude chains like with e.g. rsync)
  2. Raw, unprocessed filenames as they appear in innoextract --list --dump output
  3. Components defined in the setup file
  4. Languages defined in the setup file
  5. Tasks specified in the setup file
  6. Files can have "checks" - scripts that determine if the file gets extracted. For now we completely ignore them.

Additionally:

  • There should be some form of pattern matching for all of this (simple glob expressions might be enough)
  • All of this should also be possible to do with an include/exclude file
  • The order of the include statements will have to be important - boost::program_options doesn't allow this, but I want to replace that anyway
  • How should users specify to extract only a single component/file/language no matter what others there are --exclude * --include a (or in rsync order: --include a --exclude *) seems a bit akward.
  • How should includes/excludes for e.g. files interact with e.g. components?
    If component c has file f, should --exclude-component c --include f extract the file? Should the order matter?
  • Most files won't specify any language/component/task -- should these be excluded with --exclude-component *? Currently --language doesn't affect them.

This is all probably over-engineering the problem but I don't want whatever is implemented now to at least to allow adding all these points in the future without breaking the command-line interface.

Do more than just extract files

For one, there are also different kinds of entries that should be extracted:

  • enhancement #13: Handle directory entries
  • enhancement #18: Extract registry keys set by the installer
  • enhancement #19: Extract .ini entries set by the installer
  • enhancement #20: "Extract" shortcut icons created by the installer
  • enhancement #21: Extract embedded license information from the setup file
  • enhancement #104: Extract setup executable icon
  • enhancement #105: Extract setup wizard images
  • enhancement #106: Extract compiled PascalScript code
  • enhancement #107: Disassemble embedded PascalScript code
  • enhancement #65: Reconstruct Inno Setup script (.iss) file

Besides, there have been requests to access/use the embedded scripts (stored as compiled bytecode).

First, we might want a rudimentary interpreter for the scripts. This is needed because scripts can be used to compute filenames. But I don't have any intention of simulating a complete windows environment (at that point you may as well use Wine), so there will always be some limitations.

Further, the scripts may contain information useful to other tools calling innoextract. One approach would be to decompile the scripts like innounp does.

Cannot extract GOG's "Quake: The Offering" with 1.6

➜ innoextract setup_quake_the_offering_2.0.0.6.exe
Extracting "Quake - The Offering" - setup data version 5.5.0 (unicode)
 - "app/__support/app/hipnotic/config.cfg" (2.02 KiB) - overwritten
 - "app/__support/app/id1/config.cfg" (2 KiB) - overwritten
 - "app/__support/app/qw/config.cfg" (1.76 KiB) - overwritten
 - "app/__support/app/rogue/CONFIG.CFG" (2 KiB) - overwritten
 - "app/dosbox_quake.conf" (10.6 KiB) - overwritten
 - "app/dosbox_quake_single.conf" (1.04 KiB) - overwritten
 - "app/hipnotic/config.cfg" (2.02 KiB) - overwritten
 - "app/id1/config.cfg" (2 KiB) - overwritten
 - "app/qw/config.cfg" (1.76 KiB) - overwritten
 - "app/rogue/CONFIG.CFG" (2 KiB) - overwritten
 - "tmp/gog.ico" [temp] (67.6 KiB) - overwritten
Could not create directory "app/Id1/glquake"
Done with 1 error.

Extracting it into a ciopfs-mounted directory does work, and the installer has both "Id1" and "id1" directories, so this is likely a case sensitivity issue.

Passing "--collisions=overwrite" does not seem to make a difference.

Instructions for OS X

Just a few notes that would be nice to include in the README for OSX peeps:

  • Install XCode and commandline tools from http://developer.apple.com

  • Install homebrew

    ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
    
  • Install boost and xz

    brew update
    brew install boost
    brew install xz
    
  • Install innoextract

    mkdir -p build && cd build && cmake ..
    make
    sudo make install
    

Add a --no-checksum option

For improved efficiency or to deal with broken installers.

Also, we should probably delete the broken and partial file(s) when checksums fail without this option.

Converting string to UTF-8 on OS X

Not sure if it is a bug. But UTF-16 to UTF-8 string conversion of string with cyrillic symbols worked for only after I changed oss << "UTF-16"; to oss << "UTF-16LE"; on line 47 in load.cpp

Get rid of libiconv dependency on Windows

As it targets Windows, Inno Setup installers already use codepage numbers to identify encodings, so the MultiByteToWideChar and WideCharToMultiByte are a good fit. Removing the libiconv dependency could significantly reduce the binary size.

However, innoextract uses UTF-8 internally - so we probably need to do conversions: $codepage -> UTF-16 -> UTF-8

Handle directory entries

Inno Setup supports empty directories by explicitly specifying them as directory entries (normally, directories are only implied by files) - we should handle those.

OSX: "Segmentation fault: 11"

Running OSX 10.11.3, with innoextract installed via Homebrew. Attempting to use it to extract the RollerCoaster Tycoon 2 installer from GOG (setup_rollercoaster_tycoon2_2.0.0.6.exe) results in "Segmentation fault: 11".

EDIT: Works fine when built from source, appears to be a Homebrew-related issue

Fix progress bar display issues in some rare cases (sandbox)

We don't check the ioctl(TIOCGWINSZ) return, but this may fail when the program is not running under an actual terminal (for example in a sandbox) - there are already checks for output redirection and the progress bar is disabled in that case.

Additionally, we should listen for the SIGWINCH signal instead of checking the console width for each progress bar update.

Preserve file timestamps for extracted files

Inno Setup supports both normal timestamps and local times, we need an option to specify the timezone for the latter.

Also, I need to figure out the timestamp format used in really old (16-bit) Inno Setup installers.

innoextract crash: StackHash, 0xc0000005

innoextract 1.5

Files to extract:
http://www.surroundbyus.com/pub/audiomuxer/AudioMuxer_0.9.6.0_Update1_Setup.exe (Inno 5.5.6)
http://www.surroundbyus.com/pub/audiomuxer/AudioMuxer_0.9.5.4_Setup.exe (Inno 5.5.0)

Listing the files in the installer works, but testing or extracting fails:

>innoextract.exe -e -d c:\temp\audiomuxer AudioMuxer_0.9.5.4_Setup.exe"
Extracting "AudioMuxer 0.9.5.4" - setup data version 5.5.0
 - "tmp\isxdl.dll" [temp] (121 KiB)
 - "app\AudioMuxer.exe" (<e-009 MiB)
 - "app\AudioMuxer EULA.rtf" (E.NKe-008 KiB)
 - "userappdata\AudioMuxer\Eac3to\avcodec-54.dll" (=e-009 MiB)
 - "userappdata\AudioMuxer\Eac3to\avutil-52.dll" (175 KiB)
[===============>                                           ]  0.0%    27 MiB/s
>

Minidumps will be sent per mail.

Innoextract doesn't extract multiple install files

I tried to extract the GOG Installer for Divinity: Original Sin but innoextract just extracts the.exe file (I think), not the 3 .bin files that are part of the install. The files on GOG are:
setup_divinity_original_sin_2.5.0.11.exe
setup_divinity_original_sin_2.5.0.11-1.bin
setup_divinity_original_sin_2.5.0.11-2.bin
setup_divinity_original_sin_2.5.0.11-3.bin

It extracts a /tmp (files for the install shield) and /app (contains GameuxInstallHelper.dll Support.ico ) folder, but not all the game files.

InnoExtract crash

After command innoextract setup.exe
It's start extracting... But few files extract and it gotten force close.

setup data version: 5.5.0.1
setup.exe file size: 90MB+
screenshot_00059_20h24m47s

crashes instantly on Win2k - no output

Application exception occurred:
App: (pid=420)
When: 3/17/2015 @ 10:15:16.622
Exception number: c000001d (illegal instruction)

----> System Information <----
Computer Name: AT-T9H55IF51C7J
User Name: Administrator
Number of Processors: 1
Processor Type: x86 Family 5 Model 8 Stepping 12
Windows 2000 Version: 5.0
Current Build: 2195
Service Pack: 4
Current Type: Uniprocessor Free
Registered Organization: At Home
Registered Owner: Jason Mangiafico

----> Task List <----
0 Idle.exe
8 System.exe
140 smss.exe
168 csrss.exe
188 winlogon.exe
216 services.exe
228 lsass.exe
384 svchost.exe
408 spoolsv.exe
436 AcrylicService..exe
456 svchost.exe
476 hidserv.exe
500 stisvc.exe
536 WinMgmt.exe
676 Explorer.exe
836 popcorn.exe
860 taskmgr.exe
812 NOTEPAD.exe
580 cmd.exe
420 innoextract.exe
808 drwtsn32.exe
0 _Total.exe

(00400000 - 005E9000)
(77F80000 - 77FFC000)
(7C570000 - 7C624000)
(78000000 - 78045000)
(7CF30000 - 7D176000)
(77F40000 - 77F7D000)
(77E10000 - 77E6F000)
(7C2D0000 - 7C335000)
(77D30000 - 77D9F000)
(70A70000 - 70AD6000)
(71710000 - 71794000)

State Dump for Thread Id 0x224

eax=00400000 ebx=0022fe30 ecx=000f76e0 edx=00000000 esi=004012d5 edi=00000000
eip=004e5358 esp=0022fdb8 ebp=00400178 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000202

function:
004e5335 83c404 add esp,0x4
004e5338 5b pop ebx
004e5339 c3 ret
004e533a 8db600000000 lea esi,[esi] ds:004012d5=000f6f03
004e5340 83ec04 sub esp,0x4
004e5343 c7042400004000 mov dword ptr [esp],0x400000 ss:0022fdb8=00400000
004e534a e811feffff call 004e5160
004e534f 31d2 xor edx,edx
004e5351 85c0 test eax,eax
004e5353 b800004000 mov eax,0x400000
FAULT ->004e5358 0f45 ???
004e535a d083c40489d0 rol byte ptr [ebx+0xd08904c4],1 ds:d0ac02f4=??
004e5360 c3 ret
004e5361 eb1d jmp 004ee380
004e5363 90 nop
004e5364 90 nop
004e5365 90 nop
004e5366 90 nop
004e5367 90 nop
004e5368 90 nop
004e5369 90 nop
004e536a 90 nop

----> Stack Back Trace <----

FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
00400178 00000074 000F66E0 00001000 000F6800 00000400 !

----> Raw Stack Dump <----
0022fdb8 00 00 40 00 56 48 4e 00 - d5 12 40 00 00 00 00 00 [email protected]...@.....
0022fdc8 23 00 00 00 00 00 00 00 - 00 00 00 00 00 f0 fd 7f #...............
0022fdd8 bc fe 22 00 04 00 00 00 - 00 15 40 00 20 24 3f 00 ..".......@. $?.
0022fde8 68 01 3f 00 00 00 00 00 - 09 00 00 00 0a 00 00 00 h.?.............
0022fdf8 00 00 40 00 00 00 10 00 - 68 24 3f 00 c0 27 3f 00 [email protected]$?..'?.
0022fe08 18 05 3f 00 20 d8 5d 00 - 20 00 00 00 d5 12 00 00 ..?. .]. .......
0022fe18 f8 fe 22 00 99 4c 4e 00 - 03 00 00 00 64 fe 22 00 .."..LN.....d.".
0022fe28 64 7e fb 77 50 16 f8 77 - 00 00 00 00 74 fe 22 00 d~.wP..w....t.".
0022fe38 78 01 40 00 00 00 3f 00 - 00 00 00 00 40 00 00 00 x.@...?.....@...
0022fe48 58 2b 23 00 38 07 04 78 - 00 00 00 00 25 6d f9 77 X+#.8..x....%m.w
0022fe58 00 00 23 00 00 00 00 00 - c8 1f 23 00 e0 ff 22 00 ..#.......#...".
0022fe68 6a bd 00 78 50 22 03 78 - ff ff ff ff b8 fe 22 00 j..xP".x......".
0022fe78 cf 14 00 78 31 00 00 00 - 58 2b 23 00 70 00 00 00 ...x1...X+#.p...
0022fe88 00 00 00 00 56 4a 4e 00 - 3d 81 00 78 01 00 00 00 ....VJN.=..x....
0022fe98 30 24 3f 00 34 24 3f 00 - b4 fe 22 00 00 00 00 00 0$?.4$?...".....
0022fea8 40 07 4f 00 04 70 5e 00 - 25 00 00 00 03 00 00 00 @.O..p^.%.......
0022feb8 c0 fe 22 00 67 f4 0e 00 - c0 ff 22 00 5a 10 40 00 ..".g.....".Z.@.
0022fec8 04 e0 5d 00 08 e0 5d 00 - 0c e0 5d 00 00 00 00 00 ..]...]...].....
0022fed8 18 e0 5d 00 ef cb 44 80 - 00 f0 83 00 00 00 00 00 ..]...D.........
0022fee8 00 00 00 00 00 00 00 00 - fc b5 57 7c c1 a2 59 7c ..........W|..Y|

warning when building on armhf

This doesn't happen when building on amd64

/home/pi/innoextract/src/util/endian.hpp: In function ‘uint16_t util::detail::byteswap(uint16_t)’:
/home/pi/innoextract/src/util/endian.hpp:59:9: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Wsign-conversion]
  return bswap_16(value);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.