diff --git a/reactos/lib/acledit/acledit.xml b/reactos/lib/acledit/acledit.xml
new file mode 100644
index 00000000000..c897cf6f243
--- /dev/null
+++ b/reactos/lib/acledit/acledit.xml
@@ -0,0 +1,14 @@
+
+
+ .
+
+
+
+ ntdll
+ kernel32
+ advapi32
+ user32
+ acledit.c
+ stubs.c
+ acledit.rc
+
diff --git a/reactos/lib/aclui/aclui.xml b/reactos/lib/aclui/aclui.xml
new file mode 100644
index 00000000000..ab7a25b825a
--- /dev/null
+++ b/reactos/lib/aclui/aclui.xml
@@ -0,0 +1,18 @@
+
+
+ .
+
+
+
+
+ 0x0500
+ 0x501
+ 0x0600
+ rosrtl
+ ntdll
+ kernel32
+ user32
+ comctl32
+ aclui.c
+ aclui.rc
+
diff --git a/reactos/lib/comctl32/comctl32.xml b/reactos/lib/comctl32/comctl32.xml
new file mode 100644
index 00000000000..beb58470b78
--- /dev/null
+++ b/reactos/lib/comctl32/comctl32.xml
@@ -0,0 +1,51 @@
+
+ bin2res
+ winebuild
+
+ .
+ include/wine
+
+
+
+
+ 0x600
+ 0x501
+ 0x501
+ wine
+ ntdll
+ kernel32
+ advapi32
+ gdi32
+ user32
+ winmm
+ animate.c
+ comboex.c
+ comctl32undoc.c
+ commctrl.c
+ datetime.c
+ draglist.c
+ flatsb.c
+ header.c
+ hotkey.c
+ imagelist.c
+ ipaddress.c
+ listview.c
+ monthcal.c
+ nativefont.c
+ pager.c
+ progress.c
+ propsheet.c
+ rebar.c
+ smoothscroll.c
+ string.c
+ status.c
+ syslink.c
+ tab.c
+ toolbar.c
+ tooltips.c
+ trackbar.c
+ treeview.c
+ updown.c
+ rsrc.rc
+ comctl32.spec
+
diff --git a/reactos/lib/comctl32/idb_hist_large.bmp b/reactos/lib/comctl32/idb_hist_large.bmp
new file mode 100644
index 00000000000..20596fac20a
Binary files /dev/null and b/reactos/lib/comctl32/idb_hist_large.bmp differ
diff --git a/reactos/lib/comctl32/idb_hist_small.bmp b/reactos/lib/comctl32/idb_hist_small.bmp
new file mode 100644
index 00000000000..3cc2ab4e51a
Binary files /dev/null and b/reactos/lib/comctl32/idb_hist_small.bmp differ
diff --git a/reactos/lib/comctl32/idb_std_large.bmp b/reactos/lib/comctl32/idb_std_large.bmp
new file mode 100644
index 00000000000..4f0e09e7e2e
Binary files /dev/null and b/reactos/lib/comctl32/idb_std_large.bmp differ
diff --git a/reactos/lib/comctl32/idb_std_small.bmp b/reactos/lib/comctl32/idb_std_small.bmp
new file mode 100644
index 00000000000..8318e447fe2
Binary files /dev/null and b/reactos/lib/comctl32/idb_std_small.bmp differ
diff --git a/reactos/lib/comctl32/idb_view_large.bmp b/reactos/lib/comctl32/idb_view_large.bmp
new file mode 100644
index 00000000000..6331b5eb691
Binary files /dev/null and b/reactos/lib/comctl32/idb_view_large.bmp differ
diff --git a/reactos/lib/comctl32/idb_view_small.bmp b/reactos/lib/comctl32/idb_view_small.bmp
new file mode 100644
index 00000000000..d1632f207b4
Binary files /dev/null and b/reactos/lib/comctl32/idb_view_small.bmp differ
diff --git a/reactos/lib/comctl32/idc_copy.cur b/reactos/lib/comctl32/idc_copy.cur
new file mode 100644
index 00000000000..e4b702162fa
Binary files /dev/null and b/reactos/lib/comctl32/idc_copy.cur differ
diff --git a/reactos/lib/comctl32/idc_divider.cur b/reactos/lib/comctl32/idc_divider.cur
new file mode 100644
index 00000000000..9d679c96b28
Binary files /dev/null and b/reactos/lib/comctl32/idc_divider.cur differ
diff --git a/reactos/lib/comctl32/idc_divideropen.cur b/reactos/lib/comctl32/idc_divideropen.cur
new file mode 100644
index 00000000000..9adc9454732
Binary files /dev/null and b/reactos/lib/comctl32/idc_divideropen.cur differ
diff --git a/reactos/lib/comctl32/idc_movebutton.cur b/reactos/lib/comctl32/idc_movebutton.cur
new file mode 100644
index 00000000000..8ce16d26261
Binary files /dev/null and b/reactos/lib/comctl32/idc_movebutton.cur differ
diff --git a/reactos/lib/comctl32/idi_dragarrow.ico b/reactos/lib/comctl32/idi_dragarrow.ico
new file mode 100644
index 00000000000..bba46b2966d
Binary files /dev/null and b/reactos/lib/comctl32/idi_dragarrow.ico differ
diff --git a/reactos/lib/comctl32/idi_tt_error_sm.ico b/reactos/lib/comctl32/idi_tt_error_sm.ico
new file mode 100644
index 00000000000..523c7fc57f3
Binary files /dev/null and b/reactos/lib/comctl32/idi_tt_error_sm.ico differ
diff --git a/reactos/lib/comctl32/idi_tt_info_sm.ico b/reactos/lib/comctl32/idi_tt_info_sm.ico
new file mode 100644
index 00000000000..80bcf36ed9d
Binary files /dev/null and b/reactos/lib/comctl32/idi_tt_info_sm.ico differ
diff --git a/reactos/lib/comctl32/idi_tt_warn_sm.ico b/reactos/lib/comctl32/idi_tt_warn_sm.ico
new file mode 100644
index 00000000000..4fab813c4d6
Binary files /dev/null and b/reactos/lib/comctl32/idi_tt_warn_sm.ico differ
diff --git a/reactos/lib/comctl32/idt_check.bmp b/reactos/lib/comctl32/idt_check.bmp
new file mode 100644
index 00000000000..7344a646e93
Binary files /dev/null and b/reactos/lib/comctl32/idt_check.bmp differ
diff --git a/reactos/lib/directory.xml b/reactos/lib/directory.xml
index 4700dc1fd78..9309a001c74 100644
--- a/reactos/lib/directory.xml
+++ b/reactos/lib/directory.xml
@@ -1,9 +1,18 @@
+
+
+
+
+
+
+
+
+
@@ -46,6 +55,9 @@
+
+
+
diff --git a/reactos/lib/winmm/winmm.xml b/reactos/lib/winmm/winmm.xml
new file mode 100644
index 00000000000..fb3abae618d
--- /dev/null
+++ b/reactos/lib/winmm/winmm.xml
@@ -0,0 +1,29 @@
+
+ bin2res
+ winebuild
+
+ .
+ include/wine
+
+
+
+
+ 0x600
+ 0x501
+ 0x501
+ wine
+ ntdll
+ kernel32
+ advapi32
+ user32
+ driver.c
+ joystick.c
+ lolvldrv.c
+ mci.c
+ mmio.c
+ playsound.c
+ time.c
+ winmm.c
+ winmm_res.rc
+ winmm.spec
+
diff --git a/reactos/tools/bin2res/bin2res.xml b/reactos/tools/bin2res/bin2res.xml
new file mode 100644
index 00000000000..fb64b8d1353
--- /dev/null
+++ b/reactos/tools/bin2res/bin2res.xml
@@ -0,0 +1,6 @@
+
+ include/wine
+
+ bin2res.c
+ mkstemps.c
+
diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp
index 1eff40f3c75..a4d0a7141e7 100644
--- a/reactos/tools/rbuild/backend/mingw/mingw.cpp
+++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp
@@ -184,6 +184,7 @@ MingwBackend::GenerateGlobalVariables ()
fprintf ( fMakefile, "mkdir = tools%crmkdir\n", CSEP );
fprintf ( fMakefile, "NUL=NUL\n" );
fprintf ( fMakefile, "winebuild = tools" SSEP "winebuild" SSEP "winebuild\n" );
+ fprintf ( fMakefile, "bin2res = tools" SSEP "winebuild" SSEP "bin2res\n" );
fprintf ( fMakefile, "\n" );
GenerateGlobalCFlagsAndProperties (
"=",
@@ -197,13 +198,12 @@ MingwBackend::GenerateGlobalVariables ()
fprintf ( fMakefile, "\n" );
fprintf ( fMakefile, ".PHONY: clean\n\n" );
- //fprintf ( fMakefile, "clean:\n\t-@${rm} $(PROJECT_CLEAN)\n\n" );
}
void
MingwBackend::GenerateAllTarget ()
{
- fprintf ( fMakefile, "all:" );
+ fprintf ( fMakefile, "all:" );
for ( size_t i = 0; i < ProjectNode.modules.size (); i++ )
{
Module& module = *ProjectNode.modules[i];
@@ -227,5 +227,5 @@ MingwBackend::ProcessModule ( Module& module )
string
FixupTargetFilename ( const string& targetFilename )
{
- return string("$(ROS_INTERMEDIATE)") + targetFilename;
+ return string("$(ROS_INTERMEDIATE)") + NormalizeFilename ( targetFilename );
}
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
index 46da3830543..c16173f7a6e 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
@@ -136,6 +136,16 @@ MingwModuleHandler::GetModuleArchiveFilename ( const Module& module ) const
".a" );
}
+bool
+MingwModuleHandler::IsGeneratedFile ( const File& file ) const
+{
+ string extension = GetExtension ( file.name );
+ if ( extension == ".spec" || extension == "SPEC" )
+ return true;
+ else
+ return false;
+}
+
string
MingwModuleHandler::GetImportLibraryDependencies ( const Module& module ) const
{
@@ -191,13 +201,17 @@ MingwModuleHandler::GetAllDependencies ( const Module& module ) const
}
string
-MingwModuleHandler::GetSourceFilenames ( const Module& module ) const
+MingwModuleHandler::GetSourceFilenames ( const Module& module,
+ bool includeGeneratedFiles ) const
{
size_t i;
string sourceFilenames ( "" );
for ( i = 0; i < module.files.size (); i++ )
- sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name );
+ {
+ if ( includeGeneratedFiles || !IsGeneratedFile ( *module.files[i] ) )
+ sourceFilenames += " " + GetActualSourceFilename ( module.files[i]->name );
+ }
vector ifs = module.ifs;
for ( i = 0; i < ifs.size(); i++ )
{
@@ -206,11 +220,28 @@ MingwModuleHandler::GetSourceFilenames ( const Module& module ) const
for ( j = 0; j < rIf.ifs.size(); j++ )
ifs.push_back ( rIf.ifs[j] );
for ( j = 0; j < rIf.files.size(); j++ )
- sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name );
+ {
+ if ( includeGeneratedFiles || !IsGeneratedFile ( *rIf.files[j] ) )
+ sourceFilenames += " " + GetActualSourceFilename ( rIf.files[j]->name );
+ }
}
return sourceFilenames;
}
+string
+MingwModuleHandler::GetSourceFilenames ( const Module& module ) const
+{
+ return GetSourceFilenames ( module,
+ true );
+}
+
+string
+MingwModuleHandler::GetSourceFilenamesWithoutGeneratedFiles ( const Module& module ) const
+{
+ return GetSourceFilenames ( module,
+ false );
+}
+
string
MingwModuleHandler::GetObjectFilename ( const string& sourceFilename ) const
{
@@ -1009,7 +1040,7 @@ MingwModuleHandler::GetInvocationParameters ( const Invoke& invoke ) const
parameters += invokeFile.switches;
parameters += " ";
}
- parameters += invokeFile.name;
+ parameters += invokeFile.name ;
}
return parameters;
@@ -1033,20 +1064,20 @@ MingwModuleHandler::GenerateInvocations ( const Module& module ) const
string invokeTarget = module.GetInvocationTarget ( i );
fprintf ( fMakefile,
- "%s: %s\n\n",
- invoke.GetTargets ().c_str (),
+ ".PHONY: %s\n\n",
invokeTarget.c_str () );
fprintf ( fMakefile,
- "%s: %s\n",
+ "%s: %s\n\n",
invokeTarget.c_str (),
+ invoke.GetTargets ().c_str () );
+ fprintf ( fMakefile,
+ "%s: %s\n",
+ invoke.GetTargets ().c_str (),
FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str () );
fprintf ( fMakefile,
"\t%s %s\n\n",
FixupTargetFilename ( invoke.invokeModule->GetPath () ).c_str (),
GetInvocationParameters ( invoke ).c_str () );
- fprintf ( fMakefile,
- ".PNONY: %s\n\n",
- invokeTarget.c_str () );
}
}
@@ -1061,7 +1092,7 @@ void
MingwModuleHandler::GeneratePreconditionDependencies ( const Module& module ) const
{
string preconditionDependenciesName = GetPreconditionDependenciesName ( module );
- string sourceFilenames = GetSourceFilenames ( module );
+ string sourceFilenames = GetSourceFilenamesWithoutGeneratedFiles ( module );
string dependencies = GetModuleDependencies ( module );
string s = GetInvocationDependencies ( module );
if ( s.length () > 0 )
@@ -1330,10 +1361,10 @@ MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ( const Modul
}
else
{
- fprintf ( fMakefile, "%s:\n",
- target.c_str ());
fprintf ( fMakefile, ".PHONY: %s\n\n",
target.c_str ());
+ fprintf ( fMakefile, "%s:\n",
+ target.c_str ());
}
}
@@ -1385,10 +1416,10 @@ MingwKernelModeDriverModuleHandler::GenerateKernelModeDriverModuleTarget ( const
}
else
{
- fprintf ( fMakefile, "%s:\n",
- target.c_str () );
fprintf ( fMakefile, ".PHONY: %s\n\n",
target.c_str ());
+ fprintf ( fMakefile, "%s:\n",
+ target.c_str () );
}
}
@@ -1447,10 +1478,10 @@ MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ( const Module& modul
}
else
{
- fprintf ( fMakefile, "%s:\n\n",
- target.c_str ());
fprintf ( fMakefile, ".PHONY: %s\n\n",
target.c_str ());
+ fprintf ( fMakefile, "%s:\n\n",
+ target.c_str ());
}
}
@@ -1465,11 +1496,33 @@ MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler ()
void
MingwWin32DLLModuleHandler::Process ( const Module& module )
{
+ GenerateExtractWineDLLResourcesTarget ( module );
GeneratePreconditionDependencies ( module );
GenerateWin32DLLModuleTarget ( module );
GenerateInvocations ( module );
}
+void
+MingwWin32DLLModuleHandler::GenerateExtractWineDLLResourcesTarget ( const Module& module )
+{
+ fprintf ( fMakefile, ".PHONY: %s_extractresources\n\n",
+ module.name.c_str () );
+ fprintf ( fMakefile, "%s_extractresources: bin2res\n",
+ module.name.c_str () );
+ for ( size_t i = 0; i < module.files.size (); i++ )
+ {
+ File& file = *module.files[i];
+ string extension = GetExtension ( file.name );
+ if ( extension == ".rc" || extension == ".RC" )
+ {
+ string resource = FixupTargetFilename ( file.name );
+ fprintf ( fMakefile, "\t@echo ${bin2res} -f -x %s\n",
+ resource.c_str () );
+ }
+ }
+ fprintf ( fMakefile, "\n");
+}
+
void
MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module )
{
@@ -1497,10 +1550,10 @@ MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ( const Module& module
}
else
{
- fprintf ( fMakefile, "%s:\n\n",
- target.c_str ());
fprintf ( fMakefile, ".PHONY: %s\n\n",
- target.c_str ());
+ target.c_str () );
+ fprintf ( fMakefile, "%s:\n\n",
+ target.c_str () );
}
}
@@ -1548,9 +1601,9 @@ MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ( const Module& module
}
else
{
- fprintf ( fMakefile, "%s:\n\n",
- target.c_str ());
fprintf ( fMakefile, ".PHONY: %s\n\n",
target.c_str ());
+ fprintf ( fMakefile, "%s:\n\n",
+ target.c_str ());
}
}
diff --git a/reactos/tools/rbuild/backend/mingw/modulehandler.h b/reactos/tools/rbuild/backend/mingw/modulehandler.h
index abed79844aa..93c7d3a00d1 100644
--- a/reactos/tools/rbuild/backend/mingw/modulehandler.h
+++ b/reactos/tools/rbuild/backend/mingw/modulehandler.h
@@ -19,7 +19,7 @@ public:
void GenerateDirectoryTargets () const;
protected:
- const std::string &PassThruCacheDirectory ( const std::string &f ) const;
+ const std::string &PassThruCacheDirectory ( const std::string &f ) const;
std::string GetWorkingDirectory () const;
std::string GetDirectory (const std::string& filename ) const;
std::string GetExtension ( const std::string& filename ) const;
@@ -28,10 +28,14 @@ protected:
const std::string& newExtension ) const;
std::string GetActualSourceFilename ( const std::string& filename ) const;
std::string GetModuleArchiveFilename ( const Module& module ) const;
+ bool IsGeneratedFile ( const File& file ) const;
std::string GetImportLibraryDependencies ( const Module& module ) const;
std::string GetModuleDependencies ( const Module& module ) const;
std::string GetAllDependencies ( const Module& module ) const;
+ std::string GetSourceFilenames ( const Module& module,
+ bool includeGeneratedFiles ) const;
std::string GetSourceFilenames ( const Module& module ) const;
+ std::string GetSourceFilenamesWithoutGeneratedFiles ( const Module& module ) const;
std::string GetObjectFilename ( const std::string& sourceFilename ) const;
std::string GetObjectFilenames ( const Module& module ) const;
@@ -54,7 +58,7 @@ protected:
std::string GetDefinitionDependencies ( const Module& module ) const;
std::string GetLinkingDependencies ( const Module& module ) const;
static FILE* fMakefile;
- static std::set directory_set;
+ static std::set directory_set;
private:
std::string ConcatenatePaths ( const std::string& path1,
const std::string& path2 ) const;
@@ -202,6 +206,7 @@ public:
MingwWin32DLLModuleHandler ();
virtual void Process ( const Module& module );
private:
+ void GenerateExtractWineDLLResourcesTarget ( const Module& module );
void GenerateWin32DLLModuleTarget ( const Module& module );
};
diff --git a/reactos/tools/rbuild/makefile b/reactos/tools/rbuild/makefile
index 1bae560b0cb..ff1d057df9d 100644
--- a/reactos/tools/rbuild/makefile
+++ b/reactos/tools/rbuild/makefile
@@ -30,6 +30,7 @@ OBJECTS = $(BASE_OBJECTS) rbuild.o
TESTS = \
tests/definetest.o \
+ tests/functiontest.o \
tests/iftest.o \
tests/includetest.o \
tests/invoketest.o \
diff --git a/reactos/tools/rbuild/module.cpp b/reactos/tools/rbuild/module.cpp
index 29b9af4ef9d..e30dbc24884 100644
--- a/reactos/tools/rbuild/module.cpp
+++ b/reactos/tools/rbuild/module.cpp
@@ -21,6 +21,15 @@ FixSeparator ( const string& s )
return s2;
}
+string
+NormalizeFilename ( const string& filename )
+{
+ Path path;
+ string normalizedPath = path.Fixup ( filename, true );
+ string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath );
+ return FixSeparator ( relativeNormalizedPath );
+}
+
Module::Module ( const Project& project,
const XMLElement& moduleNode,
const string& modulePath )
@@ -449,7 +458,7 @@ Invoke::GetTargets () const
InvokeFile& file = *output[i];
if ( targets.length () > 0 )
targets += " ";
- targets += file.name;
+ targets += NormalizeFilename ( file.name );
}
return targets;
}
diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h
index 864a975dcd9..176d0d1350c 100644
--- a/reactos/tools/rbuild/rbuild.h
+++ b/reactos/tools/rbuild/rbuild.h
@@ -315,4 +315,7 @@ public:
extern std::string
FixSeparator ( const std::string& s );
+extern std::string
+NormalizeFilename ( const std::string& filename );
+
#endif /* __RBUILD_H */
diff --git a/reactos/tools/rbuild/test.h b/reactos/tools/rbuild/test.h
index 340230da9a4..b25a6fb7f27 100644
--- a/reactos/tools/rbuild/test.h
+++ b/reactos/tools/rbuild/test.h
@@ -2,6 +2,7 @@
#define __TEST_H
#include "rbuild.h"
+#include "backend/mingw/mingw.h"
class BaseTest
{
@@ -95,4 +96,10 @@ public:
void Run();
};
+class FunctionTest : public BaseTest
+{
+public:
+ void Run();
+};
+
#endif /* __TEST_H */
diff --git a/reactos/tools/rbuild/tests/alltests.cpp b/reactos/tools/rbuild/tests/alltests.cpp
index c01cbab13c3..1ceeb4d5b67 100644
--- a/reactos/tools/rbuild/tests/alltests.cpp
+++ b/reactos/tools/rbuild/tests/alltests.cpp
@@ -176,6 +176,7 @@ private:
tests.push_back(new InvokeTest());
tests.push_back(new LinkerFlagTest());
tests.push_back(new IfTest());
+ tests.push_back(new FunctionTest());
}
};
diff --git a/reactos/tools/rbuild/tests/functiontest.cpp b/reactos/tools/rbuild/tests/functiontest.cpp
new file mode 100644
index 00000000000..e2b3128e399
--- /dev/null
+++ b/reactos/tools/rbuild/tests/functiontest.cpp
@@ -0,0 +1,9 @@
+#include "test.h"
+
+using std::string;
+
+void FunctionTest::Run ()
+{
+ string fixedupFilename = FixupTargetFilename ( "." SSEP "dir1" SSEP "dir2" SSEP ".." SSEP "filename.txt" );
+ ARE_EQUAL ( "$(ROS_INTERMEDIATE)dir1" SSEP "filename.txt", fixedupFilename );
+}
diff --git a/reactos/tools/tools.xml b/reactos/tools/tools.xml
index a807939c9cb..5d648bebdaa 100644
--- a/reactos/tools/tools.xml
+++ b/reactos/tools/tools.xml
@@ -1,3 +1,6 @@
+
+
+
.
buildno.c