mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 11:31:54 +00:00
* Build csrss and win32csr
* NativeCUI module type support svn path=/branches/xmlbuildsystem/; revision=13424
This commit is contained in:
parent
900f042f61
commit
56ff0d9653
8 changed files with 117 additions and 19 deletions
|
@ -1,8 +0,0 @@
|
|||
; $Id$
|
||||
;
|
||||
|
||||
LIBRARY csrss.exe
|
||||
|
||||
EXPORTS
|
||||
|
||||
CsrServerInitialization
|
23
reactos/subsys/csrss/csrss.xml
Normal file
23
reactos/subsys/csrss/csrss.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<module name="csrss" type="nativecui">
|
||||
<include base="csrss">.</include>
|
||||
<include base="csrss">include</include>
|
||||
<define name="__USE_W32API" />
|
||||
<define name="_WIN32_WINNT">0x0600</define>
|
||||
<define name="WINVER">0x0501</define>
|
||||
<library>rosrtl</library>
|
||||
<library>ntdll</library>
|
||||
<directory name="api">
|
||||
<file>handle.c</file>
|
||||
<file>process.c</file>
|
||||
<file>user.c</file>
|
||||
<file>wapi.c</file>
|
||||
</directory>
|
||||
<file>csrss.c</file>
|
||||
<file>init.c</file>
|
||||
<file>print.c</file>
|
||||
<file>video.c</file>
|
||||
<file>csrss.rc</file>
|
||||
</module>
|
||||
<directory name="win32csr">
|
||||
<xi:include href="win32csr/win32csr.xml" />
|
||||
</directory>
|
18
reactos/subsys/csrss/win32csr/win32csr.xml
Normal file
18
reactos/subsys/csrss/win32csr/win32csr.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<module name="win32csr" type="win32dll">
|
||||
<importlibrary definition="win32csr.def" />
|
||||
<include base="win32csr">.</include>
|
||||
<include base="csrss">include</include>
|
||||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="__USE_W32API" />
|
||||
<library>ntdll</library>
|
||||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
<library>gdi32</library>
|
||||
<file>conio.c</file>
|
||||
<file>desktopbg.c</file>
|
||||
<file>dllmain.c</file>
|
||||
<file>exitros.c</file>
|
||||
<file>guiconsole.c</file>
|
||||
<file>tuiconsole.c</file>
|
||||
<file>win32csr.rc</file>
|
||||
</module>
|
|
@ -1,3 +1,6 @@
|
|||
<directory name="csrss">
|
||||
<xi:include href="csrss/csrss.xml" />
|
||||
</directory>
|
||||
<directory name="system">
|
||||
<xi:include href="system/directory.xml" />
|
||||
</directory>
|
||||
|
|
|
@ -1559,17 +1559,6 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
|
|||
GenerateImportLibraryTargetIfNeeded ( module );
|
||||
|
||||
if ( module.files.size () > 0 )
|
||||
{
|
||||
string killAt = module.mangledSymbols ? "" : "--kill-at";
|
||||
fprintf ( fMakefile,
|
||||
"\t${dlltool} --dllname %s --def %s --output-lib %s %s\n\n",
|
||||
module.GetTargetName ().c_str (),
|
||||
(module.GetBasePath () + SSEP + module.importLibrary->definition).c_str (),
|
||||
FixupTargetFilename ( module.GetDependencyPath () ).c_str (),
|
||||
killAt.c_str () );
|
||||
}
|
||||
|
||||
if (module.files.size () > 0)
|
||||
{
|
||||
GenerateMacrosAndTargetsTarget ( module );
|
||||
|
||||
|
@ -1595,6 +1584,63 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
|
|||
}
|
||||
|
||||
|
||||
static MingwNativeCUIModuleHandler nativecui_handler;
|
||||
|
||||
MingwNativeCUIModuleHandler::MingwNativeCUIModuleHandler ()
|
||||
: MingwModuleHandler ( NativeCUI )
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MingwNativeCUIModuleHandler::Process ( const Module& module )
|
||||
{
|
||||
GeneratePreconditionDependencies ( module );
|
||||
GenerateNativeCUIModuleTarget ( module );
|
||||
GenerateInvocations ( module );
|
||||
}
|
||||
|
||||
void
|
||||
MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget ( const Module& module )
|
||||
{
|
||||
static string ros_junk ( "$(ROS_TEMPORARY)" );
|
||||
string target ( FixupTargetFilename ( module.GetPath () ) );
|
||||
string workingDirectory = GetWorkingDirectory ( );
|
||||
string objectFilenames = GetObjectFilenames ( module );
|
||||
string archiveFilename = GetModuleArchiveFilename ( module );
|
||||
string importLibraryDependencies = GetImportLibraryDependencies ( module );
|
||||
|
||||
GenerateImportLibraryTargetIfNeeded ( module );
|
||||
|
||||
if ( module.files.size () > 0 )
|
||||
{
|
||||
string* cflags = new string ( "-D__NTAPP__" );
|
||||
GenerateMacrosAndTargetsTarget ( module,
|
||||
cflags,
|
||||
NULL );
|
||||
delete cflags;
|
||||
|
||||
fprintf ( fMakefile, "%s: %s %s\n",
|
||||
target.c_str (),
|
||||
archiveFilename.c_str (),
|
||||
importLibraryDependencies.c_str () );
|
||||
|
||||
string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,0x10000 -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -nostartfiles -nostdlib",
|
||||
module.entrypoint.c_str () );
|
||||
GenerateLinkerCommand ( module,
|
||||
"${gcc}",
|
||||
linkerParameters,
|
||||
objectFilenames );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf ( fMakefile, ".PHONY: %s\n\n",
|
||||
target.c_str ());
|
||||
fprintf ( fMakefile, "%s:\n\n",
|
||||
target.c_str ());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static MingwWin32DLLModuleHandler win32dll_handler;
|
||||
|
||||
MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler ()
|
||||
|
|
|
@ -222,6 +222,16 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class MingwNativeCUIModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwNativeCUIModuleHandler ();
|
||||
virtual void Process ( const Module& module );
|
||||
private:
|
||||
void GenerateNativeCUIModuleTarget ( const Module& module );
|
||||
};
|
||||
|
||||
|
||||
class MingwWin32DLLModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -271,6 +271,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
|
|||
return KernelModeDriver;
|
||||
if ( attribute.value == "nativedll" )
|
||||
return NativeDLL;
|
||||
if ( attribute.value == "nativecui" )
|
||||
return NativeCUI;
|
||||
if ( attribute.value == "win32dll" )
|
||||
return Win32DLL;
|
||||
if ( attribute.value == "win32gui" )
|
||||
|
@ -298,6 +300,7 @@ Module::GetDefaultModuleExtension () const
|
|||
case ObjectLibrary:
|
||||
return ".o";
|
||||
case Kernel:
|
||||
case NativeCUI:
|
||||
case Win32GUI:
|
||||
return ".exe";
|
||||
case KernelModeDLL:
|
||||
|
@ -329,6 +332,8 @@ Module::GetDefaultModuleEntrypoint () const
|
|||
return "_DriverEntry@8";
|
||||
case NativeDLL:
|
||||
return "_DllMainCRTStartup@12";
|
||||
case NativeCUI:
|
||||
return "_NtProcessStartup@4";
|
||||
case Win32DLL:
|
||||
return "_DllMain@12";
|
||||
case KernelModeDriver:
|
||||
|
|
|
@ -91,6 +91,7 @@ enum ModuleType
|
|||
KernelModeDLL,
|
||||
KernelModeDriver,
|
||||
NativeDLL,
|
||||
NativeCUI,
|
||||
Win32DLL,
|
||||
Win32GUI,
|
||||
BootLoader,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue