0030091: Configuration - allow cross-compilation from Linux (case sensitive filesyste...
[occt.git] / src / OSD / OSD_Process.cxx
index 4c85ec0..47178c9 100644 (file)
@@ -35,13 +35,6 @@ OSD_Process::OSD_Process(){
 }
 
 
-Standard_Integer OSD_Process::Spawn (const TCollection_AsciiString& cmd,
-                        const Standard_Boolean /*ShowWindow*/)
-{
- return system(cmd.ToCString());
-}
-
-
 void OSD_Process::TerminalType(TCollection_AsciiString& Name){
 TCollection_AsciiString which="TERM";
 OSD_Environment term (which,"");
@@ -188,8 +181,8 @@ Standard_Integer OSD_Process::Error()const{
 #include <Standard_PExtCharacter.hxx>
 #include <TCollection_ExtendedString.hxx>
 
-#include <OSD_WNT_1.hxx>
-#include <LMCONS.H> // for UNLEN - maximum user name length GetUserName()
+#include <OSD_WNT.hxx>
+#include <lmcons.h> // for UNLEN - maximum user name length GetUserName()
 
 void _osd_wnt_set_error ( OSD_Error&, OSD_WhoAmI, ... );
 
@@ -202,48 +195,6 @@ OSD_Process::OSD_Process()
   //
 }
 
-// =======================================================================
-// function : Spawn
-// purpose  :
-// =======================================================================
-Standard_Integer OSD_Process::Spawn (const TCollection_AsciiString& theCmd,
-                                                      const Standard_Boolean theToShowWindow)
-{
-#ifndef OCCT_UWP
-  STARTUPINFOW aStartupInfo;
-  ZeroMemory (&aStartupInfo, sizeof(STARTUPINFO));
-  aStartupInfo.cb = sizeof(STARTUPINFO);
-  if (!theToShowWindow)
-  {
-    aStartupInfo.dwFlags     = STARTF_USESHOWWINDOW;
-    aStartupInfo.wShowWindow = SW_HIDE;
-  }
-
-  DWORD aRes = 0;
-  TCollection_ExtendedString aCmdWide (theCmd);
-  wchar_t* aCmdWidePtr = const_cast<wchar_t*>(aCmdWide.ToWideString()); // CreateProcessW() can modify content of this string
-  PROCESS_INFORMATION aProcessInfo;
-  if (!CreateProcessW (NULL, aCmdWidePtr, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &aStartupInfo, &aProcessInfo))
-  {
-    _osd_wnt_set_error (myError, OSD_WProcess);
-    aRes = myError.Error();
-  }
-  else
-  {
-    CloseHandle (aProcessInfo.hThread);
-    WaitForSingleObject (aProcessInfo.hProcess, INFINITE);
-    GetExitCodeProcess  (aProcessInfo.hProcess, &aRes);
-    CloseHandle (aProcessInfo.hProcess);
-  }
-
-  return aRes;
-#else
-  (void )theCmd;
-  (void )theToShowWindow;
-  return 0;
-#endif
-}
-
 void OSD_Process :: TerminalType ( TCollection_AsciiString& Name ) {
 
  Name = "WIN32 console";