downloaded modules by Kepler module manager should know the path of main Kepler installation.
In Kepler 2.2, new modules downloaded by Kepler module manager are located at ~/KeplerData/kepler.modules/, which includes both zip file and unzipped module fold. Some modules have their own executable files which need the classes in main Kepler installation, such as the *.sh files in master-slave module. To correctly start these executables, they need to know the path of main Kepler installation, namely the path where kepler.sh is located when users install Kepler 2.2. Since the installation paths for Kepler 2.2 could be different, there is no conventional path for it.
I found the build-area folder in ~/KeplerData/kepler.modules/, it could be a good place to put a info file, e.g. keplerPath.txt, in this folder telling the Kepler installation path. By this way, downloaded modules from Kepler module manager will be able to find the classes in main Kepler installation.
#3 Updated by Christopher Brooks almost 9 years ago
I suggest setting a Java property. For Ptolemy, we use ptolemy.ptII.dir.
On the Mac,
The izPack Windows executable does not have something similar.
ptolemy.util.StringUtilities.getProperty() has hacky code that checks
for the ptolemy.ptII.dir property. If it is not set, then it looks
for the StringUtilities class using getResource(). There is quite a
bit of magic there to handle Jar URLs etc.
In an Expression actor, if you call
then you will get something like:
I've attached a model that does that.
It should be checked in a release to see if it works with the installers.
#4 Updated by jianwu jianwu almost 8 years ago
I updated class in build-area to write install-path.txt to ~/KeplerDatat/kepler.modules/build-area dir at version 30323. closing the bug.
Christopher, as I explained in comment 2, this bug happens before Kepler start, not after Kepler start. So the new added install-path.txt can help modules in ~/KeplerData/kepler.modules/ to find where kepler is installed.
#6 Updated by jianwu jianwu almost 8 years ago
(In reply to comment #5)
One problem with your change at r30323 is that it only writes this
install-path.txt on a new install. A user could subsequently move/rename their
you are right. I re-open it and will work on it, so that install-path.txt can be reset if the installation path is changed. It will also work better in case there are two kepler installations (same or different versions).