Skip to content

Commit

Permalink
- Use Settings.mo instead of readEnv to get OPENMODELICAHOME
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Nov 9, 2010
1 parent a8cbf2c commit 4a43d8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion Compiler/Interactive.mo
Expand Up @@ -17782,7 +17782,6 @@ algorithm
local
Absyn.Exp e1,e2,e11,e21;
Absyn.Ident id;
list<Absyn.Exp> pargs;
case({},rel,ext_arg) then (({},ext_arg));
case(e1::pargs,rel,ext_arg)
equation
Expand Down
12 changes: 6 additions & 6 deletions Compiler/Main.mo
Expand Up @@ -1195,7 +1195,7 @@ public function main
start the translation."
input list<String> inStringLst;
algorithm
_ := matchcontinue (inStringLst)
() := matchcontinue (inStringLst)
local
String ver_str,errstr;
list<String> args_1,args;
Expand All @@ -1206,7 +1206,7 @@ algorithm
// Setup mingw path only once.
case _
equation
omhome = System.readEnv("OPENMODELICAHOME");
omhome = Settings.getInstallationDirectoryPath();
// print("OMHOME:" +& omhome +& "|");
true = "Windows_NT" ==& System.os();
oldpath = System.readEnv("PATH");
Expand All @@ -1219,7 +1219,7 @@ algorithm
args_1 = RTOpts.args(args);

false = System.userIsRoot();
_ = System.readEnv("OPENMODELICAHOME");
_ = Settings.getInstallationDirectoryPath();

// debug_show_depth(2);

Expand Down Expand Up @@ -1259,7 +1259,7 @@ algorithm
case args as _::_
equation
false = System.userIsRoot();
_ = System.readEnv("OPENMODELICAHOME");
_ = Settings.getInstallationDirectoryPath();
failure(args_1 = RTOpts.args(args));
printUsage();
then ();
Expand All @@ -1271,7 +1271,7 @@ algorithm
case _
equation
false = System.userIsRoot();
_ = System.readEnv("OPENMODELICAHOME");
_ = Settings.getInstallationDirectoryPath();
print("# Error encountered! Exiting...\n");
print("# Please check the error message and the flags.\n");
errstr = Print.getErrorString();
Expand All @@ -1284,7 +1284,7 @@ algorithm
case _
equation
false = System.userIsRoot();
failure(_ = System.readEnv("OPENMODELICAHOME"));
failure(_ = Settings.getInstallationDirectoryPath());
print("Error: OPENMODELICAHOME was not set.\n");
print(" Read the documentation for instructions on how to set it properly.\n");
print(" Most OpenModelica release distributions have scripts that set OPENMODELICAHOME for you.\n\n");
Expand Down

0 comments on commit 4a43d8f

Please sign in to comment.