Original Post
Hi, I made a small program which uses 7-zip for compression. However, I don't want to publish my program as 2 executables, but I want to 'merge' them, so that 7za.exe is not visible and not directly usable for the user, but only my program (which is actually a 'user-friendlier' version of 7za.exe). Can I just add 7-zip as resource or something? Or use something like this: http://www.erikveen.dds.nl/eee/. Or would it be better to compile the 7za source into my own project? Tried that, but my MingW compiler gives me some errors of the Visual Studio project of 7z (I use CodeBlocks, which imports VS project files. I could just compile it (some warnings, 2 errors) but apparently VS compiler and GCC compiler work a little different). I prefer the last option (compile 7za into my project), as I than can get rid of the unwanted output 7za generates, but I have no idea what to do with the errors. Errors: resource.rc
MY_VERSION_INFO_DLL("7z Plugin", "7z") syntax error It includes "MyVersionInfo.rc", which has the following content: #include <WinVer.h>
#include "MyVersion.h"
#define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0
#ifdef DEBUG
#define DBG_FL VS_FF_DEBUG
#else
#define DBG_FL 0
#endif
#define MY_VERSION_INFO(fileType, descr, intName, origName) LANGUAGE 9, 1 1 VERSIONINFO FILEVERSION MY_VER PRODUCTVERSION MY_VER FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS DBG_FL FILEOS VOS_NT_WINDOWS32 FILETYPE fileType FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Igor Pavlov" VALUE "FileDescription", descr VALUE "FileVersion", MY_VERSION VALUE "InternalName", intName VALUE "LegalCopyright", MY_COPYRIGHT VALUE "OriginalFilename", origName VALUE "ProductName", "7-Zip" VALUE "ProductVersion", MY_VERSION END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END
#define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(VFT_APP, descr, intName, intName ".exe")
#define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(VFT_DLL, descr, intName, intName ".dll") (when I escape the line, I get the next error:) Threads.c HRes CriticalSection_Init(CCriticalSection *p)
{
/* InitializeCriticalSection can raise only STATUS_NO_MEMORY exception */
__try
{
InitializeCriticalSection(p);
/* InitializeCriticalSectionAndSpinCount(p, 0); */
}
__except (EXCEPTION_EXECUTE_HANDLER) { return SZE_OUTOFMEMORY; }
return SZ_OK;
}
'__try' undeclared Thanks in advance, Taco