Add the files where they are located Modified: branches/xmlbuildsystem/reactos/Makefile Modified: branches/xmlbuildsystem/reactos/subsys/system/directory.xml Modified: branches/xmlbuildsystem/reactos/tools/cabman/cabinet.cxx Modified: branches/xmlbuildsystem/reactos/tools/cabman/dfp.cxx Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp _____
Modified: branches/xmlbuildsystem/reactos/Makefile --- branches/xmlbuildsystem/reactos/Makefile 2005-04-06 20:49:49 UTC (rev 14532) +++ branches/xmlbuildsystem/reactos/Makefile 2005-04-06 22:27:22 UTC (rev 14533) @@ -181,7 +181,7 @@
ifneq ($(ROS_TEMPORARY),) TEMPORARY := $(ROS_TEMPORARY) else - TEMPORARY := . + TEMPORARY := endif TEMPORARY_ := $(TEMPORARY)$(SEP)
_____
Modified: branches/xmlbuildsystem/reactos/subsys/system/directory.xml --- branches/xmlbuildsystem/reactos/subsys/system/directory.xml 2005-04-06 20:49:49 UTC (rev 14532) +++ branches/xmlbuildsystem/reactos/subsys/system/directory.xml 2005-04-06 22:27:22 UTC (rev 14533) @@ -31,6 +31,9 @@
<directory name="reporterror"> <xi:include href="reporterror/reporterror.xml" /> </directory> +<directory name="rundll32"> + <xi:include href="rundll32/rundll32.xml" /> +</directory> <directory name="services"> <xi:include href="services/services.xml" /> </directory> _____
Modified: branches/xmlbuildsystem/reactos/tools/cabman/cabinet.cxx --- branches/xmlbuildsystem/reactos/tools/cabman/cabinet.cxx 2005-04-06 20:49:49 UTC (rev 14532) +++ branches/xmlbuildsystem/reactos/tools/cabman/cabinet.cxx 2005-04-06 22:27:22 UTC (rev 14533) @@ -1755,23 +1755,20 @@
{ FILEHANDLE SrcFile; PCFFILE_NODE FileNode; + char* NewFileName;
- FileNode = NewFileNode(); - if (!FileNode) { + NewFileName = (char*)AllocateMemory(strlen(FileName) + 1); + if (!NewFileName) { DPRINT(MIN_TRACE, ("Insufficient memory.\n")); return CAB_STATUS_NOMEMORY; } + strcpy(NewFileName, FileName); + ConvertPath(NewFileName, false);
- FileNode->FolderNode = CurrentFolderNode; - - FileNode->FileName = (char*)AllocateMemory(strlen(FileName) + 1); - strcpy(FileNode->FileName, FileName); - ConvertPath(FileNode->FileName, false); - /* Try to open file */ #if defined(WIN32) SrcFile = CreateFile( - FileNode->FileName, // Open this file + NewFileName, // Open this file GENERIC_READ, // Open for reading FILE_SHARE_READ, // Share for reading NULL, // No security @@ -1779,21 +1776,34 @@ FILE_ATTRIBUTE_NORMAL, // Normal file NULL); // No attribute template if (SrcFile == INVALID_HANDLE_VALUE) { - DPRINT(MID_TRACE, ("File not found (%s).\n", FileNode->FileName)); + DPRINT(MID_TRACE, ("File not found (%s).\n", NewFileName)); + FreeMemory(NewFileName); return CAB_STATUS_CANNOT_OPEN; } #else /* !WIN32 */ - SrcFile = fopen(FileNode->FileName, "rb"); + SrcFile = fopen(NewFileName, "rb"); if (SrcFile == NULL) { - DPRINT(MID_TRACE, ("File not found (%s).\n", FileNode->FileName)); + DPRINT(MID_TRACE, ("File not found (%s).\n", NewFileName)); + FreeMemory(NewFileName); return CAB_STATUS_CANNOT_OPEN; } #endif
+ FileNode = NewFileNode(); + if (!FileNode) { + DPRINT(MIN_TRACE, ("Insufficient memory.\n")); + FreeMemory(NewFileName); + return CAB_STATUS_NOMEMORY; + } + + FileNode->FolderNode = CurrentFolderNode; + FileNode->FileName = NewFileName; + /* FIXME: Check for and handle large files (>= 2GB) */ FileNode->File.FileSize = GetSizeOfFile(SrcFile); if (FileNode->File.FileSize == (unsigned long)-1) { DPRINT(MIN_TRACE, ("Cannot read from file.\n")); + FreeMemory(NewFileName); return CAB_STATUS_CANNOT_READ; }
_____
Modified: branches/xmlbuildsystem/reactos/tools/cabman/dfp.cxx --- branches/xmlbuildsystem/reactos/tools/cabman/dfp.cxx 2005-04-06 20:49:49 UTC (rev 14532) +++ branches/xmlbuildsystem/reactos/tools/cabman/dfp.cxx 2005-04-06 22:27:22 UTC (rev 14533) @@ -1016,8 +1016,9 @@
char SrcName[MAX_PATH]; char DstName[MAX_PATH]; char InfLine[MAX_PATH]; + char BaseFilename[MAX_PATH];
- strcpy(SrcName, FileRelativePath); + strcpy(SrcName, ""); strcpy(DstName, "");
i = CurrentChar; @@ -1031,7 +1032,8 @@ CurrentString[i] = '\0'; CurrentToken = TokenString; CurrentChar = i + 1; - strcat(SrcName, CurrentString); + strcpy(BaseFilename, CurrentString); + strcat(SrcName, BaseFilename);
SkipSpaces();
@@ -1080,6 +1082,11 @@ WriteInfLine(InfLine);
Status = AddFile(SrcName); + if (Status == CAB_STATUS_CANNOT_OPEN) { + strcpy(SrcName, FileRelativePath); + strcat(SrcName, BaseFilename); + Status = AddFile(SrcName); + } if (Status != CAB_STATUS_SUCCESS) { if (Status == CAB_STATUS_CANNOT_OPEN) printf("File does not exist: %s.\n", SrcName); _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-04-06 20:49:49 UTC (rev 14532) +++ branches/xmlbuildsystem/reactos/tools/rbuild/backend/mingw/modulehandler .cpp 2005-04-06 22:27:22 UTC (rev 14533) @@ -2195,6 +2195,9 @@
const Module& m = *module.project.modules[i]; if ( m.bootstrap != NULL ) { + string sourceFilename = PassThruCacheDirectory ( + NormalizeFilename ( m.GetPath () ), + backend->outputDirectory ); string targetFilenameNoFixup ( bootcdDirectory + SSEP + m.bootstrap->base + SSEP + m.bootstrap->nameoncd ); string targetFilename = MingwModuleHandler::PassThruCacheDirectory ( NormalizeFilename ( targetFilenameNoFixup ), @@ -2203,7 +2206,7 @@ "\t$(ECHO_CP)\n" ); fprintf ( fMakefile, "\t${cp} %s %s 1>$(NUL)\n", - m.GetPath ().c_str (), + sourceFilename.c_str (), targetFilename.c_str () ); } } @@ -2314,16 +2317,21 @@ MingwIsoModuleHandler::GenerateIsoModuleTarget () { string bootcdDirectory = "cd"; + string bootcd = PassThruCacheDirectory ( + NormalizeFilename ( bootcdDirectory + SSEP ), + backend->outputDirectory ); string isoboot = PassThruCacheDirectory ( - NormalizeFilename ( "boot/freeldr/bootsect/isoboot.o" ), - backend->intermediateDirectory ); - string bootcdReactosNoFixup = bootcdDirectory + "/reactos"; + NormalizeFilename ( "boot" SSEP "freeldr" SSEP "bootsect" SSEP "isoboot.o" ), + backend->outputDirectory ); + string bootcdReactosNoFixup = bootcdDirectory + SSEP "reactos"; string bootcdReactos = PassThruCacheDirectory ( NormalizeFilename ( bootcdReactosNoFixup ), backend->outputDirectory ); CLEAN_FILE ( bootcdReactos ); - string reactosInf = ros_temp + NormalizeFilename ( bootcdReactosNoFixup + "/reactos.inf" ); - string reactosDff = NormalizeFilename ( "bootdata/packages/reactos.dff" ); + string reactosInf = PassThruCacheDirectory ( + NormalizeFilename ( bootcdReactosNoFixup + SSEP "reactos.inf" ), + backend->outputDirectory ); + string reactosDff = NormalizeFilename ( "bootdata" SSEP "packages" SSEP "reactos.dff" ); string cdDirectories = GetCdDirectories ( bootcdDirectory ); vector<string> vCdFiles; GetCdFiles ( vCdFiles ); @@ -2340,7 +2348,7 @@ cdFiles.c_str () ); fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" ); fprintf ( fMakefile, - "\t$(Q)$(CABMAN_TARGET) -C %s -L %s -I\n", + "\t$(Q)$(CABMAN_TARGET) -C %s -L %s -I -P $(OUTPUT)\n", reactosDff.c_str (), bootcdReactos.c_str () ); fprintf ( fMakefile, @@ -2357,7 +2365,7 @@ fprintf ( fMakefile, "\t$(Q)$(CDMAKE_TARGET) -v -m -b %s %s REACTOS ReactOS.iso\n", isoboot.c_str (), - bootcdDirectory.c_str () ); + bootcd.c_str () ); fprintf ( fMakefile, "\n" ); }