Skip to content

Commit

Permalink
- Install scripts in share/omc/scripts instead of bin
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5375 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 24, 2010
1 parent 8b5b506 commit 9f32ecb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Compiler/CevalScript.mo
Expand Up @@ -782,7 +782,7 @@ algorithm
omhome = Settings.getInstallationDirectoryPath();
omhome_1 = System.trim(omhome, "\"");
pd = System.pathDelimiter();
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"bin",pd,"doPlot",cit});
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"doPlot",cit});
uniqueStr = intString(tick());
tmpPlotFile = Util.stringAppendList({pwd,pd,"tmpPlot_",uniqueStr,".plt"});
res = ValuesUtil.writePtolemyplotDataset(tmpPlotFile, value, vars_2, "Plot by OpenModelica");
Expand Down Expand Up @@ -1507,7 +1507,7 @@ algorithm
omhome = Settings.getInstallationDirectoryPath();
omhome_1 = System.trim(omhome, "\"");
pd = System.pathDelimiter();
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"bin",pd,"doPlot",cit});
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"doPlot",cit});
uniqueStr = intString(tick());
tmpPlotFile = Util.stringAppendList({pwd,pd,"tmpPlot_",uniqueStr,".plt"});
res = ValuesUtil.writePtolemyplotDataset(tmpPlotFile, value, vars_1, "Plot by OpenModelica");
Expand Down Expand Up @@ -1606,7 +1606,7 @@ algorithm
omhome = Settings.getInstallationDirectoryPath();
omhome_1 = System.trim(omhome, "\"");
pd = System.pathDelimiter();
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"bin",pd,"doPlot",cit});
plotCmd = Util.stringAppendList({cit,omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"doPlot",cit});
uniqueStr = intString(tick());
tmpPlotFile = Util.stringAppendList({pwd,pd,"tmpPlot_",uniqueStr,".plt"});
res = ValuesUtil.sendPtolemyplotDataset(value, vars_1, "Plot by OpenModelica", interpolation, title, legend, grid, logX, logY, xLabel, yLabel, points, Exp.printExpStr(xRange), Exp.printExpStr(yRange));
Expand Down Expand Up @@ -2680,7 +2680,7 @@ algorithm
System.writeFile(libsfilename, libs_str);
s_call =
Util.stringAppendList({"set OPENMODELICAHOME=",omhome_1,"&& ",
omhome_1,pd,"bin",pd,"Compile"," ",fileprefix," ",noClean});
omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"Compile"," ",fileprefix," ",noClean});
Debug.fprintln("dynload", "compileModel: running " +& s_call);
0 = System.systemCall(s_call) ;
Debug.fprintln("dynload", "compileModel: successful! ");
Expand Down Expand Up @@ -2735,7 +2735,7 @@ algorithm
* please leave Compile instead of Compile.bat
* here as it has to work on Linux too
*/
s_call = Util.stringAppendList({"\"",omhome_1,pd,"bin",pd,"Compile","\""});
s_call = Util.stringAppendList({"\"",omhome_1,pd,"share",pd,"omc",pd,"scripts",pd,"Compile","\""});
retVal = System.regularFileExists(s_call);
true = retVal <> 0;
str=Util.stringAppendList({"command ",s_call," not found. Check $OPENMODELICAHOME"});
Expand Down
9 changes: 2 additions & 7 deletions Compiler/Makefile.in
Expand Up @@ -9,9 +9,7 @@
srcdir= .
top_builddir= ..
builddir_bin=$(top_builddir)/build/bin
builddir_lib=$(top_builddir)/build/lib/omc
builddir_inc=$(top_builddir)/build/include/omc
builddir_doc=$(top_builddir)/build/doc
builddir_scripts=$(top_builddir)/build/share/omc/scripts

ANTLR_HOME = @antlrhome@
EXEEXT = @EXEEXT@
Expand Down Expand Up @@ -69,10 +67,7 @@ $(PROGP): omc_profiler
cp omc_profiler/$(PROGP)$(EXEEXT) $(builddir_bin)/

install_scripts:
for x in $(SCRIPT_FILES); do \
echo Copying $$x into $(builddir_bin); \
cp scripts/$$x $(builddir_bin)/; \
done
cd scripts; cp $(SCRIPT_FILES) ../$(builddir_scripts)

install: install_scripts $(PROG)

Expand Down
7 changes: 6 additions & 1 deletion Makefile.common
Expand Up @@ -23,6 +23,7 @@ mkbuilddirs:
mkdir -p $(builddir_lib)
mkdir -p $(builddir_inc)
mkdir -p $(builddir_java)
mkdir -p $(builddir_share)/omc/scripts
mkdir -p $(builddir_share)/omnotebook
mkdir -p $(builddir_share)/omshell
mkdir -p $(builddir_doc)/omc/testmodels
Expand Down Expand Up @@ -108,7 +109,9 @@ install-dirs:
mkdir -p ${INSTALL_INCLUDEDIR}
mkdir -p ${INSTALL_DOCDIR}
mkdir -p ${INSTALL_DOCDIR}/testmodels
mkdir -p ${INSTALL_SHAREDIR}/omnotebook ${INSTALL_SHAREDIR}/omshell ${INSTALL_JAVADIR}
mkdir -p ${INSTALL_SHAREDIR}/omnotebook ${INSTALL_SHAREDIR}/omshell
mkdir -p ${INSTALL_SHAREDIR}/omc/scripts ${INSTALL_JAVADIR}


install: install-dirs
echo Installing OpenModelica...
Expand All @@ -125,5 +128,7 @@ install: install-dirs
# Shared data
cp -p ${builddir_share}/omnotebook/* ${INSTALL_SHAREDIR}/omnotebook
cp -p ${builddir_share}/omshell/* ${INSTALL_SHAREDIR}/omshell
# Scripts
cp -p ${builddir_share}/omc/scripts/* ${INSTALL_SHAREDIR}/omc/scripts
# Java
cp -p ${builddir_java}/* ${INSTALL_JAVADIR}

0 comments on commit 9f32ecb

Please sign in to comment.