Author: mpiulachs
Date: Tue May 6 09:24:16 2008
New Revision: 33321
URL:
http://svn.reactos.org/svn/reactos?rev=33321&view=rev
Log:
-Add a new module type 'cabinet' to handle .cab files generation
-Remove harcoded vgafonts.cab instructions from rbuild and move them to its own rbuild
file
Added:
trunk/reactos/media/vgafonts/vgafonts.rbuild (with props)
Modified:
trunk/reactos/media/media.rbuild
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
trunk/reactos/tools/rbuild/bootstrap.cpp
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/media/media.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/media.rbuild?rev=333…
==============================================================================
--- trunk/reactos/media/media.rbuild [iso-8859-1] (original)
+++ trunk/reactos/media/media.rbuild [iso-8859-1] Tue May 6 09:24:16 2008
@@ -13,4 +13,7 @@
<directory name="nls">
<xi:include href="nls/nls.rbuild" />
</directory>
+ <directory name="vgafonts">
+ <xi:include href="vgafonts/vgafonts.rbuild" />
+ </directory>
</group>
Added: trunk/reactos/media/vgafonts/vgafonts.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/vgafonts/vgafonts.rb…
==============================================================================
--- trunk/reactos/media/vgafonts/vgafonts.rbuild (added)
+++ trunk/reactos/media/vgafonts/vgafonts.rbuild [iso-8859-1] Tue May 6 09:24:16 2008
@@ -1,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<module name="vgafonts" type="cabinet">
+ <bootstrap installbase="$(CDOUTPUT)" />
+ <file>437-8x8.bin</file>
+ <file>737-8x8.bin</file>
+ <file>775-8x8.bin</file>
+ <file>850-8x8.bin</file>
+ <file>852-8x8.bin</file>
+ <file>865-8x8.bin</file>
+ <file>866-8x8.bin</file>
+</module>
Propchange: trunk/reactos/media/vgafonts/vgafonts.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Tue May 6
09:24:16 2008
@@ -243,6 +243,9 @@
break;
case IdlHeader:
handler = new MingwIdlHeaderModuleHandler ( module );
+ break;
+ case Cabinet:
+ handler = new MingwCabinetModuleHandler ( module );
break;
case EmbeddedTypeLib:
handler = new MingwEmbeddedTypeLibModuleHandler ( module );
@@ -1357,6 +1360,7 @@
"\t$(ECHO_CC)\n"
"\t${host_gpp} -c $< -o $@
$($(module_name)_CFLAGS)$(compiler_flags)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o",
NULL );
+Rule emptyRule ( "", NULL );
void
MingwModuleHandler::GenerateGccCommand (
@@ -1479,6 +1483,7 @@
{ HostFalse, TypeDontCare, ".cc", &gppRule },
{ HostFalse, TypeDontCare, ".cpp", &gppRule },
{ HostFalse, TypeDontCare, ".cxx", &gppRule },
+ { HostFalse, Cabinet, ".*", &emptyRule }
};
size_t i;
Rule *customRule = NULL;
@@ -1489,7 +1494,7 @@
continue;
if ( rules[i].type != TypeDontCare && rules[i].type != module.type )
continue;
- if ( rules[i].extension != extension )
+ if ( rules[i].extension != extension && rules[i].extension != ".*")
continue;
customRule = rules[i].rule;
break;
@@ -3484,12 +3489,6 @@
FileLocation reactosInf ( bootcdReactos.directory,
bootcdReactos.relative_path,
"reactos.inf" );
- FileLocation vgafontsCab( bootcdReactos.directory,
- bootcdReactos.relative_path,
- "vgafonts.cab");
- FileLocation vgafontsDir( SourceDirectory,
- "media" + sSep + "vgafonts",
- "" );
vSourceFiles.push_back ( reactosDff );
@@ -3518,11 +3517,6 @@
sourceFiles.c_str (),
cdFiles.c_str (),
cdDirectories.c_str () );
- fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" );
- fprintf ( fMakefile,
- "\t$(Q)$(CABMAN_TARGET) -M raw -S %s %s\\*.bin\n", // Escape
the asterisk for Make
- backend->GetFullName ( vgafontsCab ).c_str (),
- backend->GetFullName ( vgafontsDir ).c_str ());
fprintf ( fMakefile,
"\t$(Q)$(CABMAN_TARGET) -C %s -L %s -I -P $(OUTPUT)\n",
backend->GetFullName ( reactosDff ).c_str (),
@@ -3828,6 +3822,32 @@
GenerateRules ();
}
+MingwCabinetModuleHandler::MingwCabinetModuleHandler (
+ const Module& module_ )
+
+ : MingwModuleHandler ( module_ )
+{
+}
+
+void
+MingwCabinetModuleHandler::Process ()
+{
+ string targetMacro ( GetTargetMacro (module) );
+
+ GenerateRules ();
+
+ const FileLocation *target_file = GetTargetFilename ( module, NULL );
+ fprintf ( fMakefile, "%s: | %s\n",
+ targetMacro.c_str (),
+ backend->GetFullPath ( *target_file ).c_str () );
+
+ fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" );
+ fprintf ( fMakefile,
+ "\t$(Q)$(CABMAN_TARGET) -M raw -S %s $(%s_SOURCES)\n", //
Escape the asterisk for Make
+ targetMacro.c_str (),
+ module.name.c_str());
+}
+
MingwElfExecutableModuleHandler::MingwElfExecutableModuleHandler (
const Module& module_ )
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h [iso-8859-1] Tue May 6
09:24:16 2008
@@ -486,6 +486,14 @@
virtual void Process ();
};
+class MingwCabinetModuleHandler : public MingwModuleHandler
+{
+public:
+ MingwCabinetModuleHandler ( const Module& module );
+ virtual HostType DefaultHost() { return HostFalse; }
+ virtual void Process ();
+};
+
class MingwEmbeddedTypeLibModuleHandler : public MingwModuleHandler
{
public:
Modified: trunk/reactos/tools/rbuild/bootstrap.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/bootstrap.cpp…
==============================================================================
--- trunk/reactos/tools/rbuild/bootstrap.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/bootstrap.cpp [iso-8859-1] Tue May 6 09:24:16 2008
@@ -54,6 +54,7 @@
case BootSector:
case BootLoader:
case BootProgram:
+ case Cabinet:
return true;
case BuildTool:
case StaticLibrary:
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Tue May 6 09:24:16 2008
@@ -939,6 +939,8 @@
return EmbeddedTypeLib;
if ( attribute.value == "elfexecutable" )
return ElfExecutable;
+ if ( attribute.value == "cabinet" )
+ return Cabinet;
throw InvalidAttributeValueException ( location,
attribute.name,
attribute.value );
@@ -970,6 +972,7 @@
case LiveIsoRegTest:
case EmbeddedTypeLib:
case ElfExecutable:
+ case Cabinet:
return OutputDirectory;
case StaticLibrary:
case HostStaticLibrary:
@@ -1019,6 +1022,8 @@
case KernelModeDriver:
case BootLoader:
return ".sys";
+ case Cabinet:
+ return ".cab";
case BootSector:
return ".o";
case Iso:
@@ -1092,6 +1097,7 @@
case IdlHeader:
case ElfExecutable:
case EmbeddedTypeLib:
+ case Cabinet:
return "";
case TypeDontCare:
break;
@@ -1140,6 +1146,7 @@
case BootProgram:
case IdlHeader:
case EmbeddedTypeLib:
+ case Cabinet:
return "";
case TypeDontCare:
break;
@@ -1189,6 +1196,7 @@
case IdlHeader:
case EmbeddedTypeLib:
case ElfExecutable:
+ case Cabinet:
return false;
case TypeDontCare:
break;
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] Tue May 6 09:24:16 2008
@@ -303,6 +303,7 @@
RpcProxy,
HostStaticLibrary,
TypeDontCare,
+ Cabinet
};
enum HostType