Skip to content

Commit

Permalink
- Make omc exit if OPENMODELICAHOME is not set.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5358 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 23, 2010
1 parent ef0326b commit c1ab7db
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Compiler/runtime/systemimpl.c
Expand Up @@ -257,10 +257,15 @@ void System_5finit(void)
free(newPath);
}
free(mingwpath);
} else {
fprintf(stderr, "Error: OPENMODELICAHOME was not set.\n");
fprintf(stderr, " Read the documentation for instructions on how to set it properly.\n"
fprintf(stderr, " Most OpenModelica distributions have scripts that set OPENMODELICAHOME for you.\n");
exit(1);
}

_putenv("SENDDATALIBS=-lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32");
}
_putenv("SENDDATALIBS=-lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32");
}


RML_BEGIN_LABEL(System__isSameFile)
Expand Down Expand Up @@ -1882,6 +1887,12 @@ void System_5finit(void)
sendDataLibs,
"SENDDATALIBS=-lsendData");
}
if (getenv("OPENMODELICAHOME") == 0) {
fprintf(stderr, "Error: OPENMODELICAHOME was not set.\n");
fprintf(stderr, " Read the documentation for instructions on how to set it properly.\n"
fprintf(stderr, " Most OpenModelica distributions have scripts that set OPENMODELICAHOME for you.\n");
exit(1);
}
/* set the SENDDATALIBS environment variable */
putenv(strdup(sendDataLibs));
}
Expand Down

0 comments on commit c1ab7db

Please sign in to comment.