Changeset 685

Show
Ignore:
Timestamp:
2005年08月24日 16時55分44秒 (3 years ago)
Author:
fujii
Message:

* desktop.cc (run_installer): New Function.
(install_ImageMagick): Call run_installer() instead of system().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/3.00/src/ChangeLog.Meadow

    r684 r685  
    112005-08-24  Masayuki FUJII  <boochang@m4.kcn.ne.jp> 
     2 
     3        * desktop.cc (run_installer): New Function. 
     4        (install_ImageMagick): Call run_installer() instead of system(). 
    25 
    36        * Makefile.am (AM_CXXFLAGS): Warning options is modified 
  • branches/3.00/src/desktop.cc

    r684 r685  
    216216#ifdef MEADOW_NETINSTALL 
    217217static void 
     218run_installer (String &cmdline) 
     219{ 
     220  STARTUPINFO si = {sizeof si}; 
     221  PROCESS_INFORMATION pi = {0}; 
     222 
     223  char *c_cmdline = cmdline.cstr (); 
     224 
     225  bool success = CreateProcess (0, c_cmdline, NULL, NULL, FALSE, 
     226                                0, NULL, get_root_dir ().cstr_oneuse (), 
     227                                &si, &pi); 
     228  if (success) 
     229    WaitForSingleObject (pi.hProcess, INFINITE); 
     230  CloseHandle (pi.hProcess); 
     231  CloseHandle (pi.hThread); 
     232 
     233  delete c_cmdline; 
     234} 
     235 
     236static void 
    218237install_Meadow () 
    219238{ 
     
    264283      SetCurrentDirectory (get_root_dir ().cstr_oneuse ()); 
    265284 
    266       system (path.cstr_oneuse ()); 
     285      run_installer (path); 
    267286    } 
    268287}