protz / ocaml-installer

The official windows installer (built using NSIS) for OCaml
http://protz.github.com/ocaml-installer/
GNU General Public License v3.0
66 stars 11 forks source link

Impossible to find ocaml.exe. I quit. #6

Closed nitnelave closed 12 years ago

nitnelave commented 12 years ago

This is the error message I'm getting when starting ocaml, and it closes right away. I freshly installed it on a computer running windows 7, with the windows installer I got from there : http://protz.github.com/ocaml-installer/ (version 3.12.1) Any idea of what I should do? I tried installing it/uninstalling it, and I installed MinGW/MSYS before. I also added emacs and the other plugin offered in the installer. If you need any more details, I'll answer as I can.

Thanks,

nitnelave

protz commented 12 years ago

Can you describe precisely what you mean by « when starting ocaml »? How did you run it? From the start menu? What's the name of the entry?

nitnelave commented 12 years ago

Both when starting from the shortcut in the start menu and when running the E:\Program Files\OCaml\OCamlWin.exe In the bin folder I do have an ocaml.exe, and it runs just fine (opens a command prompt in which I can run OCaml instructions).

protz commented 12 years ago

Maybe a PATH issue? What about starting emacs and doing M-x (alt-x) run-caml ?

On Wed 25 Jan 2012 12:20:19 AM CET, nitnelave wrote:

Both when starting from the shortcut in the start menu and when running the E:\Program Files\OCaml\OCamlWin.exe In the bin folder I do have an ocaml.exe, and it runs just fine (opens a command prompt in which I can run OCaml instructions).


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3642727

nitnelave commented 12 years ago

That works. How would I fix the path to use ocaml's interface?

nitnelave commented 12 years ago

My path variable is that : E:\Program Files\OCaml\bin;E:\Program Files\OCaml;E:\Program Files\OCaml\emacs-23.3\bin;E:\Tcl\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;E:\Program Files\Git\cmd

How comes it doesn't find ocaml.exe?

steventrouble commented 12 years ago

I have the same problem, by the way.

steventrouble commented 12 years ago

Fixed it. Go to your registry, go to HKEY_CURRENT_USER/Software Add a key called "Objective Caml" and inside of it, add the value "InterpreterPath" "C:\Program Files (x86)\ocaml\bin\ocaml.exe"

nitnelave commented 12 years ago

Great! Thanks! I'll try that this week end.

Valentin

On 1 févr. 2012, at 23:57, Steven Weissreply@reply.github.com wrote:

Fixed it. Go to your registry, go to HKEY_CURRENT_USER/Software Add a key called "Objective Caml" and inside of it, add the value "InterpreterPath" "C:\Program Files (x86)\ocaml\bin\ocaml.exe"


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769051

protz commented 12 years ago

Steven, where did you find out about this InterpreterPath registry key?

On Thu 02 Feb 2012 12:10:44 AM CET, nitnelave wrote:

Great! Thanks! I'll try that this week end.

Valentin

On 1 févr. 2012, at 23:57, Steven Weissreply@reply.github.com wrote:

Fixed it. Go to your registry, go to HKEY_CURRENT_USER/Software Add a key called "Objective Caml" and inside of it, add the value "InterpreterPath" "C:\Program Files (x86)\ocaml\bin\ocaml.exe"


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769051


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769233

steventrouble commented 12 years ago

Someone posted a bug report about it, and mentioned the InterpreterPath registry key. I tried it, but I put it in the ocaml directory, but that didn't work, so I searched through the source and noticed that it looked in the "objective caml" path for some weird reason.

On Wed, Feb 1, 2012 at 10:04 PM, Jonathan Protzenko < reply@reply.github.com

wrote:

Steven, where did you find out about this InterpreterPath registry key?

On Thu 02 Feb 2012 12:10:44 AM CET, nitnelave wrote:

Great! Thanks! I'll try that this week end.

Valentin

On 1 fvr. 2012, at 23:57, Steven Weissreply@reply.github.com wrote:

Fixed it. Go to your registry, go to HKEY_CURRENT_USER/Software Add a key called "Objective Caml" and inside of it, add the value "InterpreterPath" "C:\Program Files (x86)\ocaml\bin\ocaml.exe"


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769051


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769233


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3773183

nitnelave commented 12 years ago

Tested it, it works! Thanks, man!

On 1 févr. 2012, at 23:57, Steven Weiss reply@reply.github.com wrote:

Fixed it. Go to your registry, go to HKEY_CURRENT_USER/Software Add a key called "Objective Caml" and inside of it, add the value "InterpreterPath" "C:\Program Files (x86)\ocaml\bin\ocaml.exe"


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-3769051

protz commented 12 years ago

So, I just got back to this; I'm a little confused.

Did you guys not get the dialog box that prompts you for the location of ocaml.exe.?

nitnelave commented 12 years ago

No, not at all. When I launched the executable, we could see the window behind getting loaded, then a popup, and "impossible to find ocaml.exe. I quit" That's it.

On 03/23/12 15:28, Jonathan Protzenko wrote:

So, I just got back to this; I'm a little confused.

  • Indeed, the program is first trying to read from a hardcoded registry string the location of the OCaml executable. I guess I could make the installer write out that registry string.
  • However, in the event that that we can't access the file at that path or none of the two acceptable registry keys exist, the installer should prompt you for the location of the ocaml.exe.

Did you guys not get the dialog box that prompts you for the location of ocaml.exe.?


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-4659981

protz commented 12 years ago

Huh! Maybe a bug with the logic that's supposed to prompt you for the right location. Did you have a stale registry key in HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER (resulting from a previous run of the older installer)?

nitnelave commented 12 years ago

I don't have my computer right there. I'll check when I have it, but I highly doubt it, as it was my first time running ocaml on that computer.

On 03/23/12 17:12, Jonathan Protzenko wrote:

Huh! Maybe a bug with the logic that's supposed to prompt you for the right location. Did you have a stale registry key in HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER (resulting from a previous run of the older installer)?


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662209

protz commented 12 years ago

Ok there's got to be some sort of bug in the code of OCamlWin, then. Can you give me more details about whether you were running as an administrator, or not, and which version of Windows?

Thanks,

jonathan

On Fri 23 Mar 2012 05:14:02 PM CET, nitnelave wrote:

I don't have my computer right there. I'll check when I have it, but I highly doubt it, as it was my first time running ocaml on that computer.

On 03/23/12 17:12, Jonathan Protzenko wrote:

Huh! Maybe a bug with the logic that's supposed to prompt you for the right location. Did you have a stale registry key in HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER (resulting from a previous run of the older installer)?


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662209


Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662255

nitnelave commented 12 years ago

I was on an administrator version (but not explicitly running as admin as with the right-click run as admin), and I was using Windows 7 Ultimate.

On 03/23/12 17:20, Jonathan Protzenko wrote:

Ok there's got to be some sort of bug in the code of OCamlWin, then. Can you give me more details about whether you were running as an administrator, or not, and which version of Windows?

Thanks,

jonathan

On Fri 23 Mar 2012 05:14:02 PM CET, nitnelave wrote:

I don't have my computer right there. I'll check when I have it, but I highly doubt it, as it was my first time running ocaml on that computer.

On 03/23/12 17:12, Jonathan Protzenko wrote:

Huh! Maybe a bug with the logic that's supposed to prompt you for the right location. Did you have a stale registry key in HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER (resulting from a previous run of the older installer)?


Reply to this email directly or view it on GitHub:

https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662209

Reply to this email directly or view it on GitHub:

https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662255

Reply to this email directly or view it on GitHub: https://github.com/protz/ocaml-installer/issues/6#issuecomment-4662411

protz commented 12 years ago

Alright, I suspect a bug in OCamlWinPlus. Anyway, the installer now properly adds (and remove) the entry in the registry. Thanks for pointing this out!

Spykie4884 commented 12 years ago

If Ocaml say impossible to find OCaml.exe do this: disconnect your antivirus (avast...), uninstall OCaml, install OCaml, add OCaml folder in exception in your antivirus, connect your antivirus. I just do it and it's work !