From 2547a939399f1dfd97380bc583fdc4df82c6f375 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Sun, 1 May 2005 20:02:30 +0000 Subject: [PATCH] experimental ROS Shell without integrated explorer part svn path=/branches/lean-explorer/; revision=14922 --- .../system/explorer/Make-rosshell.MinGW | 83 ++++ .../subsys/system/explorer/Make-rosshell.mak | 148 ++++++ reactos/subsys/system/explorer/Makefile | 6 +- reactos/subsys/system/explorer/Makefile.MinGW | 2 +- reactos/subsys/system/explorer/Makefile.PCH | 4 +- .../system/explorer/desktop/desktop.cpp | 2 + reactos/subsys/system/explorer/explorer.cpp | 34 +- reactos/subsys/system/explorer/globals.h | 7 +- .../subsys/system/explorer/make_rosshell.dsp | 143 ++++++ reactos/subsys/system/explorer/rosshell.dsp | 451 ++++++++++++++++++ reactos/subsys/system/explorer/rosshell.dsw | 41 ++ .../subsys/system/explorer/shell/entries.cpp | 2 + .../system/explorer/taskbar/desktopbar.cpp | 4 +- .../system/explorer/taskbar/startmenu.cpp | 37 +- .../subsys/system/explorer/utility/utility.h | 4 +- 15 files changed, 947 insertions(+), 21 deletions(-) create mode 100644 reactos/subsys/system/explorer/Make-rosshell.MinGW create mode 100644 reactos/subsys/system/explorer/Make-rosshell.mak create mode 100644 reactos/subsys/system/explorer/make_rosshell.dsp create mode 100644 reactos/subsys/system/explorer/rosshell.dsp create mode 100644 reactos/subsys/system/explorer/rosshell.dsw diff --git a/reactos/subsys/system/explorer/Make-rosshell.MinGW b/reactos/subsys/system/explorer/Make-rosshell.MinGW new file mode 100644 index 00000000000..9b6da9c4539 --- /dev/null +++ b/reactos/subsys/system/explorer/Make-rosshell.MinGW @@ -0,0 +1,83 @@ +# +# ReactOS lean shell +# +# Make-rosshell.MinGW +# +# MinGW Makefile with precompiled header support +# + +CC = gcc +CXX = g++ +LINK = g++ + +CFLAGS = -DWIN32 -DROSSHELL -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -fexceptions -Wall -I. +RCFLAGS = -DWIN32 -DROSSHELL -D__WINDRES__ +LFLAGS = -Wl,--subsystem,windows + +ifdef DEBUG +CFLAGS += -D_DEBUG -g +RCFLAGS += -D_DEBUG +LFLAGS += -g +else +CFLAGS += -DNDEBUG -Os -D_NO_CONTEXT +RCFLAGS += -DNDEBUG +LFLAGS += -s +endif + +ifndef UNICODE +UNICODE = 1 +endif + +ifeq ($(UNICODE),1) +CFLAGS += -DUNICODE +# LFLAGS+= -Wl,--entry,_wWinMain@16 +endif + +CXXFLAGS = $(CFLAGS) + +EXEC_SUFFIX = .exe +RES_SUFFIX = .coff + +VPATH = shell utility taskbar desktop dialogs + +PROGRAM = rosshell + +TARGET = $(PROGRAM)$(EXEC_SUFFIX) + +OBJECTS = \ + startup.o \ + shellclasses.o \ + utility.o \ + window.o \ + dragdropimpl.o \ + shellbrowserimpl.o \ + explorer.o \ + entries.o \ + winfs.o \ + shellfs.o \ + desktop.o \ + desktopbar.o \ + taskbar.o \ + startmenu.o \ + traynotify.o \ + quicklaunch.o \ + settings.o + +LIBS = gdi32 comctl32 ole32 uuid + +all: precomp.h.gch $(TARGET) + +precomp.h.gch: *.h utility/*.h shell/*.h desktop/*.h + $(CXX) $(CFLAGS) precomp.h + +$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) + $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) + +$(PROGRAM)$(RES_SUFFIX): explorer_intres.rc res/*.bmp res/*.ico + windres $(RCFLAGS) -o $@ explorer_intres.rc + +clean: + rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) precomp.h.gch \ + desktop/*.o dialogs/*.o shell/*.o taskbar/*.o utility/*.o + +ever: diff --git a/reactos/subsys/system/explorer/Make-rosshell.mak b/reactos/subsys/system/explorer/Make-rosshell.mak new file mode 100644 index 00000000000..4a54acf0f1b --- /dev/null +++ b/reactos/subsys/system/explorer/Make-rosshell.mak @@ -0,0 +1,148 @@ +# +# ReactOS lean shell +# +# Makefile +# + +# Windows is default host environment +ifeq ($(HOST),) +HOST = mingw32-windows +endif + +ifeq ($(HOST),mingw32-linux) +CC = mingw32-gcc +CXX = mingw32-g++ +LINK = mingw32-g++ +RC = mingw32-windres +CD_PREFIX := ./ +PREFIX = mingw32- +EXE_POSTFIX := +EXE_PREFIX := ./ +endif + +ifeq ($(HOST),mingw32-windows) +CC = gcc +CXX = g++ +LINK = g++ +RC = windres +CD_PREFIX := +PREFIX = +EXE_PREFIX := +EXE_POSTFIX := .exe +endif + +PATH_TO_TOP = ../../.. +TOOLS_PATH = $(PATH_TO_TOP)/tools + +ifndef UNICODE +UNICODE = 1 +endif + +CFLAGS = -I./ -DWIN32 -D_ROS_ -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -fexceptions -Wall +RCFLAGS = -DWIN32 -D_ROS_ -D__WINDRES__ +LFLAGS = -Wl,--subsystem,windows + +ifdef DEBUG +CFLAGS += -D_DEBUG -g +RCFLAGS += -D_DEBUG +LFLAGS += -g +else +CFLAGS += -DNDEBUG -Os -D_NO_CONTEXT +RCFLAGS += -DNDEBUG +LFLAGS += -s +endif + +ifeq ($(UNICODE),1) +CFLAGS += -DUNICODE +# LFLAGS+= -Wl,--entry,_wWinMain@16 +RCFLAGS += -DUNICODE +endif + +CXXFLAGS = $(CFLAGS) + +EXEC_SUFFIX = .exe +RES_SUFFIX = .coff + +VPATH = shell utility taskbar desktop dialogs + +PROGRAM = rosshell + +TARGET = $(PROGRAM)$(EXEC_SUFFIX) + +OBJECTS = \ + startup.o \ + shellclasses.o \ + utility.o \ + window.o \ + dragdropimpl.o \ + shellbrowserimpl.o \ + explorer.o \ + entries.o \ + winfs.o \ + shellfs.o \ + desktop.o \ + desktopbar.o \ + taskbar.o \ + startmenu.o \ + traynotify.o \ + quicklaunch.o \ + settings.o + +LIBS = gdi32 comctl32 ole32 uuid + +.PHONY: all depends implib clean install dist bootcd depends + +all: $(TARGET) + +ever: + +$(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) + $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) + +$(PROGRAM)$(RES_SUFFIX): explorer_intres.rc res/*.bmp res/*.ico + $(RC) $(RCFLAGS) -o $@ explorer_intres.rc + +clean: + $(TOOLS_PATH)/rdel $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) \ + desktop/*.o dialogs/*.o shell/*.o taskbar/*.o utility/*.o + +# Use environment var ROS_INSTALL to override default install dir +ifneq ($(ROS_INSTALL),) +INSTALL_DIR = $(ROS_INSTALL) +else +ifeq ($(HOST),mingw32-windows) +INSTALL_DIR = C:/reactos +else +INSTALL_DIR = $(PATH_TO_TOP)/reactos +endif +endif + +implib: + +install: + -$(TOOLS_PATH)/rcopy $(TARGET) $(INSTALL_DIR)/$(TARGET) + +bootcd: + + +# dependency scanning + +DEP_FILTERED := $(filter-out $(DEP_EXCLUDE_FILTER), $(OBJECTS:.o=.d)) +DEP_FILES := $(join $(dir $(DEP_FILTERED)), $(addprefix ., $(notdir $(DEP_FILTERED)))) + +ifneq ($(MAKECMDGOALS),clean) +-include $(DEP_FILES) +endif + +ifeq ($(HOST),mingw32-windows) +DEPENDS_EXE := ..\..\..\tools\depends +else +DEPENDS_EXE := $(TOOLS_PATH)/depends +endif + +.%.d: %.c $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) + $(CC) $(CFLAGS) -M $< | $(DEPENDS_EXE) $(@D) $@ + +.%.d: %.cpp $(PATH_TO_TOP)/tools/depends$(EXE_POSTFIX) + $(CC) $(CFLAGS) -M $< | $(DEPENDS_EXE) $(@D) $@ + diff --git a/reactos/subsys/system/explorer/Makefile b/reactos/subsys/system/explorer/Makefile index d506fad8497..7cf81b535e8 100644 --- a/reactos/subsys/system/explorer/Makefile +++ b/reactos/subsys/system/explorer/Makefile @@ -1,5 +1,5 @@ # -# ReactOS lean explorer +# ReactOS lean shell # # Makefile # @@ -101,8 +101,8 @@ ever: $(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) -explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico - $(RC) $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc +explorer$(RES_SUFFIX): explorer_intres.rc res/*.bmp res/*.ico + $(RC) $(RCFLAGS) -o $@ explorer_intres.rc clean: $(TOOLS_PATH)/rdel $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) \ diff --git a/reactos/subsys/system/explorer/Makefile.MinGW b/reactos/subsys/system/explorer/Makefile.MinGW index 8d989ebacb8..60c9a6c042f 100644 --- a/reactos/subsys/system/explorer/Makefile.MinGW +++ b/reactos/subsys/system/explorer/Makefile.MinGW @@ -71,7 +71,7 @@ all: $(TARGET) $(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) -explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico +$(PROGRAM)$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc clean: diff --git a/reactos/subsys/system/explorer/Makefile.PCH b/reactos/subsys/system/explorer/Makefile.PCH index c2cdb996a8f..84d62dd0efa 100644 --- a/reactos/subsys/system/explorer/Makefile.PCH +++ b/reactos/subsys/system/explorer/Makefile.PCH @@ -75,8 +75,8 @@ precomp.h.gch: *.h utility/*.h shell/*.h desktop/*.h $(TARGET): $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) $(LINK) $(LFLAGS) -o $@ $^ $(addprefix -l,$(LIBS)) -explorer$(RES_SUFFIX): $(PROGRAM)_intres.rc res/*.bmp res/*.ico - windres $(RCFLAGS) -o $@ $(PROGRAM)_intres.rc +$(PROGRAM)$(RES_SUFFIX): explorer_intres.rc res/*.bmp res/*.ico + windres $(RCFLAGS) -o $@ explorer_intres.rc clean: rm -f $(TARGET) $(OBJECTS) $(PROGRAM)$(RES_SUFFIX) precomp.h.gch \ diff --git a/reactos/subsys/system/explorer/desktop/desktop.cpp b/reactos/subsys/system/explorer/desktop/desktop.cpp index 613dffb1094..b12df79c5f5 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.cpp +++ b/reactos/subsys/system/explorer/desktop/desktop.cpp @@ -382,8 +382,10 @@ LRESULT DesktopWindow::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam) HRESULT DesktopWindow::OnDefaultCommand(LPIDA pida) { +#ifndef ROSSHELL // in shell-only-mode fall through and let shell32 handle the command if (MainFrame::OpenShellFolders(pida, 0)) return S_OK; +#endif return E_NOTIMPL; } diff --git a/reactos/subsys/system/explorer/explorer.cpp b/reactos/subsys/system/explorer/explorer.cpp index c5d10d0fc18..b57a89a7d1f 100644 --- a/reactos/subsys/system/explorer/explorer.cpp +++ b/reactos/subsys/system/explorer/explorer.cpp @@ -44,11 +44,15 @@ ExplorerGlobals g_Globals; ExplorerGlobals::ExplorerGlobals() { _hInstance = 0; - _hframeClass = 0; _cfStrFName = 0; + +#ifndef ROSSHELL + _hframeClass = 0; _hMainWnd = 0; - _prescan_nodes = false; _desktop_mode = false; + _prescan_nodes = false; +#endif + _log = NULL; #ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003) _SHRestricted = 0; @@ -413,6 +417,8 @@ ResBitmap::ResBitmap(UINT nid) } +#ifndef ROSSHELL + void explorer_show_frame(int cmdshow, LPTSTR lpCmdLine) { if (g_Globals._hMainWnd) { @@ -454,6 +460,18 @@ void explorer_show_frame(int cmdshow, LPTSTR lpCmdLine) } } +#else + +void explorer_show_frame(int cmdshow, LPTSTR lpCmdLine) +{ + if (!lpCmdLine) + lpCmdLine = TEXT("explorer.exe"); + + launch_file(GetDesktopWindow(), lpCmdLine, cmdshow); +} + +#endif + PopupMenu::PopupMenu(UINT nid) { @@ -534,6 +552,7 @@ static void InitInstance(HINSTANCE hInstance) setlocale(LC_COLLATE, ""); // set collating rules to local settings for compareName +#ifndef ROSSHELL // register frame window class g_Globals._hframeClass = IconWindowClass(CLASSNAME_FRAME,IDI_EXPLORER); @@ -542,6 +561,7 @@ static void InitInstance(HINSTANCE hInstance) // register tree windows class WindowClass(CLASSNAME_WINEFILETREE, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register(); +#endif g_Globals._cfStrFName = RegisterClipboardFormat(CFSTR_FILENAME); } @@ -561,6 +581,7 @@ int explorer_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdshow) return -1; } +#ifndef ROSSHELL if (cmdshow != SW_HIDE) { /* // don't maximize if being called from the ROS desktop if (cmdshow == SW_SHOWNORMAL) @@ -570,6 +591,7 @@ int explorer_main(HINSTANCE hInstance, LPTSTR lpCmdLine, int cmdshow) explorer_show_frame(cmdshow, lpCmdLine); } +#endif return Window::MessageLoop(); } @@ -684,12 +706,14 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL // If there is given the command line option "-desktop", create desktop window anyways if (_tcsstr(lpCmdLine,TEXT("-desktop"))) startup_desktop = TRUE; +#ifndef ROSSHELL else if (_tcsstr(lpCmdLine,TEXT("-nodesktop"))) startup_desktop = FALSE; // Don't display cabinet window in desktop mode if (startup_desktop && !_tcsstr(lpCmdLine,TEXT("-explorer"))) nShowCmd = SW_HIDE; +#endif if (_tcsstr(lpCmdLine,TEXT("-noautostart"))) autostart = false; @@ -704,6 +728,10 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL if (g_SHDOCVW_ShellDDEInit) (*g_SHDOCVW_ShellDDEInit)(TRUE); } +#ifdef ROSSHELL + else + return 0; // no shell to launch, so exit immediatelly +#endif g_Globals.init(hInstance); @@ -723,6 +751,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL } } +#ifndef ROSSHELL /**TODO fix command line handling */ if (*lpCmdLine=='"' && lpCmdLine[_tcslen(lpCmdLine)-1]=='"') { ++lpCmdLine; @@ -731,6 +760,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL if (g_Globals._hwndDesktop) g_Globals._desktop_mode = true; +#endif int ret = explorer_main(hInstance, lpCmdLine, nShowCmd); diff --git a/reactos/subsys/system/explorer/globals.h b/reactos/subsys/system/explorer/globals.h index 2bc0a566667..d5b9efdf0dc 100644 --- a/reactos/subsys/system/explorer/globals.h +++ b/reactos/subsys/system/explorer/globals.h @@ -178,11 +178,14 @@ extern struct ExplorerGlobals void init(HINSTANCE hInstance); HINSTANCE _hInstance; - ATOM _hframeClass; UINT _cfStrFName; + +#ifndef ROSSHELL + ATOM _hframeClass; HWND _hMainWnd; - bool _prescan_nodes; bool _desktop_mode; + bool _prescan_nodes; +#endif FILE* _log; diff --git a/reactos/subsys/system/explorer/make_rosshell.dsp b/reactos/subsys/system/explorer/make_rosshell.dsp new file mode 100644 index 00000000000..db83b8de0de --- /dev/null +++ b/reactos/subsys/system/explorer/make_rosshell.dsp @@ -0,0 +1,143 @@ +# Microsoft Developer Studio Project File - Name="make_rosshell" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=make_rosshell - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "make_rosshell.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "make_rosshell.mak" CFG="make_rosshell - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "make_rosshell - Win32 Release" (based on "Win32 (x86) External Target") +!MESSAGE "make_rosshell - Win32 Debug" (based on "Win32 (x86) External Target") +!MESSAGE "make_rosshell - Win32 Unicode Debug" (based on "Win32 (x86) External Target") +!MESSAGE "make_rosshell - Win32 Unicode Release" (based on "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "make_rosshell - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f make_rosshell.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "make_rosshell.exe" +# PROP BASE Bsc_Name "make_rosshell.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Make-rosshell.MinGW UNICODE=0" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "explorer.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f make_rosshell.mak" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "make_rosshell.exe" +# PROP BASE Bsc_Name "make_rosshell.bsc" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Make-rosshell.MinGW UNICODE=0 DEBUG=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "explorer.exe" +# PROP Bsc_Name "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=0 DEBUG=1" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "UDebug" +# PROP BASE Intermediate_Dir "UDebug" +# PROP BASE Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1 DEBUG=1" +# PROP BASE Rebuild_Opt "clean all" +# PROP BASE Target_File "explorer.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UDebug" +# PROP Intermediate_Dir "UDebug" +# PROP Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Make-rosshell.MinGW UNICODE=1 DEBUG=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "explorer.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URelease" +# PROP BASE Intermediate_Dir "URelease" +# PROP BASE Cmd_Line "msdevfilt -gcc -pipe "perl d:\tools\gSTLFilt.pl" make -f Makefile.MinGW UNICODE=1" +# PROP BASE Rebuild_Opt "clean all" +# PROP BASE Target_File "explorer.exe" +# PROP BASE Bsc_Name "" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "URelease" +# PROP Intermediate_Dir "URelease" +# PROP Cmd_Line "make -f Make-rosshell.MinGW UNICODE=1" +# PROP Rebuild_Opt "clean all" +# PROP Target_File "explorer.exe" +# PROP Bsc_Name "" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "make_rosshell - Win32 Release" +# Name "make_rosshell - Win32 Debug" +# Name "make_rosshell - Win32 Unicode Debug" +# Name "make_rosshell - Win32 Unicode Release" + +!IF "$(CFG)" == "make_rosshell - Win32 Release" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Debug" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Unicode Debug" + +!ELSEIF "$(CFG)" == "make_rosshell - Win32 Unicode Release" + +!ENDIF + +# Begin Source File + +SOURCE=".\Make-rosshell.mak" +# End Source File +# Begin Source File + +SOURCE=".\Make-rosshell.MinGW" +# End Source File +# End Target +# End Project diff --git a/reactos/subsys/system/explorer/rosshell.dsp b/reactos/subsys/system/explorer/rosshell.dsp new file mode 100644 index 00000000000..3128569a784 --- /dev/null +++ b/reactos/subsys/system/explorer/rosshell.dsp @@ -0,0 +1,451 @@ +# Microsoft Developer Studio Project File - Name="rosshell" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=rosshell - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "rosshell.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "rosshell.mak" CFG="rosshell - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "rosshell - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "rosshell - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "rosshell - Win32 Unicode Release" (based on "Win32 (x86) Console Application") +!MESSAGE "rosshell - Win32 Unicode Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "rosshell - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GR /GX /O1 /D "NDEBUG" /D "_NO_CONTEXT" /D "WIN32" /D _WIN32_IE=0x0501 /D _WIN32_WINNT=0x0501 /D "ROSSHELL" /Yu"precomp.h" /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386 +# SUBTRACT LINK32 /pdb:none /force + +!ELSEIF "$(CFG)" == "rosshell - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D _WIN32_IE=0x0501 /D _WIN32_WINNT=0x0501 /D "ROSSHELL" /FR /Yu"precomp.h" /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# SUBTRACT LINK32 /pdb:none /force + +!ELSEIF "$(CFG)" == "rosshell - Win32 Unicode Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "URelease" +# PROP BASE Intermediate_Dir "URelease" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "URelease" +# PROP Intermediate_Dir "URelease" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GR /GX /O2 /D "NDEBUG" /D "UNICODE" /D "_NO_CONTEXT" /D "WIN32" /D _WIN32_IE=0x0501 /D _WIN32_WINNT=0x0501 /D "ROSSHELL" /Yu"precomp.h" /FD /c +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /machine:I386 +# SUBTRACT LINK32 /pdb:none /force + +!ELSEIF "$(CFG)" == "rosshell - Win32 Unicode Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "UDebug" +# PROP BASE Intermediate_Dir "UDebug" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "UDebug" +# PROP Intermediate_Dir "UDebug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /D "_DEBUG" /D "UNICODE" /D "WIN32" /D _WIN32_IE=0x0501 /D _WIN32_WINNT=0x0501 /D "ROSSHELL" /FR /Yu"precomp.h" /FD /GZ /c +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 shell32.lib comctl32.lib gdi32.lib user32.lib advapi32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# SUBTRACT LINK32 /pdb:none /force + +!ENDIF + +# Begin Target + +# Name "rosshell - Win32 Release" +# Name "rosshell - Win32 Debug" +# Name "rosshell - Win32 Unicode Release" +# Name "rosshell - Win32 Unicode Debug" +# Begin Group "utility" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\utility\dragdropimpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\dragdropimpl.h +# End Source File +# Begin Source File + +SOURCE=.\utility\shellbrowserimpl.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\shellbrowserimpl.h +# End Source File +# Begin Source File + +SOURCE=.\utility\shellclasses.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\shellclasses.h +# End Source File +# Begin Source File + +SOURCE=.\utility\treedroptarget.h +# End Source File +# Begin Source File + +SOURCE=.\utility\utility.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\utility.h +# End Source File +# Begin Source File + +SOURCE=.\utility\window.cpp +# End Source File +# Begin Source File + +SOURCE=.\utility\window.h +# End Source File +# End Group +# Begin Group "resources" + +# PROP Default_Filter "bmp,ico" +# Begin Source File + +SOURCE=.\res\action.ico +# End Source File +# Begin Source File + +SOURCE=.\res\appicon.ico +# End Source File +# Begin Source File + +SOURCE=.\res\apps.ico +# End Source File +# Begin Source File + +SOURCE=.\res\arrow.ico +# End Source File +# Begin Source File + +SOURCE=.\res\arrow_dwn.ico +# End Source File +# Begin Source File + +SOURCE=.\res\arrow_up.ico +# End Source File +# Begin Source File + +SOURCE=.\res\arrowsel.ico +# End Source File +# Begin Source File + +SOURCE=.\res\computer.ico +# End Source File +# Begin Source File + +SOURCE=.\res\config.ico +# End Source File +# Begin Source File + +SOURCE=.\res\documents.ico +# End Source File +# Begin Source File + +SOURCE=.\explorer_intres.h +# End Source File +# Begin Source File + +SOURCE=.\explorer_intres.rc +# End Source File +# Begin Source File + +SOURCE=.\res\favorites.ico +# End Source File +# Begin Source File + +SOURCE=.\res\floating.ico +# End Source File +# Begin Source File + +SOURCE=.\res\folder.ico +# End Source File +# Begin Source File + +SOURCE=.\res\images.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\info.ico +# End Source File +# Begin Source File + +SOURCE=.\res\logoff.ico +# End Source File +# Begin Source File + +SOURCE=.\res\logov.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\logov16.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\logov256.bmp +# End Source File +# Begin Source File + +SOURCE=.\res\network.ico +# End Source File +# Begin Source File + +SOURCE=.\res\printer.ico +# End Source File +# Begin Source File + +SOURCE=.\res\reactos.ico +# End Source File +# Begin Source File + +SOURCE=".\res\ros-big.ico" +# End Source File +# Begin Source File + +SOURCE=".\rosshell-jp.rc" +# PROP Exclude_From_Build 1 +# End Source File +# Begin Source File + +SOURCE=.\res\rosshell.ico +# End Source File +# Begin Source File + +SOURCE=".\res\search-doc.ico" +# End Source File +# Begin Source File + +SOURCE=.\res\search.ico +# End Source File +# Begin Source File + +SOURCE=.\res\startmenu.ico +# End Source File +# Begin Source File + +SOURCE=.\res\toolbar.bmp +# End Source File +# End Group +# Begin Group "taskbar" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\taskbar\desktopbar.cpp +# End Source File +# Begin Source File + +SOURCE=.\taskbar\desktopbar.h +# End Source File +# Begin Source File + +SOURCE=.\taskbar\quicklaunch.cpp +# End Source File +# Begin Source File + +SOURCE=.\taskbar\quicklaunch.h +# End Source File +# Begin Source File + +SOURCE=.\taskbar\startmenu.cpp +# End Source File +# Begin Source File + +SOURCE=.\taskbar\startmenu.h +# End Source File +# Begin Source File + +SOURCE=.\taskbar\taskbar.cpp +# End Source File +# Begin Source File + +SOURCE=.\taskbar\taskbar.h +# End Source File +# Begin Source File + +SOURCE=.\taskbar\traynotify.cpp +# End Source File +# Begin Source File + +SOURCE=.\taskbar\traynotify.h +# End Source File +# End Group +# Begin Group "desktop" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\desktop\desktop.cpp +# End Source File +# Begin Source File + +SOURCE=.\desktop\desktop.h +# End Source File +# End Group +# Begin Group "shell" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\shell\entries.cpp +# End Source File +# Begin Source File + +SOURCE=.\shell\entries.h +# End Source File +# Begin Source File + +SOURCE=.\shell\shellfs.cpp +# End Source File +# Begin Source File + +SOURCE=.\shell\shellfs.h +# End Source File +# Begin Source File + +SOURCE=.\shell\startup.c +# SUBTRACT CPP /YX /Yc /Yu +# End Source File +# Begin Source File + +SOURCE=.\shell\winfs.cpp +# End Source File +# Begin Source File + +SOURCE=.\shell\winfs.h +# End Source File +# End Group +# Begin Group "dialogs" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\dialogs\settings.cpp +# End Source File +# Begin Source File + +SOURCE=.\dialogs\settings.h +# End Source File +# End Group +# Begin Group "main" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\explorer.cpp +# End Source File +# Begin Source File + +SOURCE=.\explorer.h +# End Source File +# Begin Source File + +SOURCE=.\externals.h +# End Source File +# Begin Source File + +SOURCE=.\globals.h +# End Source File +# Begin Source File + +SOURCE=.\precomp.cpp +# ADD CPP /Yc"precomp.h" +# End Source File +# Begin Source File + +SOURCE=.\precomp.h +# End Source File +# End Group +# End Target +# End Project diff --git a/reactos/subsys/system/explorer/rosshell.dsw b/reactos/subsys/system/explorer/rosshell.dsw new file mode 100644 index 00000000000..a350783e505 --- /dev/null +++ b/reactos/subsys/system/explorer/rosshell.dsw @@ -0,0 +1,41 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "rosshell"=.\rosshell.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "make_rosshell"=.\make_rosshell.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/reactos/subsys/system/explorer/shell/entries.cpp b/reactos/subsys/system/explorer/shell/entries.cpp index b2e18b3e099..38adda14184 100644 --- a/reactos/subsys/system/explorer/shell/entries.cpp +++ b/reactos/subsys/system/explorer/shell/entries.cpp @@ -141,6 +141,7 @@ void Entry::read_directory(SORT_ORDER sortOrder, int scan_flags) // call into subclass read_directory(scan_flags); +#ifndef ROSSHELL if (g_Globals._prescan_nodes) { //@todo _prescan_nodes should not be used for reading the start menu. for(Entry*entry=_down; entry; entry=entry->_next) if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { @@ -148,6 +149,7 @@ void Entry::read_directory(SORT_ORDER sortOrder, int scan_flags) entry->sort_directory(sortOrder); } } +#endif sort_directory(sortOrder); } diff --git a/reactos/subsys/system/explorer/taskbar/desktopbar.cpp b/reactos/subsys/system/explorer/taskbar/desktopbar.cpp index 28121acfa26..a5d36aac1db 100644 --- a/reactos/subsys/system/explorer/taskbar/desktopbar.cpp +++ b/reactos/subsys/system/explorer/taskbar/desktopbar.cpp @@ -131,7 +131,9 @@ void DesktopBar::RegisterHotkeys() void DesktopBar::ProcessHotKey(int id_hotkey) { switch(id_hotkey) { - case 0: explorer_show_frame(SW_SHOWNORMAL); break; + case 0: + explorer_show_frame(SW_SHOWNORMAL); + break; ///@todo implement all common hotkeys } } diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.cpp b/reactos/subsys/system/explorer/taskbar/startmenu.cpp index 96dd8fdabc8..328bbfd73f5 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.cpp +++ b/reactos/subsys/system/explorer/taskbar/startmenu.cpp @@ -40,6 +40,11 @@ #include "../dialogs/settings.h" +#define SHELLPATH_CONTROL_PANEL TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}") +#define SHELLPATH_PRINTERS TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}") +#define SHELLPATH_NET_CONNECTIONS TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}") + + StartMenu::StartMenu(HWND hwnd) : super(hwnd) { @@ -1817,24 +1822,40 @@ int StartMenuHandler::Command(int id, int code) ExplorerPropertySheet(g_Globals._hwndDesktopBar); break; - case IDC_PRINTERS: - CloseStartMenu(id); - MainFrame::Create(SpecialFolderPath(CSIDL_PRINTERS, _hwnd), OWM_PIDL); - break; - case IDC_CONTROL_PANEL: CloseStartMenu(id); - MainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0); +#ifndef ROSSHELL + MainFrame::Create(SHELLPATH_CONTROL_PANEL, 0); +#else + launch_file(_hwnd, SHELLPATH_CONTROL_PANEL); +#endif break; - case IDC_ADMIN: + case IDC_PRINTERS: CloseStartMenu(id); - MainFrame::Create(SpecialFolderPath(CSIDL_COMMON_ADMINTOOLS, _hwnd), OWM_PIDL); +#ifndef ROSSHELL + MainFrame::Create(SpecialFolderPath(CSIDL_PRINTERS, _hwnd), OWM_PIDL); +#else + launch_file(_hwnd, SHELLPATH_PRINTERS); +#endif break; case IDC_CONNECTIONS: CloseStartMenu(id); +#ifndef ROSSHELL MainFrame::Create(SpecialFolderPath(CSIDL_CONNECTIONS, _hwnd), OWM_PIDL); +#else + launch_file(_hwnd, SHELLPATH_NET_CONNECTIONS); +#endif + break; + + case IDC_ADMIN: + CloseStartMenu(id); +#ifndef ROSSHELL + MainFrame::Create(SpecialFolderPath(CSIDL_COMMON_ADMINTOOLS, _hwnd), OWM_PIDL); +#else + launch_file(_hwnd, SpecialFolderFSPath(CSIDL_COMMON_ADMINTOOLS, _hwnd)); +#endif break; diff --git a/reactos/subsys/system/explorer/utility/utility.h b/reactos/subsys/system/explorer/utility/utility.h index 86609114f1b..9ff860d8180 100644 --- a/reactos/subsys/system/explorer/utility/utility.h +++ b/reactos/subsys/system/explorer/utility/utility.h @@ -136,9 +136,9 @@ extern BOOL time_to_filetime(const time_t* t, FILETIME* ftime); extern int find_window_class(LPCTSTR classname); // launch a program or document file -extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow); +extern BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow=SW_SHOWNORMAL); #ifdef UNICODE -extern BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow); +extern BOOL launch_fileA(HWND hwnd, LPSTR cmd, UINT nCmdShow=SW_SHOWNORMAL); #else #define launch_fileA launch_file #endif