remove opsi and change to 7z create

This commit is contained in:
Mario Fetka
2013-09-09 05:06:01 +02:00
parent 019b384e8a
commit df3c29f0d9
225 changed files with 1886 additions and 14815 deletions

BIN
libexec/ShowVer.exe Normal file

Binary file not shown.

531
libexec/ShowVer/ShowVer.cpp Normal file
View File

@@ -0,0 +1,531 @@
/*
* File: ShowVer.cpp
* Version: 1.0, 2002-6-4
* Purpose: console program to display file VERSIONINFO text
* Copyright (c) 2002 by Ted Peck <tpeck@roundwave.com>
* Permission is given by the author to freely redistribute and include
* this code in any program as long as this credit is given where due.
*
* THIS CODE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY
* OF ANY KIND, EITHER EXPRESSED OR IMPLIED. IN PARTICULAR, NO WARRANTY IS MADE
* THAT THE CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
* OR NON-INFRINGING. IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY COSTS OR DAMAGES
* ARISING FROM ANY USE OF THIS CODE. NO USE OF THIS CODE IS AUTHORIZED EXCEPT UNDER
* THIS DISCLAIMER.
*
* Use at your own risk!
*/
// ----------------------------------------------------------------------------
#include <stdio.h>
#include <malloc.h>
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
typedef unsigned char byte;
#ifndef _DEBUG
# define ASSERT(s)
#else
# include <CRTDbg.h> // for _ASSERTE()
# define ASSERT _ASSERTE
#endif
#define HDUMP 0
// ----------------------------------------------------------------------------
#if HDUMP
#define CHARPRINT(a) \
{ unsigned char tchar; \
switch (a) { \
case 0x0D: /* CR */ \
tchar = 0x11; \
break; \
case 0x0A: /* LF */ \
tchar = 0x19; \
break; \
case 0x07: /* BEL */ \
tchar = 0x0F; \
break; \
case '\t': /* TAB */ \
tchar = 0x1D; \
break; \
case '\0': /* NUL */ \
tchar = 0xF8; \
break; \
case 0x08: /* BACKTAB? */ \
tchar = 0xAE; \
break; \
case 0x1A: /* BACKTAB? */ \
tchar = 0xAE; \
break; \
case 0x1B: /* BACKSPACE */ \
tchar = 0xAE; \
break; \
case ' ': /* SPACE */ \
tchar = 0xC4; \
break; \
default: \
tchar = buf[i]; \
break; \
} \
printf ("%c", tchar); \
}
// ----------------------------------------------------------------------------
int hdump(byte* pBuf, size_t size, size_t start, size_t len)
{
int ch;
int i, firsti, lasti, tlasti;
unsigned char buf[16];
unsigned long offs, end;
firsti = (int)(start & 0xFL);
offs = start & ~0xFL;
byte* pEnd = pBuf+size;
if (pBuf == NULL) {
return 0;
}
end = (len!=0) ? start+len : ~len;
lasti = 16;
tlasti = 8;
for ( ; offs < end; offs += 16) {
unsigned long rmdr = end - offs;
if (rmdr < 16) {
lasti = rmdr;
if (rmdr < 8) {
tlasti = rmdr;
}
}
for (i = firsti; i < lasti; i++) {
ch = (pBuf < pEnd) ? *(pBuf++) : EOF;
buf[i] = (unsigned char) ch;
if (ch == EOF) {
lasti = i;
if (i < 8) tlasti = i;
break;
}
}
/* Print address */
printf("% 8lx: ", offs);
/* Print 2 groups of 8 chars in hex format */
for (i = 0; i < firsti && i < 8; i++) {
printf(" "); // only could happen first time around
}
for ( ; i < tlasti; i++) {
printf("%2.2x ", buf[i]);
}
for ( ; i < 8; i++) {
printf(" ");
}
printf(" ");
for ( ; i < firsti; i++) {
printf(" "); // only could happen first time around
}
for ( ; i < lasti; i++) {
printf("%2.2x ", (unsigned) buf[i]);
}
for ( ; i < 16; i++) {
printf(" ");
}
printf("| ");
/* Print 2 groups of 8 chars in char format */
for (i = 0; i < firsti && i < 8; i++) {
printf(" ");
}
for ( ; i < tlasti; i++) {
CHARPRINT(buf[i])
}
for ( ; i < 8; i++) {
printf(" ");
}
printf(" ");
for ( ; i < firsti; i++) {
printf(" ");
}
for ( ; i < lasti; i++) {
CHARPRINT(buf[i])
}
for ( ; i < 16; i++) {
printf(" ");
}
printf("\n");
if (ch == EOF) break;
firsti = 0;
}
return 1;
}
#endif // HDUMP
// ----------------------------------------------------------------------------
int usage()
{
printf("ShowVer <filename>\n");
return 0;
}
// ----------------------------------------------------------------------------
int error(wchar_t* sfnName)
{
DWORD dwErrCode = GetLastError();
wchar_t* sMsg;
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
dwErrCode,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(wchar_t*) &sMsg,
0,
NULL);
// Process any inserts in sMsg.
// ...
printf("Unable to access file \"%S\" : %S", sfnName, sMsg);
LocalFree(sMsg);
return 0;
}
// ----------------------------------------------------------------------------
/* ----- VS_VERSION.dwFileFlags ----- */
#define S_VS_FFI_SIGNATURE "VS_FFI_SIGNATURE"
#define S_VS_FFI_STRUCVERSION "VS_FFI_STRUCVERSION"
#define S_VS_FFI_FILEFLAGSMASK "VS_FFI_FILEFLAGSMASK"
/* ----- VS_VERSION.dwFileFlags ----- */
#define S_VS_FF_DEBUG "VS_FF_DEBUG"
#define S_VS_FF_PRERELEASE "VS_FF_PRERELEASE"
#define S_VS_FF_PATCHED "VS_FF_PATCHED"
#define S_VS_FF_PRIVATEBUILD "VS_FF_PRIVATEBUILD"
#define S_VS_FF_INFOINFERRED "VS_FF_INFOINFERRED"
#define S_VS_FF_SPECIALBUILD "VS_FF_SPECIALBUILD"
// ----------------------------------------------------------------------------
char* showFileFlags(DWORD dwFileFlags)
{
#define MAXFLAGSSTR 200
static char s[MAXFLAGSSTR];
int pos = 0;
s[pos] = '\0';
#define VS_FF_KNOWNFLAGS (VS_FF_DEBUG \
| VS_FF_PRERELEASE \
| VS_FF_PATCHED \
| VS_FF_PRIVATEBUILD \
| VS_FF_INFOINFERRED \
| VS_FF_SPECIALBUILD \
)
if (dwFileFlags & ~VS_FF_KNOWNFLAGS) pos += sprintf(&s[pos], "0x%x", dwFileFlags & ~VS_FF_KNOWNFLAGS);
if (dwFileFlags & VS_FF_DEBUG) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_DEBUG, sizeof(S_VS_FF_DEBUG)); pos += sizeof(S_VS_FF_DEBUG) - 1; }
if (dwFileFlags & VS_FF_PRERELEASE) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PRERELEASE, sizeof(S_VS_FF_PRERELEASE)); pos += sizeof(S_VS_FF_PRERELEASE) - 1; }
if (dwFileFlags & VS_FF_PATCHED) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PATCHED, sizeof(S_VS_FF_PATCHED)); pos += sizeof(S_VS_FF_PATCHED) - 1; }
if (dwFileFlags & VS_FF_PRIVATEBUILD) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_PRIVATEBUILD, sizeof(S_VS_FF_PRIVATEBUILD)); pos += sizeof(S_VS_FF_PRIVATEBUILD) - 1; }
if (dwFileFlags & VS_FF_INFOINFERRED) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_INFOINFERRED, sizeof(S_VS_FF_INFOINFERRED)); pos += sizeof(S_VS_FF_INFOINFERRED) - 1; }
if (dwFileFlags & VS_FF_SPECIALBUILD) { if (pos) { memcpy(&s[pos], " | ", 3); pos += 3; } ; memcpy(&s[pos], S_VS_FF_SPECIALBUILD, sizeof(S_VS_FF_SPECIALBUILD)); pos += sizeof(S_VS_FF_SPECIALBUILD) - 1; }
if (!pos) memcpy(s, "0", 2);
return s;
}
/* ----- VS_VERSION.dwFileOS ----- */
#define S_VOS_UNKNOWN "VOS_UNKNOWN"
#define S_VOS_DOS "VOS_DOS"
#define S_VOS_OS216 "VOS_OS216"
#define S_VOS_OS232 "VOS_OS232"
#define S_VOS_NT "VOS_NT"
#define S_VOS__BASE "VOS__BASE"
#define S_VOS__WINDOWS16 "VOS__WINDOWS16"
#define S_VOS__PM16 "VOS__PM16"
#define S_VOS__PM32 "VOS__PM32"
#define S_VOS__WINDOWS32 "VOS__WINDOWS32"
#define S_VOS_DOS_WINDOWS16 "VOS_DOS_WINDOWS16"
#define S_VOS_DOS_WINDOWS32 "VOS_DOS_WINDOWS32"
#define S_VOS_OS216_PM16 "VOS_OS216_PM16"
#define S_VOS_OS232_PM32 "VOS_OS232_PM32"
#define S_VOS_NT_WINDOWS32 "VOS_NT_WINDOWS32"
char* showFileOS(DWORD dwFileOS)
{
switch(dwFileOS) {
case VOS_UNKNOWN: return S_VOS_UNKNOWN;
case VOS_DOS: return S_VOS_DOS;
case VOS_OS216: return S_VOS_OS216;
case VOS_OS232: return S_VOS_OS232;
case VOS_NT: return S_VOS_NT;
// case VOS__BASE: return S_VOS__BASE;
case VOS__WINDOWS16:return S_VOS__WINDOWS16;
case VOS__PM16: return S_VOS__PM16;
case VOS__PM32: return S_VOS__PM32;
case VOS__WINDOWS32:return S_VOS__WINDOWS32;
case VOS_DOS_WINDOWS16: return S_VOS_DOS_WINDOWS16;
case VOS_DOS_WINDOWS32: return S_VOS_DOS_WINDOWS32;
case VOS_OS216_PM16: return S_VOS_OS216_PM16;
case VOS_OS232_PM32: return S_VOS_OS232_PM32;
case VOS_NT_WINDOWS32: return S_VOS_NT_WINDOWS32;
default: return "Unknown FileOS";
}
}
/* ----- VS_VERSION.dwFileType ----- */
#define S_VFT_UNKNOWN "VFT_UNKNOWN"
#define S_VFT_APP "VFT_APP"
#define S_VFT_DLL "VFT_DLL"
#define S_VFT_DRV "VFT_DRV"
#define S_VFT_FONT "VFT_FONT"
#define S_VFT_VXD "VFT_VXD"
#define S_VFT_STATIC_LIB "VFT_STATIC_LIB"
char* showFileType(DWORD dwFileType)
{
switch(dwFileType) {
case VFT_UNKNOWN: return S_VFT_UNKNOWN;
case VFT_APP: return S_VFT_APP;
case VFT_DLL: return S_VFT_DLL;
case VFT_DRV: return S_VFT_DRV;
case VFT_FONT: return S_VFT_FONT;
case VFT_VXD: return S_VFT_VXD;
case VFT_STATIC_LIB:return S_VFT_STATIC_LIB;
default: return "Unknown FileType";
}
}
/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */
#define S_VFT2_UNKNOWN "VFT2_UNKNOWN"
#define S_VFT2_DRV_PRINTER "VFT2_DRV_PRINTER"
#define S_VFT2_DRV_KEYBOARD "VFT2_DRV_KEYBOARD"
#define S_VFT2_DRV_LANGUAGE "VFT2_DRV_LANGUAGE"
#define S_VFT2_DRV_DISPLAY "VFT2_DRV_DISPLAY"
#define S_VFT2_DRV_MOUSE "VFT2_DRV_MOUSE"
#define S_VFT2_DRV_NETWORK "VFT2_DRV_NETWORK"
#define S_VFT2_DRV_SYSTEM "VFT2_DRV_SYSTEM"
#define S_VFT2_DRV_INSTALLABLE "VFT2_DRV_INSTALLABLE"
#define S_VFT2_DRV_SOUND "VFT2_DRV_SOUND"
#define S_VFT2_DRV_COMM "VFT2_DRV_COMM"
#define S_VFT2_DRV_INPUTMETHOD "VFT2_DRV_INPUTMETHOD"
/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */
#define S_VFT2_FONT_RASTER "VFT2_FONT_RASTER"
#define S_VFT2_FONT_VECTOR "VFT2_FONT_VECTOR"
#define S_VFT2_FONT_TRUETYPE "VFT2_FONT_TRUETYPE"
char* showFileSubtype(DWORD dwFileType, DWORD dwFileSubtype)
{
static char s[50];
switch(dwFileType) {
case VFT_DRV:
switch(dwFileSubtype) {
case VFT2_UNKNOWN: return "FileSubtype: " S_VFT2_UNKNOWN;
case VFT2_DRV_PRINTER: return "FileSubtype: " S_VFT2_DRV_PRINTER;
case VFT2_DRV_KEYBOARD: return "FileSubtype: " S_VFT2_DRV_KEYBOARD;
case VFT2_DRV_LANGUAGE: return "FileSubtype: " S_VFT2_DRV_LANGUAGE;
case VFT2_DRV_DISPLAY: return "FileSubtype: " S_VFT2_DRV_DISPLAY;
case VFT2_DRV_MOUSE: return "FileSubtype: " S_VFT2_DRV_MOUSE;
case VFT2_DRV_NETWORK: return "FileSubtype: " S_VFT2_DRV_NETWORK;
case VFT2_DRV_SYSTEM: return "FileSubtype: " S_VFT2_DRV_SYSTEM;
case VFT2_DRV_INSTALLABLE:return "FileSubtype: " S_VFT2_DRV_INSTALLABLE;
case VFT2_DRV_SOUND: return "FileSubtype: " S_VFT2_DRV_SOUND;
case VFT2_DRV_COMM: return "FileSubtype: " S_VFT2_DRV_COMM;
case VFT2_DRV_INPUTMETHOD:return "FileSubtype: " S_VFT2_DRV_INPUTMETHOD;
default: s[0] = '\0'; sprintf(s, "Unknown FileSubtype: %x", dwFileSubtype); return s;
}
break;
case VFT_FONT:
switch(dwFileSubtype) {
case VFT2_FONT_RASTER: return "FileSubtype: " S_VFT2_FONT_RASTER;
case VFT2_FONT_VECTOR: return "FileSubtype: " S_VFT2_FONT_VECTOR;
case VFT2_FONT_TRUETYPE:return "FileSubtype: " S_VFT2_FONT_TRUETYPE;
default: s[0] = '\0'; sprintf(s, "Unknown FileSubtype: %x", dwFileSubtype); return s;
}
break;
default: s[0] = '\0'; if (dwFileSubtype) sprintf(s, ", FileSubtype: %x", dwFileSubtype); return s;
}
}
// ----------------------------------------------------------------------------
void showFIXEDFILEINFO(VS_FIXEDFILEINFO* pValue)
{
ASSERT(VS_FFI_SIGNATURE == pValue->dwSignature);
ASSERT(VS_FFI_STRUCVERSION == pValue->dwStrucVersion);
// dump the VS_FIXEDFILEINFO numbers
printf(" Signature: %08x\n"
, pValue->dwSignature
// , (VS_FFI_SIGNATURE == pValue->dwSignature) ? "" : " (expected " S_VS_FFI_SIGNATURE
);
printf(" StrucVersion: %d.%d\n"
, pValue->dwStrucVersion >> 16, pValue->dwStrucVersion & 0xFFFF);
printf(" FileVersion: %d.%d.%d.%d\n"
, pValue->dwFileVersionMS >> 16, pValue->dwFileVersionMS & 0xFFFF
, pValue->dwFileVersionLS >> 16, pValue->dwFileVersionLS & 0xFFFF);
printf(" ProductVersion: %d.%d.%d.%d\n"
, pValue->dwProductVersionMS >> 16, pValue->dwProductVersionMS & 0xFFFF
, pValue->dwProductVersionLS >> 16, pValue->dwProductVersionLS & 0xFFFF);
printf(" FileFlagsMask: %s%x\n"
, pValue->dwFileFlagsMask ? "0x" : ""
, pValue->dwFileFlagsMask);
if (pValue->dwFileFlags)
printf(" FileFlags: 0x%x (%s)\n"
, pValue->dwFileFlags
, showFileFlags(pValue->dwFileFlags));
else
printf(" FileFlags: 0\n");
printf(" FileOS: %s\n"
, showFileOS(pValue->dwFileOS));
printf(" FileType: %s%s\n" //FileSubtype
, showFileType(pValue->dwFileType)
, showFileSubtype(pValue->dwFileType, pValue->dwFileSubtype));
printf(" FileDate: %x.%x\n"
, pValue->dwFileDateMS, pValue->dwFileDateLS);
}
// ----------------------------------------------------------------------------
struct VS_VERSIONINFO {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding1[1];
VS_FIXEDFILEINFO Value;
WORD Padding2[1];
WORD Children[1];
};
struct String {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding[1];
WORD Value[1];
};
struct StringTable {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding[1];
String Children[1];
};
struct StringFileInfo {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding[1];
StringTable Children[1];
};
struct Var {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding[1];
DWORD Value[1];
};
struct VarFileInfo {
WORD wLength;
WORD wValueLength;
WORD wType;
WCHAR szKey[1];
WORD Padding[1];
Var Children[1];
};
// ----------------------------------------------------------------------------
int showVer(void* pVer, DWORD size)
{
// Interpret the VS_VERSIONINFO header pseudo-struct
VS_VERSIONINFO* pVS = (VS_VERSIONINFO*)pVer;
#define roundoffs(a,b,r) (((byte*)(b) - (byte*)(a) + ((r)-1)) & ~((r)-1))
#define roundpos(b, a, r) (((byte*)(a))+roundoffs(a,b,r))
// byte* nEndRaw = roundpos((((byte*)pVer) + size), pVer, 4);
// byte* nEndNamed = roundpos((((byte*) pVS) + pVS->wLength), pVS, 4);
// ASSERT(nEndRaw == nEndNamed); // size reported from GetFileVersionInfoSize is much padded for some reason...
ASSERT(!wcscmp(pVS->szKey, L"VS_VERSION_INFO"));
printf(" (type:%d)\n", pVS->wType);
byte* pVt = (byte*) &pVS->szKey[wcslen(pVS->szKey)+1];
VS_FIXEDFILEINFO* pValue = (VS_FIXEDFILEINFO*) roundpos(pVt, pVS, 4);
if (pVS->wValueLength) {
showFIXEDFILEINFO(pValue); // Show the 'Value' element
}
// Iterate over the 'Children' elements of VS_VERSIONINFO (either StringFileInfo or VarFileInfo)
StringFileInfo* pSFI = (StringFileInfo*) roundpos(((byte*)pValue) + pVS->wValueLength, pValue, 4);
for ( ; ((byte*) pSFI) < (((byte*) pVS) + pVS->wLength); pSFI = (StringFileInfo*)roundpos((((byte*) pSFI) + pSFI->wLength), pSFI, 4)) { // StringFileInfo / VarFileInfo
if (!wcscmp(pSFI->szKey, L"StringFileInfo")) {
// The current child is a StringFileInfo element
ASSERT(1 == pSFI->wType);
ASSERT(!pSFI->wValueLength);
// Iterate through the StringTable elements of StringFileInfo
StringTable* pST = (StringTable*) roundpos(&pSFI->szKey[wcslen(pSFI->szKey)+1], pSFI, 4);
for ( ; ((byte*) pST) < (((byte*) pSFI) + pSFI->wLength); pST = (StringTable*)roundpos((((byte*) pST) + pST->wLength), pST, 4)) {
printf(" LangID: %S\n", pST->szKey);
ASSERT(!pST->wValueLength);
// Iterate through the String elements of StringTable
String* pS = (String*) roundpos(&pST->szKey[wcslen(pST->szKey)+1], pST, 4);
for ( ; ((byte*) pS) < (((byte*) pST) + pST->wLength); pS = (String*) roundpos((((byte*) pS) + pS->wLength), pS, 4)) {
wchar_t* psVal = (wchar_t*) roundpos(&pS->szKey[wcslen(pS->szKey)+1], pS, 4);
printf(" %-18S: %.*S\n", pS->szKey, pS->wValueLength, psVal); // print <sKey> : <sValue>
}
}
}
else {
// The current child is a VarFileInfo element
ASSERT(1 == pSFI->wType); // ?? it just seems to be this way...
VarFileInfo* pVFI = (VarFileInfo*) pSFI;
ASSERT(!wcscmp(pVFI->szKey, L"VarFileInfo"));
ASSERT(!pVFI->wValueLength);
// Iterate through the Var elements of VarFileInfo (there should be only one, but just in case...)
Var* pV = (Var*) roundpos(&pVFI->szKey[wcslen(pVFI->szKey)+1], pVFI, 4);
for ( ; ((byte*) pV) < (((byte*) pVFI) + pVFI->wLength); pV = (Var*)roundpos((((byte*) pV) + pV->wLength), pV, 4)) {
printf(" %S: ", pV->szKey);
// Iterate through the array of pairs of 16-bit language ID values that make up the standard 'Translation' VarFileInfo element.
WORD* pwV = (WORD*) roundpos(&pV->szKey[wcslen(pV->szKey)+1], pV, 4);
for (WORD* wpos = pwV ; ((byte*) wpos) < (((byte*) pwV) + pV->wValueLength); wpos+=2) {
printf("%04x%04x ", (int)*wpos++, (int)(*(wpos+1)));
}
printf("\n");
}
}
}
ASSERT((byte*) pSFI == roundpos((((byte*) pVS) + pVS->wLength), pVS, 4));
return pValue->dwFileVersionMS; // !!! return major version number
}
// ----------------------------------------------------------------------------
int wmain(int argc, wchar_t *argv[], wchar_t *envp[])
// Prints out the version info of the file named in argv[1], and returns the major version number as the exit code
{
if (argc <= 1) return usage();
wchar_t* sfnFile = argv[1];
DWORD dummy;
DWORD size = GetFileVersionInfoSizeW(sfnFile, &dummy);
if (!size) return error(sfnFile);
void* pVer = _alloca(size); memset(pVer, 0, size);
if (0 == GetFileVersionInfoW(sfnFile, 0, size, pVer)) return error(sfnFile);
#if HDUMP
printf("VERSIONINFO dump for file \"%S\":\n", sfnFile);
hdump((byte*) pVer, size, 0, 0);
#endif // HDUMP
printf("VERSIONINFO for file \"%S\": ", sfnFile);
return showVer(pVer, size);
}
// ----------------------------------------------------------------------------

112
libexec/ShowVer/ShowVer.dsp Normal file
View File

@@ -0,0 +1,112 @@
# Microsoft Developer Studio Project File - Name="ShowVer" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=ShowVer - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ShowVer.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ShowVer.mak" CFG="ShowVer - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ShowVer - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "ShowVer - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ShowVer - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 Version.lib /nologo /subsystem:console /machine:I386
!ELSEIF "$(CFG)" == "ShowVer - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 Version.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "ShowVer - Win32 Release"
# Name "ShowVer - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\ShowVer.cpp
# End Source File
# Begin Source File
SOURCE=.\ShowVer.rc
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# Begin Source File
SOURCE=.\ReadMe.txt
# End Source File
# End Target
# End Project

110
libexec/ShowVer/ShowVer.rc Normal file
View File

@@ -0,0 +1,110 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "AuthorName", "Ted Peck\0"
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "ShowVer console app for VersionInfo display\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "ShowVer\0"
VALUE "LegalCopyright", "Copyright <20> 2002\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "ShowVer.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "ShowVer\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

BIN
libexec/UnRAR.exe Normal file

Binary file not shown.

34
libexec/UnRAR/license.txt Normal file
View File

@@ -0,0 +1,34 @@
****** ***** ****** UnRAR - free utility for RAR archives
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
****** ******* ****** License for use and distribution of
** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** ** ** ** ** ** FREEWARE version
~~~~~~~~~~~~~~~~
The UnRAR utility is freeware. This means:
1. All copyrights to RAR and the utility UnRAR are exclusively
owned by the author - Alexander Roshal.
2. The UnRAR utility may be freely distributed. It is allowed
to distribute UnRAR inside of other software packages.
3. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED "AS IS".
NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT
YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING
OR MISUSING THIS SOFTWARE.
4. Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR
binary code may be used or reverse engineered to re-create the RAR
compression algorithm, which is proprietary, without written
permission of the author.
5. If you don't agree with terms of the license you must remove
UnRAR files from your storage devices and cease to use the
utility.
Thank you for your interest in RAR and UnRAR.
Alexander L. Roshal

View File

@@ -1,92 +0,0 @@
#!/usr/bin/ruby
require 'erb'
# Determines package name from the origin url on github. It's hackish, but it
# works (mostly).
def pkgname
# originurl = `basename $(git config --get remote.origin.url)`.strip
pkgname = `basename $(git config --get remote.origin.url) .git | tr '\n' ' '`
# _, pkgname = originurl.match(/\/([a-z0-9\-_]+).git/i).to_a
pkgname
end
# Accepts a hash of git log data and returns a properly formatted debian
# changelog entry.
def debchangelog(logdata)
template = <<-EOF
<%=PKGNAME%> (<%=logdata[:tag]%>) unstable; urgency=low
* <%=logdata[:subj]%>
-- <%=logdata[:name]%> <%=logdata[:date]%>
EOF
ERB.new(template).result(binding)
end
# Checks to see if the repository has any tags already.
def repo_has_tag?
`git describe --tags 2>&1`
return ($? == 0)? true : false
end
# If the repository has no tags, we need to make one so we can get some kind
# of versioning number for the changelog.
def make_temporary_tag
firstcommit = `git log --format=%H | tail -1`.strip
`git tag #{TEMPTAG} #{firstcommit}`
end
# Removes the tag we added if the repo had no tags.
def cleanup_temporary_tag
`git tag -d #{TEMPTAG}`
end
# Removes jenkins build tags (if they exist)
def remove_jenkins_tags
IO.popen("git tag -l 'jenkins-*'").readlines.each do |tag|
`git tag -d #{tag}`
end
end
# Get the name of this repository
PKGNAME = pkgname
# Name for the temporary tag (only used if the repository has no tags)
TEMPTAG = 'GOPSI'
#TEMPTAG = pkgname
remove_jenkins_tags
if repo_has_tag?
dotagcleanup = false
else
dotagcleanup = true
make_temporary_tag
end
# Loop through the git log output and grab four lines at a time to parse.
gitlogcmd = %{git log --pretty=format:'hash: %H%nname: %aN <%aE>%ndate: %cD%nsubj: %s'}
IO.popen(gitlogcmd).readlines.each_slice(4) do |chunk|
temphash = {}
# split each line on the first colon and use what's on the left as the
# symbols within the hash
chunk.map { |line| line.split(/: /,2) }.each do |type, data|
temphash[type.to_sym] = data.strip
end
# dig up the most recent tag which contains the commit
temphash[:tag] = `git describe --tags #{temphash[:hash]} 2>/dev/null`.strip
if $? != 0
dotagcleanup = true
make_temporary_tag
temphash[:tag] = `git describe --tags #{temphash[:hash]}`.strip
end
puts debchangelog(temphash)
end
# If we added a temporary tag, let's remove it
cleanup_temporary_tag

BIN
libexec/inifile.exe Normal file

Binary file not shown.

View File

@@ -0,0 +1,42 @@
To read statements from an INI file you have to capture the output
of INIfile.exe, which can be done either by ...
+ redirecting the output into a temporary file (all Windows versions),
+ using a FOR /F construct (requires Win2000, XP ++)
Assuming you have the INI file "My.ini" in the current directory,
with a section [Profile], and the item "Name":
[Profile]
Name=John Doe
+++ Example with output redirection:
INIfile.exe My.ini [Profile] Name > temp.bat
call temp.bat
INIfile.exe outputs the statement: SET Name=John Doe
which is redirected and written into "temp.bat",
which is CALLed to run the SET statement.
Note that this method produces a temporary file that you have
to delete later.
+++ Example with FOR construct (asssuming in a batch file):
for /f "delims=" %%a in ('INIfile.exe My.ini [Profile] Name') do %%a
This will capture and run the output line(s) from the command
which is enclosed in single(!) quote marks.
Double quote marks may be used within the command, if necessary.
For details see FOR /? at the command prompt.
In any case the variable %Name% will hold the string that was assigend
in the INI file. Note that the variable may be empty.
***

121
libexec/inifile/inifile.txt Normal file
View File

@@ -0,0 +1,121 @@
INIFILE - 32 bit tool, Ver 1.6 (c) 2006-2009, Horst Schaeffer
-------------------------------------------------------------
This tool handles Windows type INI files with section names in square brackets,
and assignments of the form: item=string (case ignored for section and item names).
The INI file must exist!
This program uses the functions supplied by the Microsoft Windows API.
++++ Change or add an assignment
Syntax: INIFILE inifileName [section] item=string
Example: INIFILE c:\some\where\program.ini [Profile] Name=John
The string is taken up to the end of the line.
Optionally, the (entire!) assignment may be enclosed in (double) quote marks
(in case there are redirection symbols in it).
In any case the item name as well as the string will be taken without leading
and trailing spaces.
Example: INIFILE c:\some\where\program.ini [Profile] "Name = John"
If the item is not found, a new line will be added.
If the section is not found it will be generated.
++++ Remove assignment
To remove an item: omit the string (the equal sign is mandatory)
Syntax: INIFILE inifileName [section] item=
Example: INIFILE c:\some\where\program.ini [Profile] Name=
The complete item (not just the assigned string) is removed.
If there are no items left, the section will NOT be removed.
No error will be reported (Errorlevel), if the item does not exist.
++++ Clear assignment
If you want to produce an empty assignment without removing it,
use two equal signs.
Syntax: INIFILE inifileName [section] item==
++++ Remove entire section
To remove a section the security option /REMOVE (case ignored)
is required. No error reported, if the section does not exist.
Syntax: INIFILE inifileName [section] /remove
++++ Get an assignment
Syntax: INIFILE inifileName [section] item
(Note that an additional equal sign would remove the item!!!)
The program will generate a SET statement, and send it to STDOUT.
If you want to produce an environmental variable, redirect the output
to a temporary batch file, and execute it (see also: GetOutput.txt)
Note: Character set is ANSI (Windows), not OEM (DOS).
Example:
INIfile c:\some\where\program.ini [Profile] Name > temp.bat
call temp.bat
If the assignment could not be found for any reason,
the SET statement will be empty (set var=), which clears the variable.
Note: This method cannot be used when equal signs or redirection
symbols are expected in the assigned string.
++++ Get all assignments of a section
Syntax: INIFILE inifileName [section]
SET statements will be generated for all items in the section.
++++ Errorlevels
Errorlevel > 0 indicates an error (message to STDERR)
0 done
1 INI file does not exist
2 Section name in square brackets was not given
255 No INI file specified or help requested (/?)
The INI file operations are done through the Windows API which handles spaces,
upper/lower case etc.. There may be a size limit or a problem with long file
names in older Windows versions. Please test.
Note: In case you have used my old DOS program "INIFILE.COM" make sure that this new
version is found through your PATH assignment (or use the command "inifile.exe").
++++ History
version 1.6, 27 May 2009: Compiled with PB 4.30
version 1.5, 29 Sep 2006: Equal signs allowed in assigned string (though not recommended)
version 1.4, 02 Aug 2006: Added function: clear assignment without removing
version 1.1, 12 Feb 2006: Added: read all items of section
version 1.0, 05 Feb 2006
++++ Disclaimer, Copyright
This program is distributed as "freeware", copyright reserved by the
author. There are no warranties of any kind, nor any liability by
the author. Users accept full responsibility for the use they make
of the software and for any damage caused thereby.
Source available: http://www.horstmuc.de/source/inifile16.zip
Contact the author:
mailto:horst.schaeffer@gmx.net
http://www.horstmuc.de/
*** 27 May 2009

BIN
libexec/innounp.exe Normal file

Binary file not shown.

626
libexec/innounp/innounp.htm Normal file
View File

@@ -0,0 +1,626 @@
<html>
<head>
<title>innounp, the Inno Setup Unpacker</title>
<style>
body { font-family: Verdana, Myriad Web, Syntax, sans-serif; font-size: 90%; }
h1{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:2.0em;
font-weight:600;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
text-transform:none;
}
h2{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:1.75em;
font-weight:500;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
text-transform:none;
}
h3{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:1.58em;
font-weight:600;
font-style:italic;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
text-transform:none;
}
h4{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:1.33em;
font-weight:600;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
text-transform:none;
}
h5, dt{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:1.17em;
font-weight:600;
font-style:italic;
text-decoration:none;
word-spacing:normal;
letter-spacing:normal;
text-transform:none;
}
h6{
font-family:Georgia, Minion Web, Palatino, Book Antiqua, Utopia, Times New Roman, serif;
font-size-adjust:.4;
font-size:1em;
font-weight:700;
font-style:normal;
text-decoration:none;
word-spacing:normal;
letter-spacing:.1em;
font-variant:small-caps
}
h1, h2, h3, h4, h5, h6, dt, th, thead, tfoot{
color:#C00;
}
body{
line-height:1.58em;
margin-top:1.58em;
margin-left:5%;
margin-right:5%;
margin-bottom:1.58em;
padding-top:0;
padding-left:0;
padding-right:0;
padding-bottom:0;
border-top:0;
border-left:0;
border-bottom:0;
border-right:0;
width:auto;
}
pre { line-height: 1.2em; font-size: 110%; }
tt { font-size: 110%; }
.boxed { border: 1px solid black; background-color: #eeeeee; color: blue; }
.quicklink :link, .quicklink :visited {
text-decoration: none;
background-color: #eeeeee;
border-top: 1px dashed #222222;
border-bottom: 1px dashed #222222;
color: blue;
}
.quicklink :hover {
text-decoration: none;
border-top: 1px dashed #222222;
border-bottom: 1px dashed #222222;
background-color: #aadddd;
}
.nav :link, .nav :visited { text-decoration: none; }
.nav :visited { color: blue; }
.nav :hover { text-decoration: underline; color: red; }
:link { color: blue; }
:hover { color: red; }
</style>
</head>
<body>
<!--<div style="float: right; width: 16em; text-align: center; margin-left: 2em;"><span class=quicklink>
<a href="http://innounp.sourceforge.net/get-latest-innounp.php">
<span class=boxed>&darr;</span> Download latest version</a></span><br>
<small>if the above link does not work, please go to the
<a href="http://sourceforge.net/project/showfiles.php?group_id=102423">download page</a></small></div>-->
<p>innounp, the Inno Setup Unpacker<br>
Version 0.39<br>
Supports Inno Setup versions 2.0.8 through 5.5.3</p>
<p><a href="http://www.jrsoftware.org/isinfo.php">Inno Setup</a> is a popular program
for making software installations. Unfortunately, there is no official unpacker - the
only method of getting the files out of the self-extracting executable
is to run it. One piece of software that addresses this issue is Sergei
Wanin's <a href="http://plugring.farmanager.com/downld/files/instexpl_v0.3.rar">InstallExplorer</a>,
a plug-in for the <a href="http://farmanager.com">FAR Manager</a> that unpacks
several types of installations, including Inno Setup (IS). But since it is not updated in a
timely fashion, and so does not support the latest IS most of the time, this program was born.
The advantages over InstallExplorer are:</p>
<ul>
<li>Innounp is open source and based on IS source. Therefore, it is more likely
to support future IS versions.</li>
<li>It recovers portions of the installation script (.iss file), including the registry
changes and the compiled Innerfuse/RemObjects Pascal Script, if available.</li>
</ul>
<p>If you want to report a bug, request a feature, or discuss anything else related
to the program, please write to the forum.</p>
<dl class="nav">
<dt>On this page:</dt>
<dd><a href="#Usage">Usage</a> &nbsp;|&nbsp;
<a href="#ReportingBugs">How to report bugs</a> &nbsp;|&nbsp;
<a href="#History">What's new/History</a> &nbsp;|&nbsp;
<a href="#MultiArc">MultiArc settings</a> &nbsp;|&nbsp;
<a href="#Copyrights">Copyrights and licensing</a></dd>
<dt>In other places:</dt>
<dd><a href="http://sourceforge.net/projects/innounp/files/">Download</a>
&nbsp;|&nbsp;
<a href="http://sourceforge.net/projects/innounp/forums/forum/353235">Forum</a>
&nbsp;|&nbsp;
<a href="http://sourceforge.net/projects/innounp/">Project summary page on SF.net</a>
&nbsp;|&nbsp;
<a href="http://innounp.sf.net">Homepage</a></dd>
</dl>
<p>Both the source and the executable packages are compressed with
<a href="http://www.rarlab.com">WinRar</a>. While the full-featured packer is shareware,
the UnRar utility that can only extract files is free. And there are lots of free
third-party programs that unpack rar just fine, e.g. <a href="http://www.7-zip.org">7-Zip</a>.</p>
<p>As a bonus, a simple unpacker for <a href="http://www.indigorose.com/sf/index.php">Setup
Factory</a> installations is available on the download page. It is ripped from
<a href="http://synce.sourceforge.net">the SynCE project</a>.</p>
<h2><a name="Usage"></a>Usage</h2>
<p>Innounp is a console application, and it uses command-line options to find out
what to do. For a more human-friendly interface utilizing FAR or Total Commander as
a front-end see the <a href="#MultiArc">MultiArc section below</a>. Windows Explorer fans:
nullz has made <a href="http://sourceforge.net/forum/forum.php?thread_id=1122068&forum_id=353235">
some .reg scripts</a> to add innounp into the right-click menu and Richard Santaella crafted a
graphical wrapper for innounp (get it on the download page).</p>
<pre>innounp [command] [options] &lt;setup.exe or setup.0&gt; [@filelist] [filemask ...]
Commands:
(no) display general installation info
-v verbosely list the files (with sizes and timestamps)
-x extract the files from the installation (to the current directory, also see -d)
-e extract files without paths
-t test files for integrity
Options:
-b batch (non-interactive) mode - will not prompt for password or disk changes
-q do not indicate progress while extracting
-m process internal embedded files (such as license and uninstall.exe)
-pPASS decrypt the installation with a password
-dDIR extract the files into DIR (can be absolute or relative path)
-cDIR specifies that DIR is the current directory in the installation
-n don't attempt to unpack new versions
-fFILE same as -p but reads the password from FILE
-a process all copies of duplicate files
-y assume Yes on all queries (e.g. overwrite files)
</pre>
<p>If an installation has <tt>setup.0</tt> (it is made without using SetupLdr), run
innounp on <tt>setup.0</tt> instead of <tt>setup.exe</tt>.</p>
<p>To extract all files from a specific directory, use <tt>dirname\*.*</tt>, not
just <tt>dirname</tt>.</p>
<p>By default all files are extracted to the current directory. Use <tt>-d</tt> to
override this behaviour. For example, <tt>-dUnpacked</tt> will create a directory named
<tt>Unpacked</tt> inside the current directory and put the extracted files there.</p>
<p>The <tt>-c</tt> option is a little more tricky to explain. Suppose you opened an installation
in a file manager and browsed to <tt>{app}\subdir\program.exe</tt>. Now if you copied
<tt>program.exe</tt> to another location, the entire directory tree (<tt>{app}\subdir\</tt>)
would be created and <tt>program.exe</tt> would be extracted there. <tt>-c</tt> notifies innounp
that you are only interested in paths from the current directory and below, so that your
file, <tt>program.exe</tt>, is extracted right where you intended to copy it, not several
directory levels deeper. Note that in order to avoid confusion, files must still be
specified by their full path names inside the installation.</p>
<p>Note that an installation can contain several identical files (possibly under different names). Inno Setup
stores only one copy of such files, and by default innounp will also unpack one file. If you want to have
all files that could ever be installed anywhere, regardless of how many identical files this may get you,
<tt>-a</tt> option will do it.</p>
<p>If <tt>-m</tt> is specified, the file listing includes <tt>embedded\CompiledCode.bin</tt>
which is the code made by the RemObjects Pascal Script compiler. It is possible to disassemble
it using the <tt>ifps3_disasm.rar</tt> package on the download page. The result is not very
readable though since it uses the basic 'disassembler' from IFPS3. Anyone wants to write a
decompiler?</p>
<h2><a name="ReportingBugs"></a>How to report bugs</h2>
<p>OK, I know innounp is far from being perfect, but it is my intention to make
the program usable. User feedback is a great way to achieve this. Here's what you should
do if you find a bug and want it fixed.</p>
<p>Tell me what's wrong with innounp. If you encountered incorrect behaviour,
say what you think it should do and what it actually does. If it crashed or gave
an error message, say <i>what</i> did that - innounp, Windows, FAR, etc, and include
the details.</p>
<p>Describe the exact steps necessary to reproduce the bug. Say what are the
preconditions. Is the bug specific to some system settings? To a setup file you
have? (include the problem part of the installation script or a link to the compiled
setup, if it is small enough) To an IS version? To something else? Or does the
bug occur regardless of these things?</p>
<p>Once you have the bug report ready, post it to the forum. Remember, if I can't
reproduce the bug using the description you gave, the chances that it will be
fixed fall dramatically.</p>
<p>If the above guidelines were not obvious for you, I suggest that you read the
following articles.</p>
<p><a href="http://www.catb.org/~esr/faqs/smart-questions.html"><i>How to Ask
Questions the Smart Way</i></a> by Eric Raymond<br>
<a href="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html"><i>How to Report
Bugs Effectively</i></a> by Simon Tatham</p>
<h2><a name="History"></a>What's new / History</h2>
<p><b>0.39</b> <small>(2013.07.12)</small></p>
<ul>
<li>Fixed CRC32 calculation during unpacking (regression bug).</li>
</ul>
<p><b>0.38</b> <small>(2013.02.01)</small></p>
<ul>
<li>Added InstallDelete and UninstallDelete sections to reconstructed script.</li>
<li>Added some more values to Setup section of reconstructed script.</li>
<li>Several minor reconstructed script improvements.</li>
</ul>
<p><b>0.37</b> <small>(2012.06.02)</small></p>
<ul>
<li>Added support for IS 5.5.0.</li>
<li>Fixed problem with reading of large files.</li>
<li>Added some more values to reconstructed script.</li>
<li>Improved FAR MultiArc settings.</li>
</ul>
<p><b>0.36</b> <small>(2011.06.01)</small></p>
<ul>
<li>Fixed support for IS 5.4.2.</li>
<li>Fixed issue with '{' symbol in file names.</li>
</ul>
<p><b>0.35</b> <small>(2010.10.01)</small></p>
<ul>
<li>Added support for IS 5.2.5 (wasn't released, but such installers can be found).</li>
<li>Added command to test files for integrity.</li>
</ul>
<p><b>0.34</b> <small>(2010.09.16)</small></p>
<ul>
<li>Less technical text in some error messages.</li>
<li>Added dump of password hash to reconstructed script.</li>
<li>Added some more values to reconstructed script.</li>
</ul>
<p><b>0.33</b> <small>(2010.07.05)</small></p>
<ul>
<li>Fixed encoding for custom messages in reconstructed script.</li>
<li>Fixed several parameters in [LangOptions] section.</li>
<li>Fixed language names in *.isl files for Unicode-based installers.</li>
<li>Added support for legacy IS versions 2.0.8 - 2.0.10.</li>
</ul>
<p><b>0.32</b> <small>(2010.06.14)</small></p>
<ul>
<li>Added support for IS versions 5.3.10 (both ANSI and Unicode).</li>
<li>Added support for INI section in reconstructed script.</li>
</ul>
<p><b>0.31</b> <small>(2010.04.19)</small></p>
<ul>
<li>Fixed issue with endless decompression loop on incompatible files.</li>
</ul>
<p><b>0.30</b> <small>(2010.04.12)</small></p>
<ul>
<li>Fixed issue with password processing for Unicode versions.</li>
<li>Added support for IS versions 5.3.9 (both ANSI and Unicode).</li>
<li>Added support for LZMA2 compression, introduced in 5.3.9.</li>
</ul>
<p><b>0.29</b> <small>(2010.02.19)</small></p>
<ul>
<li>Added support for IS versions 5.3.8 (both ANSI and Unicode).</li>
</ul>
<p><b>0.28</b> <small>(2010.01.14)</small></p>
<ul>
<li>Added support for IS versions 5.3.7 (both ANSI and Unicode).</li>
<li>Added support for legacy IS versions 2.0.11 - 2.0.17.</li>
<li>Fixed renaming of duplicate files. If we do not use -a then don't append numbers to names<br>
(this switch does not affect different files with same name, only duplicates with same content).</li>
</ul>
<p><b>0.27</b> <small>(2009.12.04)</small></p>
<ul>
<li>Yet another tuning for file mask processing.</li>
<li>Added overwrite prompt for files extraction (and option for auto-overwrite).</li>
<li>Several tweaks to reconstructed script.</li>
</ul>
<p><b>0.26</b> <small>(2009.11.30)</small></p>
<ul>
<li>Added manifest resource to resolve Vista/Win7 UAC issue.</li>
<li>Added restored %n formatter to custom messages.</li>
<li>Added default OutputBaseFilename value if one from header is empty.</li>
</ul>
<p><b>0.25</b> <small>(2009.11.26)</small></p>
<ul>
<li>Added support fro [Dirs] section in reconstructed script.</li>
<li>Moved version parameter in script to comment (since it is not original IS parameter).</li>
<li>Fixed ArchitecturesInstallIn64BitMode and ArchitecturesAllowed flags in script.</li>
<li>Fixed file mask processing in some cases.</li>
</ul>
<p><b>0.24</b> <small>(2009.11.20)</small></p>
<ul>
<li>Added support for IS versions 5.3.6 (both ANSI and Unicode).</li>
<li>Added version information resource.</li>
<li>Fixed extraction of multiple files with same name.</li>
</ul>
<p><b>0.23</b> <small>(2009.09.25)</small></p>
<ul>
<li>Added support for IS versions 5.3.5 (both ANSI and Unicode).</li>
<li>Added Inno Setup version info to reconstructed install script.</li>
</ul>
<p><b>0.22</b> <small>(2009.08.24)</small></p>
<ul>
<li>Added support for Unicode versions.</li>
<li>Added support for IS versions 5.3.0 - 5.3.4 (both ANSI and Unicode).</li>
<li>Fixed rare issue with double backslashes in file path.</li>
</ul>
<p><b>0.21</b> <small>(2009.04.24)</small></p>
<ul>
<li>Supports legacy IS versions 2.0.18 - 2.0.19</li>
</ul>
<p><b>0.20</b> <small>(2008.05.23)</small></p>
<ul>
<li>Supports IS up to version 5.2.3</li>
<li>Several bugs fixed.</li>
</ul>
<p><b>0.19</b> <small>(2007.02.23)</small></p>
<ul>
<li>Supports IS up to version 5.1.10</li>
<li>Fixed wrong representation of Unicode characters in LanguageName.</li>
<li>Another fix to the handling of duplicate file names.</li>
<li>New option <tt>-a</tt> to extract all copies of duplicate files.</li>
</ul>
<p><b>0.18</b> <small>(2006.11.23)</small></p>
<ul>
<li>The reconstructed script now includes the [Types], [CustomMessages], and [Languages] sections.</li>
<li>ROPS disassembler updated to support the latest build of ROPS.</li>
<li>New option <tt>-f</tt> to read the password from file. This way it can include any special characters.<br>
Be sure to save the file in the correct character encoding as no translations are applied.</li>
<li>Fixed the bug that caused the file timestamps to be inconsistently reported and applied (UTC vs. local).</li>
<li>Updated the decompression libraries: zlib to version 1.2.3, bzip2 to version 1.03, and LZMA to version 4.43
(optimized for speed).</li>
</ul>
<p><b>0.17</b> <small>(2005.08.31)</small></p>
<ul>
<li>Supports IS up to version 5.1.5.</li>
<li>Supports Martijn Laan's My Inno Setup Extensions 3.0.6.1 (by request).</li>
<li>The <tt>Types</tt> parameter is now space-separated, as required by the IS script specification.</li>
</ul>
<p><b>0.16</b> <small>(2005.04.30)</small></p>
<ul>
<li>Supports IS up to 5.1.2-beta.</li>
<li>Innounp will try to unpack new versions of IS to handle the cases when the
binary format is compatible with one of the previous versions. Use <tt>-n</tt>
to disable this attempt.</li>
</ul>
<p><b>0.15</b> <small>(2005.03.08)</small></p>
<ul>
<li>Supports IS up to 5.1.0-beta.</li>
<li>The old bug that prevented innounp from working properly with {reg:...} constants and
the like has got another fix.</li>
<li>Preliminary support for the 64-bit extensions that appeared in IS 5.1.0.</li>
</ul>
<p><b>0.14</b> <small>(2004.10.14)</small></p>
<ul>
<li>Supports IS up to 5.0.4-beta.</li>
<li>It is now possible to specify the destination directory to extract files into using
the <tt>-d</tt> option. This directory will be created if necessary.</li>
<li>New option <tt>-c</tt> specifies the current directory inside an installation and
prevents the creation of the upper-level directories. MultiArc settings are updated
accordingly.</li>
<li>The old <tt>-c</tt> command is removed. To get the compiled Pascal script, use
<tt>-m</tt> and extract it like a normal file.</li>
</ul>
<p><b>0.13</b> <small>(2004.08.26)</small></p>
<ul>
<li>Supports IS up to 5.0.3-beta.</li>
<li>Supports the Components and Tasks sections.</li>
</ul>
<p><b>0.12</b> <small>(2004.07.28)</small></p>
<ul>
<li>Supports IS up to 5.0.0-beta.</li>
<li>Improved processing of big installations with many files.</li>
<li>Innounp now supports a certain level of user interaction - it prompts the user
for password and disk changes as necessary. To switch this functionality off (e.g. in
batch mode), use the <tt>-b</tt> option.</li>
<li>If no command is specified, innounp displays a brief summary of the specified
installation. The old <tt>-i</tt> command is removed. To get the setup script, extract it
like a normal file.</li>
</ul>
<p><b>0.11</b> <small>(2004.05.04)</small></p>
<ul>
<li>Supports IS 4.2.2.</li>
<li>Supports ArcFour encryption. Use the <tt>-p</tt> switch to specify a password
if files are encrypted</li>
</ul>
<p><b>0.10</b> <small>(2004.04.26)</small></p>
<ul>
<li>Fixed (again): filenames containing invalid characters could not be specified
on the command line or in a list file.</li>
</ul>
<p><b>0.09</b> <small>(2004.04.22)</small></p>
<ul>
<li>Fixed (again): invalid characters in filenames (such as ':' and '|') made innounp crash.</li>
<li>Updated TC MultiArc settings.</li>
</ul>
<p><b>0.08</b> <small>(2004.04.14)</small></p>
<ul>
<li>Added support for IS versions up to 4.2.1.</li>
<li>Added MultiArc settings for Total Commander (thanks to Gnozal).</li>
<li>Fixed a bug in MultiArc settings that prevented shells from displaying file
dates and times (thanks to Maxim Ryazanov).</li>
<li>The reconstructed setup script (<tt>.iss</tt>) is now included together with the 'normal' files.
Using <tt>-m</tt> option it's possible to view/extract other internal files in the same way.</li>
</ul>
<p><b>0.07</b> <small>(2004.03.16)</small></p>
<ul>
<li>Multiple files with the same name are not overwritten now, instead they are appended
with numbers.</li>
<li><tt>-c</tt> command extracts the compiled Innerfuse Pascal Script code to a file.
It can then be 'disassembled' with a separate tool. Get one on the download page.</li>
<li>The output of <tt>-i</tt> command now looks more like <tt>.iss</tt> script.
More data is included.</li>
</ul>
<p><b>0.06</b> <small>(2004.03.11)</small></p>
<ul>
<li>Added support for IS versions 3.0.0 - 4.0.0.</li>
<li>Supports installations that were not packaged into a single exe using SetupLdr (these
can be identified by the presence of <tt>setup.0</tt> which is appended to
<tt>setup.exe</tt> in packaged installations).</li>
<li><tt>-i</tt> command displays registry changes made by an installation.</li>
<li>Supports (displays and reads from filelists) filenames with national
characters (single-byte character encodings only, Unicode/MBCS was not tested). The correct
code page must be set in Windows for this function to work properly.</li>
<li>[fix] File dates and times were not set during extraction.</li>
</ul>
<p><b>0.05</b> <small>(2004.03.09)</small></p>
<ul>
<li>Improved batch processing. Now it's possible to browse and extract IS installations
in FAR using the supplied settings for the standard MultiArc plug-in.</li>
<li>Removed <tt>isbunzip.dll</tt>. Bzip2 library is linked statically.</li>
</ul>
<p><b>0.04</b> <small>(2004.02.27)</small></p>
<ul>
<li>Initial release. Supports IS versions 4.0.1 - 4.1.8.</li>
</ul>
<h2><a name="MultiArc"></a>MultiArc settings</h2>
<p>Unless you are a die-hard fan of command line, you may like the idea of working
with IS installations like with conventional archives in a file manager. Right now
two programs support this: FAR and Total Commander. Below are the instructions
how to integrate innounp into each.</p>
<h3>FAR</h3>
<p>Copy <tt>innounp.exe</tt> to a directory in your <tt>PATH</tt> and edit your
<tt>FAR\Plugins\MultiArc\Formats\Custom.ini</tt> file. There are two alternate
settings differing in several aspects and each having its own pros and cons. Try
the recommended setting first, if it does not work well for you, try the other
setting or even combine them.</p>
<h4>Co-operation with InstallExplorer</h4>
<p>If you have InstallExplorer installed (or another plug-in that handles IS,
but you will need to adjust the settings accordingly), you might want to let it
process all the other types of installations but keep IS installations for innounp.
FAR does not provide a means of customizing the plug-in call order; however, an
empirical study has shown that it loads plug-ins and applies them to files in
lexical order. So the solution is to rename InstallExplorer's dll file from <tt>6InstExpl.dll</tt>
to e.g. <tt>zInstExpl.dll</tt> (and restart FAR).</p>
<h4>FAR: recommended setting</h4>
<pre>[InnoSetup5]
TypeName=InnoSetup5
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 35 2E
IDOnly=1
List=innounp -v -m
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P&lt;size&gt;\d+)\s+(?P&lt;mYear&gt;\d+)\.(?P&lt;mMonth&gt;\d+)\.(?P&lt;mDay&gt;\d+)\s+(?P&lt;mHour&gt;\d+):(?P&lt;mMin&gt;\d+)\s+(?P&lt;name&gt;.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"
[InnoSetup4]
TypeName=InnoSetup4
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 34 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P&lt;size&gt;\d+)\s+(?P&lt;mYear&gt;\d+)\.(?P&lt;mMonth&gt;\d+)\.(?P&lt;mDay&gt;\d+)\s+(?P&lt;mHour&gt;\d+):(?P&lt;mMin&gt;\d+)\s+(?P&lt;name&gt;.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"
[InnoSetup3]
TypeName=InnoSetup3
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 33 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P&lt;size&gt;\d+)\s+(?P&lt;mYear&gt;\d+)\.(?P&lt;mMonth&gt;\d+)\.(?P&lt;mDay&gt;\d+)\s+(?P&lt;mHour&gt;\d+):(?P&lt;mMin&gt;\d+)\s+(?P&lt;name&gt;.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"
[InnoSetup2]
TypeName=InnoSetup2
ID=49 6E 6E 6F 20 53 65 74 75 70 20 53 65 74 75 70 20 44 61 74 61 20 28 32 2E
IDOnly=1
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="/^\s+(?P&lt;size&gt;\d+)\s+(?P&lt;mYear&gt;\d+)\.(?P&lt;mMonth&gt;\d+)\.(?P&lt;mDay&gt;\d+)\s+(?P&lt;mHour&gt;\d+):(?P&lt;mMin&gt;\d+)\s+(?P&lt;name&gt;.*)$/i"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
Test=innounp -t -m %%A
AllFilesMask="*.*"
</pre>
<h4>FAR: alternate setting</h4>
Will not work for IS 5.1.5 and up because new versions no longer have this signature.
<pre>
[InnoSetup]
TypeName=InnoSetup
ID=49 6E 6E 6F
IDPos=48
Extension=exe
List="innounp -v -m"
Errorlevel=1
Start="^---------"
End="^---------"
Format0="zzzzzzzzzz yyyy tt dd hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
Extract=innounp -x -m {-c%%R} %%A {@%%LMQ}
ExtractWithoutPath=innounp -e -m {-c%%R} %%A {@%%LMQ}
AllFilesMask="*.*"</pre>
<h3>Total Commander</h3>
<p>Will not work for IS 5.1.5 and up because new versions no longer have this signature. I guess the
version-specific settings from above have to be cloned.</p>
<p>Configuration made up by Gnozal and Maxwish and posted on
<a href="http://ghisler.ch/board/viewtopic.php?t=3810">TC forum</a>. Change the path below
to where you have innounp installed and add this to your <tt>MultiArc.ini</tt>. Note that
MultiArc is not included in the default TC installation, instead it is available as a
separate download from <a href="http://wcx.sourceforge.net">Siarzhuk Zharski's web site</a>.
Refer to the help file for information on any additional configuration necessary.</p>
<pre>[InnoSetup]
Description="InnoSetup"
Archiver=C:\PROGRAM FILES\WINCMD\WCXPlugin\MultiArc\innounp.exe
Extension=exe
ID=49 6E 6E 6F
IDPos=48
Start="^--------------------------------------"
End="^--------------------------------------"
Format0="zzzzzzzzzz yyyy.tt.dd hh:mm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn"
List=%P -v -m %AQ
Extract=%P -e -m -c%R %AQ @%LQ
ExtractWithPath=%P -x -m -c%R %AQ @%LQ
IgnoreErrors=0
SkipEmpty=0
SkipDirsInFileList=0
SearchForUglyDirs=0
BatchUnpack=1
UnixPath=0
AskMode=0
SkipLIST=1
Debug=0</pre>
<h2><a name="Copyrights"></a>Copyrights and licensing</h2>
<p>Copyright &copy; 2004-2013 QuickeneR, 2009-2013 Ariman<br>
This program is licensed under the terms of the <a href="http://www.gnu.org/copyleft/gpl.html">
GNU General Public License (GPL)</a>. A copy of the license is included with the source files.<br>
If you distribute innounp on the WWW, please put a link to its home page,
http://innounp.sourceforge.net</p>
<p>Over 90% of code is ripped from Inno Setup which is Copyright &copy; 1997-2010 Jordan
Russell. All rights reserved.<br>
Portions Copyright &copy; 2000-2006 Martijn Laan. All rights reserved.<br>
See <a href="http://www.jrsoftware.org">http://www.jrsoftware.org</a> for details.</p>
<p>Contains zlib code, Copyright &copy; 1995-2005 Jean-loup Gailly and Mark Adler.</p>
<p>Contains bzip2 code, Copyright &copy; 1996-2009 Julian R Seward. All rights reserved.</p>
<p>Contains LZMA code, Copyright &copy; 1999-2009 Igor Pavlov.</p>
<hr width=20% align=left style="margin-left: 5%">
<p>Innerfuse Pascal Script is Copyright &copy; 2000-2004 by Carlo Kok, Innerfuse.</p>
<p>StripReloc is Copyright &copy; 1999-2005 Jordan Russell, www.jrsoftware.org</p>
<hr>
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=102423&type=1" width="88" height="31" border="0" alt="SourceForge.net"></a>
</body>
</html>