applied patch #1711089 - disable System::Call and System::Get when building with GCC
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5149 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
012eededc2
commit
55d89deb99
4 changed files with 22 additions and 1 deletions
|
@ -5,7 +5,9 @@
|
|||
#include "Plugin.h"
|
||||
#include "Buffers.h"
|
||||
#include "System.h"
|
||||
#ifndef __GNUC__
|
||||
#include <crtdbg.h>
|
||||
#endif /* __GNUC__ */
|
||||
#include <objbase.h>
|
||||
|
||||
// Parse Section Type
|
||||
|
@ -39,6 +41,15 @@ HINSTANCE g_hInstance;
|
|||
char retexpr[4];
|
||||
HANDLE retaddr;
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
||||
/*
|
||||
FIXME:
|
||||
GCC cannot compile the inline assembly used by System::Call and
|
||||
System::Get, so those functions and their supporting functions
|
||||
are disabled when using GCC.
|
||||
*/
|
||||
|
||||
char *GetResultStr(SystemProc *proc)
|
||||
{
|
||||
char *buf = AllocString();
|
||||
|
@ -250,6 +261,8 @@ PLUGINFUNCTION(Call)
|
|||
GlobalFree((HANDLE) proc); // No, free it
|
||||
} PLUGINFUNCTIONEND
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
PLUGINFUNCTIONSHORT(Int64Op)
|
||||
{
|
||||
__int64 i1, i2 = 0, i3, i4;
|
||||
|
@ -307,6 +320,8 @@ __int64 GetIntFromString(char **p)
|
|||
return myatoi(buffer);
|
||||
}
|
||||
|
||||
#ifndef __GNUC__
|
||||
|
||||
SystemProc *PrepareProc(BOOL NeedForCall)
|
||||
{
|
||||
int SectionType = PST_PROC, // First section is always proc spec
|
||||
|
@ -1370,6 +1385,8 @@ void CallStruct(SystemProc *proc)
|
|||
proc->Params[0].Value = (int) proc->Proc;
|
||||
}
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
|
||||
{
|
||||
g_hInstance=hInst;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
<p>Programming knowledge is highly recommended for good understanding of the System plug-in.</p>
|
||||
|
||||
<p>The most useful System plug-in functions (Call, Get and Debug) are not available when compiling with GCC. To work around this, either download a MSVC-compiled version or write your own plugin that calls the functions you need.</p>
|
||||
|
||||
<h4>Usage Examples From The Wiki</h4>
|
||||
|
||||
<ul>
|
||||
|
|
|
@ -83,7 +83,7 @@ If no cross-compiler is available, use the following:
|
|||
|
||||
This should only build makensis and install it to the directory where a precompiled package, such as the \R{build_nightly}{nightly build} or a \W{http://sourceforge.net/project/showfiles.php?group_id=22049}{zipped release version} (nsis-x.xx.zip), is extracted. Note that the in order for this to work, the precompiled package must be compiled using the exact same sources as makensis. In particular, \c{Source\\exehead\\config.h}, the options passed to scons and \c{Source\\exehead\\fileform.h} must be identical. Nightly builds and zipped release versions are built with the default options.
|
||||
|
||||
Currently, the System plug-in \W{http://forums.winamp.com/showthread.php?s=&threadid=227304}{can't be built} using a cross-compiler, but only with MSVC. When building with a cross compiler, always use at least the following flags:
|
||||
Currently, the Call, Get and Debug functions of the System plug-in \W{http://forums.winamp.com/showthread.php?s=&threadid=227304}{can't be built} using GCC, but only with MSVC. When building with GCC, either download a MSVC-compiled version or write your own plugin that calls the functions you need. You can skip building the System plugin using the following flags:
|
||||
|
||||
\c scons SKIPPLUGINS=System
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@ If both NoModify and NoRepair are set to 1, the button displays "Remove" instead
|
|||
|
||||
\H{useful_system_plugin} Calling an external DLL using the System.dll plug-in
|
||||
|
||||
\\<b\\>Please note that the Call, Get and Debug functions cannot be compiled with GCC, so download the Windows version of NSIS and extract the System.dll plugin or write your own plugin that calls the functions you need.\\</b\\>
|
||||
|
||||
Some install processes are required to call functions contained inside third party DLLs. A prime example of this is when installing a Palm(TM) conduit.
|
||||
|
||||
\\<b\\>Some background about System.dll\\</b\\> \\<br\\>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue