mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- add support for .ocx files to rbuild
- update project to VS2005 svn path=/trunk/; revision=26541
This commit is contained in:
parent
d7d69d0175
commit
66c85e2957
7 changed files with 688 additions and 318 deletions
|
@ -222,6 +222,9 @@ MingwModuleHandler::InstanciateHandler (
|
|||
case Win32DLL:
|
||||
handler = new MingwWin32DLLModuleHandler ( module );
|
||||
break;
|
||||
case Win32OCX:
|
||||
handler = new MingwWin32OCXModuleHandler ( module );
|
||||
break;
|
||||
case KernelModeDriver:
|
||||
case ExportDriver: // maybe change this later
|
||||
handler = new MingwKernelModeDriverModuleHandler ( module );
|
||||
|
@ -2648,6 +2651,13 @@ MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler (
|
|||
{
|
||||
}
|
||||
|
||||
MingwWin32OCXModuleHandler::MingwWin32OCXModuleHandler (
|
||||
const Module& module_ )
|
||||
|
||||
: MingwModuleHandler ( module_ )
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
MingwAddImplicitLibraries( Module &module )
|
||||
{
|
||||
|
@ -2731,6 +2741,59 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
MingwWin32OCXModuleHandler::AddImplicitLibraries ( Module& module )
|
||||
{
|
||||
MingwAddImplicitLibraries ( module );
|
||||
MingwAddDebugSupportLibraries ( module, DebugUserMode );
|
||||
}
|
||||
|
||||
void
|
||||
MingwWin32OCXModuleHandler::Process ()
|
||||
{
|
||||
GenerateWin32OCXModuleTarget ();
|
||||
}
|
||||
|
||||
void
|
||||
MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget ()
|
||||
{
|
||||
string targetMacro ( GetTargetMacro (module) );
|
||||
string workingDirectory = GetWorkingDirectory ( );
|
||||
string objectsMacro = GetObjectsMacro ( module );
|
||||
string linkDepsMacro = GetLinkingDependenciesMacro ();
|
||||
string libsMacro = GetLibsMacro ();
|
||||
|
||||
GenerateImportLibraryTargetIfNeeded ();
|
||||
|
||||
if ( module.non_if_data.compilationUnits.size () > 0 )
|
||||
{
|
||||
GenerateRules ();
|
||||
|
||||
string dependencies = linkDepsMacro + " " + objectsMacro;
|
||||
|
||||
string linker;
|
||||
if ( module.cplusplus )
|
||||
linker = "${gpp}";
|
||||
else
|
||||
linker = "${gcc}";
|
||||
|
||||
string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -shared",
|
||||
module.GetEntryPoint(true).c_str (),
|
||||
module.baseaddress.c_str () );
|
||||
GenerateLinkerCommand ( dependencies,
|
||||
linker,
|
||||
linkerParameters,
|
||||
objectsMacro,
|
||||
libsMacro,
|
||||
"" );
|
||||
}
|
||||
else
|
||||
{
|
||||
GeneratePhonyTarget();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MingwWin32CUIModuleHandler::MingwWin32CUIModuleHandler (
|
||||
const Module& module_ )
|
||||
|
||||
|
|
|
@ -338,6 +338,19 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class MingwWin32OCXModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
MingwWin32OCXModuleHandler ( const Module& module );
|
||||
virtual HostType DefaultHost() { return HostFalse; }
|
||||
virtual void Process ();
|
||||
std::string TypeSpecificLinkerFlags() { return module.useHostStdlib ? "-nostartfiles -lgcc" : "-nostartfiles -nostdlib -lgcc"; }
|
||||
void AddImplicitLibraries ( Module& module );
|
||||
private:
|
||||
void GenerateWin32OCXModuleTarget ();
|
||||
};
|
||||
|
||||
|
||||
class MingwWin32CUIModuleHandler : public MingwModuleHandler
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -47,6 +47,7 @@ Bootstrap::IsSupportedModuleType ( ModuleType type )
|
|||
case NativeDLL:
|
||||
case NativeCUI:
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
case Win32CUI:
|
||||
case Win32SCR:
|
||||
case Win32GUI:
|
||||
|
|
|
@ -807,6 +807,8 @@ Module::GetModuleType ( const string& location, const XMLAttribute& attribute )
|
|||
return NativeCUI;
|
||||
if ( attribute.value == "win32dll" )
|
||||
return Win32DLL;
|
||||
if ( attribute.value == "win32ocx" )
|
||||
return Win32OCX;
|
||||
if ( attribute.value == "win32cui" )
|
||||
return Win32CUI;
|
||||
if ( attribute.value == "win32gui" )
|
||||
|
@ -865,6 +867,8 @@ Module::GetDefaultModuleExtension () const
|
|||
case NativeDLL:
|
||||
case Win32DLL:
|
||||
return ".dll";
|
||||
case Win32OCX:
|
||||
return ".ocx";
|
||||
case KernelModeDriver:
|
||||
case BootLoader:
|
||||
case ExportDriver:
|
||||
|
@ -907,6 +911,7 @@ Module::GetDefaultModuleEntrypoint () const
|
|||
case NativeCUI:
|
||||
return "NtProcessStartup@4";
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
return "DllMain@12";
|
||||
case Win32CUI:
|
||||
case Test:
|
||||
|
@ -948,6 +953,7 @@ Module::GetDefaultModuleBaseaddress () const
|
|||
case Kernel:
|
||||
return "0x80000000";
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
return "0x10000000";
|
||||
case NativeDLL:
|
||||
case NativeCUI:
|
||||
|
@ -997,6 +1003,7 @@ Module::IsDLL () const
|
|||
case ExportDriver:
|
||||
case NativeDLL:
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
return true;
|
||||
case KernelModeDriver:
|
||||
case NativeCUI:
|
||||
|
@ -1034,6 +1041,7 @@ Module::GenerateInOutputTree () const
|
|||
case ExportDriver:
|
||||
case NativeDLL:
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
case KernelModeDriver:
|
||||
case NativeCUI:
|
||||
case Win32CUI:
|
||||
|
@ -1523,6 +1531,7 @@ AutoRegister::IsSupportedModuleType ( ModuleType type )
|
|||
switch ( type )
|
||||
{
|
||||
case Win32DLL:
|
||||
case Win32OCX:
|
||||
return true;
|
||||
case Kernel:
|
||||
case KernelModeDLL:
|
||||
|
|
|
@ -257,22 +257,23 @@ enum ModuleType
|
|||
NativeDLL = 6,
|
||||
NativeCUI = 7,
|
||||
Win32DLL = 8,
|
||||
Win32CUI = 9,
|
||||
Win32GUI = 10,
|
||||
BootLoader = 11,
|
||||
BootSector = 12,
|
||||
Iso = 13,
|
||||
LiveIso = 14,
|
||||
Test = 15,
|
||||
RpcServer = 16,
|
||||
RpcClient = 17,
|
||||
Alias = 18,
|
||||
BootProgram = 19,
|
||||
Win32SCR = 20,
|
||||
ExportDriver = 21,
|
||||
IdlHeader = 22,
|
||||
IsoRegTest = 23,
|
||||
LiveIsoRegTest = 24
|
||||
Win32OCX = 9,
|
||||
Win32CUI = 10,
|
||||
Win32GUI = 11,
|
||||
BootLoader = 12,
|
||||
BootSector = 13,
|
||||
Iso = 14,
|
||||
LiveIso = 15,
|
||||
Test = 16,
|
||||
RpcServer = 17,
|
||||
RpcClient = 18,
|
||||
Alias = 19,
|
||||
BootProgram = 20,
|
||||
Win32SCR = 21,
|
||||
ExportDriver = 22,
|
||||
IdlHeader = 23,
|
||||
IsoRegTest = 24,
|
||||
LiveIsoRegTest = 25
|
||||
};
|
||||
|
||||
enum HostType
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rbuild", "rbuild.vcproj", "{D9305AFB-499E-49F1-A865-99DD7E19E762}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug.ActiveCfg = Debug|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug.Build.0 = Debug|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Release.ActiveCfg = Release|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Release.Build.0 = Release|Win32
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D9305AFB-499E-49F1-A865-99DD7E19E762}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue