Commit 51692609 authored by John van Groningen's avatar John van Groningen

use win_create_process instead of WinCallProcess to call the compiler

and linker, the latter uses STARTF_USESTDHANDLES,
which seems to prevent the compiler from opening a console window
parent 086eba7e
......@@ -175,7 +175,7 @@ Compile
# command = cocl +++ write_module_times_string +++ CompileBuildCommand
out_file_name errors_file_name compileOrCheckSyntax path paths
projectMemoryProfiling projectTimeProfiling projectEagerOrDynamic co
(didit, exitcode, os4) = CallProcess command [] cocldir "" "" "" 99
(didit, exitcode, os4) = call_process command cocldir 99
diditall = if (os4 == 99) didit didit
| not diditall
# ps = errwin (["Error: Unable to run compiler: "+++cocl +++ " :"+++toString exitcode]) ps
......@@ -659,7 +659,7 @@ Link linker` winfun path
# linker = linker +++ " -I " +++ quoted_string linkoptspath +++ " -O " +++ quoted_string linkerrspath
# (didit,exit_code,ost) = CallProcess linker [] linkerdir "" "" "" 99
# (didit,exit_code,ost) = call_process linker linkerdir 99
# diditall = if (ost == 99) didit didit
| not diditall
= (winfun ["Error: Unable to run linker: "+++linker] ps, False)
......@@ -781,6 +781,7 @@ CallProcess command environment directory stdin stdout stderr os
os = case (envptr == 0) of
True -> os
false -> (winReleaseCString outptr os)
//error
os = case (envptr == 0) of
True -> os
false -> (winReleaseCString errptr os)
......@@ -790,6 +791,27 @@ where
MakeEnvironmentString [] = ""
MakeEnvironmentString [ (name, value):rest ] = name +++ "=" +++ value +++ "\0" +++ MakeEnvironmentString rest
call_process :: !String !String !*OSToolbox -> (!Bool, !Int, !*OSToolbox)
call_process command directory os
| size command > 0
# (commandptr,os) = winMakeCString command os
(dirptr, os) = if (size directory == 0)
(0, os)
(winMakeCString directory os)
(success, exitcode, os) = win_create_process commandptr dirptr os
os = winReleaseCString commandptr os
os = if (dirptr == 0)
os
(winReleaseCString dirptr os)
= (success, exitcode, os)
= (False, -1, os)
win_create_process :: !CSTR !CSTR !*OSToolbox -> (!Bool, !Int, !*OSToolbox)
win_create_process _ _ _
= code {
ccall win_create_process "II:VII:I"
}
// PERSISTENT STUFF
int_to_hex v
......@@ -830,7 +852,7 @@ compile_with_cache path directory startup_arguments arguments prog=:(CompilingIn
= trace_n ("C") (ok,s,(CompilingInfo NoCompiler,ps))
compile_with_cache path directory startup_arguments arguments prog=:(NotCompiling,ps)
# command = quoted_string path +++ " " +++ arguments
# (ok,exitcode, os4) = CallProcess command [] directory "" "" "" 99
# (ok,exitcode, os4) = call_process command directory 99
# ok = trace_n ("NotCompiling",command) ok
= (ok,exitcode,prog)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment