diff --git a/reactos/Makefile b/reactos/Makefile index 220f91e58e9..bcafa356de9 100644 --- a/reactos/Makefile +++ b/reactos/Makefile @@ -44,13 +44,13 @@ NET_DRIVERS = ndis tcpip tditest # ne2000 NET_DEVICE_DRIVERS = ne2000 -KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) APPS = args hello shell test cat bench apc shm lpc thread event file gditest \ - pteb consume dump_shared_data vmtest -# wstest + pteb consume dump_shared_data vmtest regtest # objdir +KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS) $(NET_DRIVERS) $(NET_DEVICE_DRIVERS) + all: buildno $(COMPONENTS) $(DLLS) $(SUBSYS) $(LOADERS) $(KERNEL_SERVICES) $(APPS) .PHONY: all @@ -84,7 +84,7 @@ install: rcopy$(EXE_POSTFIX) rmkdir$(EXE_POSTFIX) make_install_dirs autoexec_ins $(KERNEL_SERVICES:%=%_install) $(SUBSYS:%=%_install) \ $(APPS:%=%_install) -dist: clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \ +dist: rcopy$(EXE_POSTFIX) clean_dist_dir make_dist_dirs $(COMPONENTS:%=%_dist) $(DLLS:%=%_dist) \ $(LOADERS:%=%_dist) $(KERNEL_SERVICES:%=%_dist) $(SUBSYS:%=%_dist) \ $(APPS:%=%_dist) diff --git a/reactos/apps/tests/regtest/makefile b/reactos/apps/tests/regtest/makefile new file mode 100644 index 00000000000..ec42be27289 --- /dev/null +++ b/reactos/apps/tests/regtest/makefile @@ -0,0 +1,46 @@ +# +# +# +PATH_TO_TOP = ../.. + +OBJECTS= ../common/crt0.o regtest.o +PROGS= regtest.exe +LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a \ + ../../lib/advapi32/advapi32.a + +BASE_CFLAGS = -I../../include + +all: $(PROGS) + +.phony: all + +clean: + - $(RM) *.o + - $(RM) *.exe + - $(RM) *.sym + +.phony: clean + +install: $(PROGS:%=$(FLOPPY_DIR)/apps/%) + +$(PROGS:%=$(FLOPPY_DIR)/apps/%): $(FLOPPY_DIR)/apps/%: % +ifeq ($(DOSCLI),yes) + $(CP) $* $(FLOPPY_DIR)\apps\$* +else + $(CP) $* $(FLOPPY_DIR)/apps/$* +endif + +dist: $(PROGS:%=../../$(DIST_DIR)/apps/%) + +$(PROGS:%=../../$(DIST_DIR)/apps/%): ../../$(DIST_DIR)/apps/%: % +ifeq ($(DOSCLI),yes) + $(CP) $* ..\..\$(DIST_DIR)\apps\$* +else + $(CP) $* ../../$(DIST_DIR)/apps/$* +endif + +regtest.exe: $(OBJECTS) $(LIBS) + $(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o regtest.exe + $(NM) --numeric-sort regtest.exe > regtest.sym + +include ../../rules.mak diff --git a/reactos/apps/tests/regtest/regtest.c b/reactos/apps/tests/regtest/regtest.c new file mode 100644 index 00000000000..ed2fa0252b4 --- /dev/null +++ b/reactos/apps/tests/regtest/regtest.c @@ -0,0 +1,46 @@ +#include +#include +#include +#include + +HANDLE OutputHandle; +HANDLE InputHandle; + +void dprintf(char* fmt, ...) +{ + va_list args; + char buffer[255]; + + va_start(args,fmt); + vsprintf(buffer,fmt,args); + WriteConsoleA(OutputHandle, buffer, strlen(buffer), NULL, NULL); + va_end(args); +} + + +int main(int argc, char* argv[]) +{ + HKEY hKey = NULL; + DWORD dwDisposition; + + AllocConsole(); + InputHandle = GetStdHandle(STD_INPUT_HANDLE); + OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); + + dprintf ("RegCreateKeyExW:\n"); + RegCreateKeyExW (HKEY_LOCAL_MACHINE, + L"Test", + 0, + L"", + REG_OPTION_VOLATILE, + KEY_ALL_ACCESS, + NULL, + &hKey, + &dwDisposition); + + + dprintf ("\nTests done...\n"); + + return 0; +} +