On Wednesday 08 June 2005 00:05, Uwe Stöhr wrote:
>  > Do you get a pop up dialog appearing
>  >
>  >   Failed attempting to set 'path_prefix' in the configure
>  > script"
>
>                                 OK
>
> No because the 'path_prefix' is set correctly. As the path to the
> sh.exe isn't in the PATH (I haven't installed MSYS and use stripped
> files), Windows shows a message that it don't know how to open
> shell files. I can then set a path to the sh.exe and say open all
> shell files with this sh.exe. Then a registry entry is set, and Win
> don't bothers me the next time. But this isn't user friendly.
>
> regards Uwe
>
> p.s. please CC answers to me

I think that we're talking past each other. What I am saying to you 
seems clear to me and what you're saying to me seems clear to you.

But, somehow, I'm not understanding you.

If no dialog pops up then "sh configure" ran correctly, no? 
path_prefix is stored in the configure script so that LyX can grab it 
from the generated lyxrc.defaults --- and then use it to set the PATH 
variable.

However, the installer also runs configure itself and it does so only 
after it has set the path:

  std::string configure_dir(configure_file);
  std::string::size_type const final_slash =
      configure_dir.find_last_of('\\');
  if (final_slash == std::string::npos) {
    pushstring("-1");
    return;
  }
  configure_dir = configure_dir.substr(0, final_slash);
  if (SetCurrentDirectory(configure_dir.c_str()) == 0) {
    pushstring("-1");
    return;
  }

  char path[MAX_PATH];
  if (GetEnvironmentVariable("PATH", path, MAX_PATH) == 0) {
    pushstring("-1");
    return;
  }

  std::string const path_str = std::string(path_prefix) + ';' + path;
  if (SetEnvironmentVariable("PATH", path_str.c_str()) == 0) {
    pushstring("-1");
    return;
  }

  if (system("start /min sh.exe configure") != 0) {
    pushstring("-1");
    return;
  }

  pushstring("0");

If any of these pushstring("-1") is called then the installer will pop 
up the warning dialog.

Angus (getting confused and therefore going to bed)

Reply via email to