diff options
author | 2011-04-21 16:12:34 +0000 | |
---|---|---|
committer | 2011-04-21 16:12:34 +0000 | |
commit | 9ccd1899dba51e24216d0de8865eecf029f44cef (patch) | |
tree | 0b25a558459b4d8f789e87162646587488f31ae9 /lib/envars.ml | |
parent | 08642139dc3edf2caf94e7f246c15644daca16ad (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 'lib/envars.ml')
-rw-r--r-- | lib/envars.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/envars.ml b/lib/envars.ml index a05029c95..f19834527 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -14,6 +14,13 @@ let coqbin () = then Filename.concat Coq_config.coqsrc "bin" else System.canonical_path_name (Filename.dirname Sys.executable_name) +(* On win32, we add coqbin to the PATH at launch-time (this used to be + done in a .bat script). *) + +let _ = + if Coq_config.arch = "win32" then + Unix.putenv "PATH" (coqbin() ^ ";" ^ System.getenv_else "PATH" "") + let guess_coqlib () = let file = "states/initial.coq" in if Sys.file_exists (Filename.concat Coq_config.coqlib file) |