Author: janderwald
Date: Sat Oct 21 12:34:00 2006
New Revision: 24589
URL:
http://svn.reactos.org/svn/reactos?rev=24589&view=rev
Log:
- give sysreg a makefile
- allow compilation with gcc 4.1.1
- temporary disable execution of emulator command
- lets start testing :)
Added:
trunk/reactos/tools/sysreg/sysreg.mak (with props)
Modified:
trunk/reactos/tools/sysreg/comp_factory.h
trunk/reactos/tools/sysreg/pipe_reader.cpp
trunk/reactos/tools/sysreg/reg_test.h
trunk/reactos/tools/sysreg/rosboot_test.cpp
trunk/reactos/tools/sysreg/sym_file.cpp
trunk/reactos/tools/sysreg/sysreg.cpp
trunk/reactos/tools/tools.mak
Modified: trunk/reactos/tools/sysreg/comp_factory.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/comp_factory.…
==============================================================================
--- trunk/reactos/tools/sysreg/comp_factory.h (original)
+++ trunk/reactos/tools/sysreg/comp_factory.h Sat Oct 21 12:34:00 2006
@@ -18,7 +18,21 @@
{
using std::map;
using std::vector;
- using std::endl;
+
+#ifdef UNICODE
+
+ using std::wcout;
+ using std::endl;
+
+#define cout wcout;
+
+#else
+
+ using std::cout;
+ using std::endl;
+
+#endif
+
//----------------------------------------------------------
///
/// ComponentFactoryTemplate
Modified: trunk/reactos/tools/sysreg/pipe_reader.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.c…
==============================================================================
--- trunk/reactos/tools/sysreg/pipe_reader.cpp (original)
+++ trunk/reactos/tools/sysreg/pipe_reader.cpp Sat Oct 21 12:34:00 2006
@@ -73,7 +73,7 @@
int res = _pclose(m_File);
- if (res == UINT_MAX)
+ if (res == INT_MAX)
{
cerr << "Error: _pclose failed " <<endl;
return false;
Modified: trunk/reactos/tools/sysreg/reg_test.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/reg_test.h?re…
==============================================================================
--- trunk/reactos/tools/sysreg/reg_test.h (original)
+++ trunk/reactos/tools/sysreg/reg_test.h Sat Oct 21 12:34:00 2006
@@ -84,4 +84,4 @@
} // end of namespace Sysreg_
-#endif
+#endif
Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
==============================================================================
--- trunk/reactos/tools/sysreg/rosboot_test.cpp (original)
+++ trunk/reactos/tools/sysreg/rosboot_test.cpp Sat Oct 21 12:34:00 2006
@@ -258,13 +258,14 @@
{
PipeReader pipe_reader;
+#if 0
_tremove(debug_log.c_str ());
if (!pipe_reader.openPipe(boot_cmd, string(_T("rt"))))
{
cerr << "Error: failed to open pipe with cmd: " << boot_cmd
<< endl;
return false;
}
-
+#endif
// FIXXME
// give the emulator some time to load freeloadr
_sleep( (clock_t)4 * CLOCKS_PER_SEC );
@@ -281,8 +282,11 @@
TCHAR szBuffer[150];
bool ret = true;
vector<string> vect;
-
+#if 0
while(!pipe_reader.isEof ())
+#else
+ while(!feof(file))
+#endif
{
if (_fgetts(szBuffer, sizeof(szBuffer) / sizeof(TCHAR), file))
{
@@ -300,9 +304,10 @@
}
}
}
-
+#if 0
pipe_reader.closePipe ();
+#endif
return ret;
}
-} // end of namespace Sysreg_
+} // end of namespace Sysreg_
Modified: trunk/reactos/tools/sysreg/sym_file.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sym_file.cpp?…
==============================================================================
--- trunk/reactos/tools/sysreg/sym_file.cpp (original)
+++ trunk/reactos/tools/sysreg/sym_file.cpp Sat Oct 21 12:34:00 2006
@@ -88,8 +88,8 @@
string val = current_dir;
val.insert (val.length()-1, _T("\\*"));
- struct _tfinddata64i32_t c_file;
- intptr_t hFile = _tfindfirst64i32(val.c_str(), &c_file);
+ struct _tfinddatai64_t c_file;
+ intptr_t hFile = _tfindfirsti64(val.c_str(), &c_file);
if (hFile == -1L)
{
@@ -130,7 +130,7 @@
}
}
- }while(_tfindnext(hFile, &c_file) == 0);
+ }while(_tfindnexti64(hFile, &c_file) == 0);
_findclose(hFile);
hFile = -1L;
@@ -141,7 +141,7 @@
vect.erase (vect.begin());
val = current_dir;
val.insert (val.length() -1, _T("\\*"));
- hFile = _tfindfirst64i32(val.c_str(), &c_file);
+ hFile = _tfindfirsti64(val.c_str(), &c_file);
if (hFile != -1L)
{
break;
@@ -208,4 +208,4 @@
return true;
}
-} // end of namespace System_
+} // end of namespace System_
Modified: trunk/reactos/tools/sysreg/sysreg.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.cpp?re…
==============================================================================
--- trunk/reactos/tools/sysreg/sysreg.cpp (original)
+++ trunk/reactos/tools/sysreg/sysreg.cpp Sat Oct 21 12:34:00 2006
@@ -23,6 +23,7 @@
#else
using std::cerr;
+ using std::cout;
using std::endl;
#endif
@@ -95,4 +96,4 @@
}
return 0;
-}
+}
Added: trunk/reactos/tools/sysreg/sysreg.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.mak?re…
==============================================================================
--- trunk/reactos/tools/sysreg/sysreg.mak (added)
+++ trunk/reactos/tools/sysreg/sysreg.mak Sat Oct 21 12:34:00 2006
@@ -1,0 +1,72 @@
+SYSREGBUILD_BASE = $(TOOLS_BASE)$(SEP)sysreg
+SYSREGBUILD_BASE_ = $(SYSREGBUILD_BASE)$(SEP)
+SYSREGBUILD_INT = $(INTERMEDIATE_)$(SYSREGBUILD_BASE)
+SYSREGBUILD_INT_ = $(SYSREGBUILD_INT)$(SEP)
+SYSREGBUILD_OUT = $(OUTPUT_)$(SYSREGBUILD_BASE)
+SYSREGBUILD_OUT_ = $(SYSREGBUILD_OUT)$(SEP)
+
+$(SYSREGBUILD_INT): | $(TOOLS_INT)
+ $(ECHO_MKDIR)
+ ${mkdir} $@
+
+ifneq ($(INTERMEDIATE),$(OUTPUT))
+$(SYSREGBUILD_OUT): | $(TOOLS_OUT)
+ $(ECHO_MKDIR)
+ ${mkdir} $@
+endif
+
+SYSREGBUILD_TARGET = \
+ $(EXEPREFIX)$(SYSREGBUILD_OUT_)sysreg$(EXEPOSTFIX)
+
+SYSREGBUILD_SOURCES = $(addprefix $(SYSREGBUILD_BASE_),\
+ conf_parser.cpp \
+ env_var.cpp \
+ pipe_reader.cpp \
+ rosboot_test.cpp \
+ sym_file.cpp \
+ sysreg.cpp \
+ )
+
+SYSREGBUILD_OBJECTS = \
+ $(addprefix $(INTERMEDIATE_), $(SYSREGBUILD_SOURCES:.cpp=.o))
+
+SYSREGBUILD_HOST_CFLAGS = $(TOOLS_CPPFLAGS) -D__USE_W32API -Iinclude -Iinclude/reactos
-Iinclude/psdk
+
+SYSREGBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS)
+
+.PHONY: sysreg
+sysreg: $(SYSREGBUILD_TARGET)
+host_gpp += -g
+
+$(SYSREGBUILD_TARGET): $(SYSREGBUILD_OBJECTS) | $(SYSREGBUILD_OUT)
+ $(ECHO_LD)
+ ${host_gpp} $(SYSREGBUILD_OBJECTS) $(SYSREGBUILD_HOST_LFLAGS) -o $@
+
+$(SYSREGBUILD_INT_)conf_parser.o: $(SYSREGBUILD_BASE_)conf_parser.cpp |
$(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+$(SYSREGBUILD_INT_)env_var.o: $(SYSREGBUILD_BASE_)env_var.cpp | $(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+$(SYSREGBUILD_INT_)pipe_reader.o: $(SYSREGBUILD_BASE_)pipe_reader.cpp |
$(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+$(SYSREGBUILD_INT_)rosboot_test.o: $(SYSREGBUILD_BASE_)rosboot_test.cpp |
$(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+$(SYSREGBUILD_INT_)sym_file.o: $(SYSREGBUILD_BASE_)sym_file.cpp | $(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+$(SYSREGBUILD_INT_)sysreg.o: $(SYSREGBUILD_BASE_)sysreg.cpp | $(SYSREGBUILD_INT)
+ $(ECHO_CC)
+ ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@
+
+.PHONY: sysregbuild_clean
+sysreg_clean:
+ -@$(rm) $(SYSREGBUILD_TARGET) $(SYSREGBUILD_OBJECTS) 2>$(NUL)
+clean: sysreg_clean
Propchange: trunk/reactos/tools/sysreg/sysreg.mak
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/tools/tools.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=24589&…
==============================================================================
--- trunk/reactos/tools/tools.mak (original)
+++ trunk/reactos/tools/tools.mak Sat Oct 21 12:34:00 2006
@@ -58,3 +58,4 @@
include tools/wmc/wmc.mak
include tools/wpp/wpp.mak
include tools/wrc/wrc.mak
+include tools/sysreg/sysreg.mak