dscharrer / innoextract Goto Github PK
View Code? Open in Web Editor NEWA tool to unpack installers created by Inno Setup
Home Page: https://constexpr.org/innoextract/
License: Other
A tool to unpack installers created by Inno Setup
Home Page: https://constexpr.org/innoextract/
License: Other
When I tried to unpack my package i found message: "not a supported Inno Setup installer"
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)
Unless someone provides me with an encrypted installer, this will be low priority. Its here mostly for completeness.
That information could be useful to normal users as well.
Additionally, maybe there should be an --info option that formats this information in a nicer way?
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".
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
-p<n>
, just like with patch
Most users don't care about the app
folder and would rather have the files directly.
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.
Might allow the OS better allocate the space for large files, mostly when there are multiple concurrent/interleaved writes (ie: with #14).
To allow extract broken installers, possibly in conjunction with the --no-checksum option (enhancement #28).
Right now InnoExtract seems to be a classic single threaded program that could be speeded up a lot by using multiple cores.
then how to put it back again? in one piece ?
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:
{%NAME|DefaultValue}
{ini:Filename,Section,Key|DefaultValue}
{cm:MessageName}
, {cm:MessageName,Arguments}
{reg:HKxx\SubkeyName,ValueName|DefaultValue}
{param:ParamName|DefaultValue}
{drive:Path}
{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.
Currently everything gets dumped to the working directory
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
😵
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
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.
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", ....
... and quit immediately, printing only the Inno Setup data version.
I propose
--flatten
There should be an option to write them to Wine/Windows-compatible .reg files.
What to do with values/keys removed by the installer?
/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
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
innoextract --list --dump
outputAdditionally:
--exclude * --include a
(or in rsync order: --include a --exclude *
) seems a bit akward.--exclude-component c --include f
extract the file? Should the order matter?--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.
For one, there are also different kinds of entries that should be extracted:
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.
It's overkill and not powerful enough at the same time
➜ 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.
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
There should be an option to write them to .lnk or .desktop files. Or maybe just list them?
Currently we just print "not a supported Inno Setup installer", which is just confusing.
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.
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
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
Already there for some files.
Inno Setup supports empty directories by explicitly specifying them as directory entries (normally, directories are only implied by files) - we should handle those.
It's not really important, but could be useful for compatibility with innounp, which has
-n don't attempt to unpack new versions
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
There should be an option to write them to .ini files.
What to do with entries removed by the installer?
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.
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 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.
Or with slices in different locations.
Having both an interactive move (ask user for filenames of missing slices as they are needed) and a batch mode (slice filenames specified on the command-line) would be best.
Maybe just adding a boost::path::imbue() call and setting the c/c++ locales will be enough?
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.
http://freearc.org/InnoSetup.aspx
I'd gladaly even link the alleged faulty setup, but it's a 4GB torrent.
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|
vapoursynth-r28.exe is found on https://github.com/vapoursynth/vapoursynth/releases
innoextract.exe vapoursynth-r28.exe
Extracting "VapourSynth R28" - setup data version 5.5.6 (unicode)
- "sys\vsvfw.dll" (0.01e-009 KiB) - overwritten
- "sys\vsscript.dll" (1.Fe-009 KiB) - overwritten
- "app\plugins32\"
- "app\plugins64\"
Could not create directory "code:GetPythonPath32"
Done with 1 error.
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);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.