-ForkedCall::ForkedCall(string const & path)
- : cmd_prefix_(empty_string())
-{
- if (path.empty() || lyxrc.texinputs_prefix.empty())
- return;
-
- string const texinputs = os::latex_path_list(
- replaceCurdirPath(path, lyxrc.texinputs_prefix));
- string const sep = string(1, os::path_separator(os::TEXENGINE));
- string const env = getEnv("TEXINPUTS");
-
- if (os::shell() == os::UNIX)
- cmd_prefix_ = "env 'TEXINPUTS=." + sep + texinputs
- + sep + env + "' ";
- else
- cmd_prefix_ = "cmd /p /c set TEXINPUTS=." + sep + texinputs
- + sep + env + " & ";
-}
+ForkedCall::ForkedCall(string const & path, string const & lpath)
+ : cmd_prefix_(to_filesystem8bit(from_utf8(latexEnvCmdPrefix(path, lpath))))
+{}