aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/coqide_main.ml4
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-21 16:12:34 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-04-21 16:12:34 +0000
commit9ccd1899dba51e24216d0de8865eecf029f44cef (patch)
tree0b25a558459b4d8f789e87162646587488f31ae9 /ide/coqide_main.ml4
parent08642139dc3edf2caf94e7f246c15644daca16ad (diff)
Win32: remove the need for Coq.bat and Coqide.bat
This is an adaptation of commit r13750 of branch 8.3 - coqlib is currently computed relatively of Sys.executable_name, hence no need to set it manually - in Win32, better detection of user home dir : in System.ml, if HOME isn't set, we look now for HOMEDRIVE\HOMEPATH, and then for USERPROFILE - concerning PATH, in Win32 we now add coqbin (or the location of coqide) to PATH during the initialization. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14041 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'ide/coqide_main.ml4')
-rw-r--r--ide/coqide_main.ml49
1 files changed, 9 insertions, 0 deletions
diff --git a/ide/coqide_main.ml4 b/ide/coqide_main.ml4
index 9fc0f72b7..7c0f23170 100644
--- a/ide/coqide_main.ml4
+++ b/ide/coqide_main.ml4
@@ -18,7 +18,16 @@ let initmac () = IFDEF MacInt THEN gtk_mac_init Coqide.do_load Coqide.forbid_qui
let macready () = IFDEF MacInt THEN gtk_mac_ready () ELSE () END
+(* On win32, we add the directory of coqide to the PATH at launch-time
+ (this used to be done in a .bat script). *)
+
+let winpath () =
+ if Coq_config.arch = "win32" then
+ Unix.putenv "PATH" (Filename.dirname Sys.executable_name ^ ";" ^
+ (try Sys.getenv "PATH" with _ -> ""))
+
let () =
+ winpath ();
let argl = Array.to_list Sys.argv in
let argl = Coqide.set_coqtop_path argl in
let files = Coqide.process_argv argl in