Author: sserapion
Date: Sat Dec 26 07:07:38 2009
New Revision: 44762
URL:
http://svn.reactos.org/svn/reactos?rev=44762&view=rev
Log:
[rbuild]
- Fix make install.
- Fix mkhive command.
- Automatically generate reactos.dff using the installfile and installbase attributes
found in rbuild files.
-- Fixes race to grab reactos.dff on concurrent builds in the same tree.
-- Makes the result of make install, make livecd and make bootcd the same(some modules
arent in reactos.dff but have installfile/base attributes, which means they got intto
livecd/install but not bootcd!)
-- Works really great with rosapps/rostests.
-- Downside is some files now exist inside and outside the generated cab file, maybe this
could be useful if we wanted to have a package that contained reactos and an app that
installed it from livecd... just thinking out loud...
Added:
branches/ros-amd64-bringup/reactos/boot/bootdata/hiveinst_amd64.inf (with props)
Removed:
branches/ros-amd64-bringup/reactos/boot/bootdata/packages/
Modified:
branches/ros-amd64-bringup/reactos/base/services/tcpsvcs/tcpsvcs.rbuild
branches/ros-amd64-bringup/reactos/base/shell/explorer/explorer.rbuild
branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild
branches/ros-amd64-bringup/reactos/hal/halx86/halup.rbuild
branches/ros-amd64-bringup/reactos/media/inf/inf.rbuild
branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.cpp
branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.h
branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
branches/ros-amd64-bringup/reactos/tools/rbuild/installfile.cpp
branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp
branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp
branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.h
Modified: branches/ros-amd64-bringup/reactos/base/services/tcpsvcs/tcpsvcs.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/base/services/tcpsvcs/tcpsvcs.rbuild [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/base/services/tcpsvcs/tcpsvcs.rbuild [iso-8859-1]
Sat Dec 26 07:07:38 2009
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
+<installfile
installbase="system32/drivers/etc">quotes</installfile>
<module name="tcpsvcs" type="win32cui"
installbase="system32" installname="tcpsvcs.exe"
unicode="yes">
<include base="arp">.</include>
<library>ws2_32</library>
Modified: branches/ros-amd64-bringup/reactos/base/shell/explorer/explorer.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/base/shell/explorer/explorer.rbuild [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/base/shell/explorer/explorer.rbuild [iso-8859-1]
Sat Dec 26 07:07:38 2009
@@ -66,7 +66,7 @@
<file>explorer.rc</file>
<linkerflag>--enable-stdcall-fixup</linkerflag>
</module>
-<installfile
installbase=".">explorer-cfg-template.xml</installfile>
+<installfile>explorer-cfg-template.xml</installfile>
<directory name="notifyhook">
<xi:include href="notifyhook/notifyhook.rbuild" />
</directory>
Added: branches/ros-amd64-bringup/reactos/boot/bootdata/hiveinst_amd64.inf
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/bootdata/hiveinst_amd64.inf (added)
+++ branches/ros-amd64-bringup/reactos/boot/bootdata/hiveinst_amd64.inf [iso-8859-1] Sat
Dec 26 07:07:38 2009
@@ -1,0 +1,19 @@
+[Version]
+Signature = "$ReactOS$"
+
+[AddReg]
+; Enable _one_ driver per section by removing the leading semicolon.
+
+;
+; Display driver section
+;
+
+; VBE SVGA driver
+HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Start",0x00010001,0x00000001
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.BitsPerPel",0x00010001,16
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.XResolution",0x00010001,800
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","DefaultSettings.YResolution",0x00010001,600
+
+; VGA miniport driver
+HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Start",0x00010001,0x00000001
Propchange: branches/ros-amd64-bringup/reactos/boot/bootdata/hiveinst_amd64.inf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild [iso-8859-1] Sat Dec 26 07:07:38
2009
@@ -22,13 +22,13 @@
</module>
</if>
<if property="ARCH" value="i386">
- <module ifnot="false" name="halupalias" type="alias"
installbase="system32" installname="hal.dll"
aliasof="halup">
+ <module ifnot="false" name="halupalias" type="alias"
aliasof="halup">
</module>
- <module if="false" name="halmpalias" type="alias"
installbase="system32" installname="hal.dll"
aliasof="halmp">
+ <module if="false" name="halmpalias" type="alias"
aliasof="halmp">
</module>
</if>
<if property="ARCH" value="powerpc">
- <module name="halupalias" type="alias"
installbase="system32" installname="hal.dll"
aliasof="halppc_up"/>
+ <module name="halupalias" type="alias"
aliasof="halppc_up"/>
</if>
<if property="ARCH" value="amd64">
<module name="hal" type="kernelmodedll">
Modified: branches/ros-amd64-bringup/reactos/hal/halx86/halup.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
==============================================================================
--- branches/ros-amd64-bringup/reactos/hal/halx86/halup.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/hal/halx86/halup.rbuild [iso-8859-1] Sat Dec 26
07:07:38 2009
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
<group
xmlns:xi="http://www.w3.org/2001/XInclude">
- <module name="halup" type="kernelmodedll"
entrypoint="0" installname="hal.dll">
+ <module name="halup" type="kernelmodedll"
entrypoint="0" installbase="system32"
installname="hal.dll">
<importlibrary base="hal" definition="hal.pspec" />
<bootstrap installbase="$(CDOUTPUT)" />
<include>include</include>
Modified: branches/ros-amd64-bringup/reactos/media/inf/inf.rbuild
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/media…
==============================================================================
--- branches/ros-amd64-bringup/reactos/media/inf/inf.rbuild [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/media/inf/inf.rbuild [iso-8859-1] Sat Dec 26
07:07:38 2009
@@ -1,10 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE group SYSTEM "../../tools/rbuild/project.dtd">
<group>
+ <installfile installbase="inf">acpi.inf</installfile>
<installfile installbase="inf">audio.inf</installfile>
- <installfile installbase="inf">acpi.inf</installfile>
<installfile installbase="inf">cdrom.inf</installfile>
+ <installfile installbase="inf">cpu.inf</installfile>
<installfile installbase="inf">display.inf</installfile>
+ <installfile installbase="inf">fdc.inf</installfile>
<installfile installbase="inf">font.inf</installfile>
<installfile installbase="inf">hdc.inf</installfile>
<installfile installbase="inf">intl.inf</installfile>
@@ -21,6 +23,7 @@
<installfile installbase="inf">ports.inf</installfile>
<installfile installbase="inf">scsi.inf</installfile>
<installfile installbase="inf"
root="output">syssetup.inf</installfile>
+ <installfile installbase="inf">usb.inf</installfile>
<installfile installbase="inf">usbport.inf</installfile>
<installfile installbase="inf">usbstor.inf</installfile>
<installfile installbase="inf">xboxdisp.inf</installfile>
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.cpp [iso-8859-1]
Sat Dec 26 07:07:38 2009
@@ -365,9 +365,16 @@
GenerateTestSupportCode ();
GenerateCompilationUnitSupportCode ();
GenerateSysSetup ();
+ GenerateInstallerFileList();
GenerateProxyMakefiles ();
CheckAutomaticDependencies ();
CloseMakefile ();
+}
+
+void
+MingwBackend::GenerateInstallerFileList()
+{
+ this->ProjectNode.GenerateInstallerFileList();
}
void
@@ -1297,7 +1304,7 @@
fprintf ( fMakefile,
"\t$(ECHO_MKHIVE)\n" );
fprintf ( fMakefile,
- "\t$(MKHIVE_TARGET) boot%cbootdata %s $(ARCH)
boot%cbootdata%chiveinst_$(ARCH).inf\n",
+ "\t$(MKHIVE_TARGET) boot%cbootdata %s
boot%cbootdata%chiveinst_$(ARCH).inf\n",
cSep, GetFullPath ( system32 ).c_str (),
cSep, cSep );
fprintf ( fMakefile,
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/mingw.h [iso-8859-1] Sat
Dec 26 07:07:38 2009
@@ -119,6 +119,7 @@
bool use_pch;
bool DetectMicrosoftCompiler ( std::string& version, std::string& path );
bool DetectMicrosoftLinker ( std::string& version, std::string& path );
+ void GenerateInstallerFileList();
};
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
[iso-8859-1] Sat Dec 26 07:07:38 2009
@@ -2763,8 +2763,8 @@
const FileLocation *isoboot = bootModule->output;
// prepare reactos.dff and reactos.inf
- FileLocation reactosDff ( SourceDirectory,
- "boot" + sSep + "bootdata" + sSep +
"packages",
+ FileLocation reactosDff ( IntermediateDirectory,
+ "",
"reactos.dff" );
FileLocation reactosInf ( bootcdReactos.directory,
bootcdReactos.relative_path,
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/installfile.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/installfile.cpp [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/installfile.cpp [iso-8859-1] Sat Dec
26 07:07:38 2009
@@ -36,6 +36,11 @@
const XMLAttribute* base = node.GetAttribute ( "installbase", false );
const XMLAttribute* newname = node.GetAttribute ( "newname", false );
+ if(base)
+ installbase = base->value;
+ else
+ installbase = "";
+
DirectoryLocation source_directory = SourceDirectory;
const XMLAttribute* att = node.GetAttribute ( "root", false );
if ( att != NULL)
@@ -65,4 +70,4 @@
? newname->value
: node.value,
&node );
-}
+}
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/module.cpp [iso-8859-1] Sat Dec 26
07:07:38 2009
@@ -396,6 +396,12 @@
if ( att != NULL )
{
const XMLAttribute* installbase = moduleNode.GetAttribute ( "installbase",
false );
+
+ if(installbase)
+ this->installbase = installbase->value;
+ else
+ this->installbase = "";
+
install = new FileLocation ( InstallDirectory,
installbase ? installbase->value : "",
att->value,
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/project.cpp [iso-8859-1] Sat Dec 26
07:07:38 2009
@@ -541,3 +541,95 @@
}
return "";
}
+
+void
+Project::GenerateInstallerFileList()
+{
+ std::map<std::string, Module*> Result;
+ std::map<std::string, Module*>::iterator i;
+ std::string buffer = "";
+
+ printf ( "Generating reactos.dff..." );
+ std::string path = Environment::GetIntermediatePath();
+ path += sSep + "reactos.dff";
+ FILE* f = fopen(path.c_str(), "wb");
+
+ buffer = "; Main ReactOS package\r\n"
+ ".Set DiskLabelTemplate=\"ReactOS\" ; Label of
disk\r\n"
+ ".Set CabinetNameTemplate=\"reactos.cab\" ;
reactos.cab\r\n"
+ ".Set InfFileName=\"reactos.inf\" ;
reactos.inf\r\n"
+ ".InfBegin\r\n"
+ "[Version]\r\n"
+ "Signature = \"$ReactOS$\"\r\n"
+ "[Directories]\r\n"
+ "1 = system32\r\n"
+ "2 = system32\\drivers\r\n"
+ "3 = Fonts\r\n"
+ "4 =\r\n"
+ "5 = system32\\drivers\\etc\r\n"
+ "6 = inf\r\n"
+ "7 = bin\r\n"
+ "8 = media\r\n"
+ ".InfEnd\r\n"
+ "; Contents of disk\r\n"
+ ".InfBegin\r\n"
+ "[SourceFiles]\r\n"
+ ".InfEnd\r\n";
+ fprintf(f,buffer.c_str());
+ for(i = modules.begin(); i != modules.end(); ++i)
+ {
+ buffer = "";
+ if(i->second->install)
+ {
+ buffer = i->second->output->relative_path + sSep;
+ buffer += i->second->output->name;
+ if(i->second->installbase == "system32")
+ buffer += "\t1";
+ if(i->second->installbase == "system32/drivers")
+ buffer += "\t2";
+ else if(i->second->installbase == "fonts")
+ buffer += "\t3";
+ else if(i->second->installbase == "")
+ buffer += "\t4";
+ else if(i->second->installbase == "system32/drivers/etc")
+ buffer += "\t5";
+ else if(i->second->installbase == "inf")
+ buffer += "\t6";
+ else if(i->second->installbase == "bin")
+ buffer += "\t7";
+ else if(i->second->installbase == "media")
+ buffer += "\t8";
+
+ fprintf(f, "%s\r\n",buffer.c_str());
+ }
+ }
+
+ for(size_t j = 0; j< installfiles.size(); j++)
+ {
+ buffer = "";
+ buffer = installfiles[j]->source->relative_path + sSep;
+ buffer += installfiles[j]->target->name;
+ if(installfiles[j]->installbase == "system32")
+ buffer += "\t1";
+ if(installfiles[j]->installbase == "system32/drivers")
+ buffer += "\t2";
+ else if(installfiles[j]->installbase == "fonts")
+ buffer += "\t3";
+ else if(installfiles[j]->installbase == "")
+ buffer += "\t4";
+ else if(installfiles[j]->installbase == "system32/drivers/etc")
+ buffer += "\t5";
+ else if(installfiles[j]->installbase == "inf")
+ buffer += "\t6";
+ else if(installfiles[j]->installbase == "bin")
+ buffer += "\t7";
+ else if(installfiles[j]->installbase == "media")
+ buffer += "\t8";
+
+
+ fprintf(f,"%s\r\n",buffer.c_str());
+ }
+
+ printf ( "done\n" );
+
+}
Modified: branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rbuild/rbuild.h [iso-8859-1] Sat Dec 26
07:07:38 2009
@@ -276,6 +276,7 @@
const Property* LookupProperty ( const std::string& name ) const;
std::string GetCompilerSet () const;
std::string GetLinkerSet () const;
+ void GenerateInstallerFileList();
private:
std::string ResolveNextProperty ( const std::string& s ) const;
void ReadXml ();
@@ -400,6 +401,7 @@
bool isCRT;
std::string CRT;
bool dynamicCRT;
+ std::string installbase;
FileLocation *output; // "path/foo.exe"
FileLocation *dependency; // "path/foo.exe" or "path/libfoo.a"
FileLocation *install;
@@ -904,6 +906,7 @@
public:
FileLocation *source;
FileLocation *target;
+ std::string installbase;
InstallFile ( const Project& project,
const XMLElement& bootstrapNode,