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;
}
+#ifndef ROSSHELL
+
void explorer_show_frame(int cmdshow, LPTSTR lpCmdLine)
{
if (g_Globals._hMainWnd) {
MainFrameBase::Create(lpCmdLine, mdi, cmdshow);
}
+#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)
{
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);
// register tree window class
WindowClass(CLASSNAME_WINEFILETREE, CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW).Register();
+#endif
g_Globals._cfStrFName = RegisterClipboardFormat(CFSTR_FILENAME);
}
return -1;
}
+#ifndef ROSSHELL
if (cmdshow != SW_HIDE) {
/* // don't maximize if being called from the ROS desktop
if (cmdshow == SW_SHOWNORMAL)
explorer_show_frame(cmdshow, lpCmdLine);
}
+#endif
return Window::MessageLoop();
}
// 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;
if (!SetShellReadyEvent(TEXT("msgina: ShellReadyEvent")))
SetShellReadyEvent(TEXT("Global\\msgina: ShellReadyEvent"));
}
+#ifdef ROSSHELL
+ else
+ return 0; // no shell to launch, so exit immediatelly
+#endif
+
if (!any_desktop_running) {
// launch the shell DDE server
#endif
}
- if (g_Globals._hwndDesktop)
- g_Globals._desktop_mode = true;
-
Thread* pSSOThread = NULL;
if (startup_desktop) {
startup(2, argv);
}
+#ifndef ROSSHELL
+ if (g_Globals._hwndDesktop)
+ g_Globals._desktop_mode = true;
+
/**TODO fix command line handling */
if (*lpCmdLine=='"' && lpCmdLine[_tcslen(lpCmdLine)-1]=='"') {
++lpCmdLine;
lpCmdLine[_tcslen(lpCmdLine)-1] = '\0';
}
+#endif
+
int ret = explorer_main(hInstance, lpCmdLine, nShowCmd);