Skip to content

Commit

Permalink
only set TZDIR on Windows and MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
vandenman authored and JorisGoosen committed Nov 29, 2023
1 parent a80237c commit 0e2ec8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Desktop/utilities/processhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ QProcessEnvironment ProcessHelper::getProcessEnvironmentForJaspEngine()
env.insert("R_PROFILE", "something-which-doesn't-exist");
env.insert("R_PROFILE_USER", "something-which-doesn't-exist");
env.insert("R_ENVIRON_USER", "something-which-doesn't-exist");
env.insert("TZDIR", TZDIR);

//Lets set LC_ALL to utf8 before the process starts.
//env.insert("LC_ALL", ".UTF8");
Expand All @@ -81,14 +82,14 @@ QProcessEnvironment ProcessHelper::getProcessEnvironmentForJaspEngine()
//env.insert("R_ENVIRON_USER", "something-which-doesnt-exist");

env.insert("LC_CTYPE", "UTF-8"); //This isn't really a locale but seems necessary to get proper output from gettext on mac
env.insert("TZDIR", TZDIR);

#else // linux
env.insert("LD_LIBRARY_PATH", rHome.absoluteFilePath("lib") + ":" + rHome.absoluteFilePath("library/RInside/lib") + ":" + rHome.absoluteFilePath("library/Rcpp/lib") + ":" + rHome.absoluteFilePath("site-library/RInside/lib") + ":" + rHome.absoluteFilePath("site-library/Rcpp/lib") + ":/app/lib/:/app/lib64/");
env.insert("R_HOME", rHome.absolutePath());
env.insert("R_LIBS", programDir.absoluteFilePath("R/library") + custom_R_library + ":" + rHome.absoluteFilePath("library") + ":" + rHome.absoluteFilePath("site-library"));
#endif

env.insert("TZDIR", TZDIR);
env.insert("R_LIBS_SITE", "");
env.insert("R_LIBS_USER", AppDirs::userRLibrary().toStdString().c_str());

Expand Down

0 comments on commit 0e2ec8a

Please sign in to comment.