There are 3 steps to making this work for the package.
1. Modify the "install-dirs" and "install-kernel-indep" rules in
src/Makefile to copy the files. If the files are sometimes useful
for a user to view/read without running pncconf, then they should go
in /usr/share/doc/emc2/pncconf. Otherwise, they should go in
/usr/share/emc/pncconf.
2. If necessary, modify debian/emc2.files.in to list the new files.
In the two cases I suggested above, this should not be necessary; all
files under /usr/share/doc/emc2 and /usr/share/emc are already
included automatically.
3. Modify pncconf so that it will find the files in relation to the
pncconf script. Sometimes this means looking in two places--one that
matches the RIP directory structure, one that matches the directory
structure.
Taking an example from pncconf, it first finds the directory above
the one containing the scriptscript (so that from /usr/bin/pncconf,
BASE="/usr" and from /home/jepler/emc2-dev/bin/pncconf,
BASE="/home/jepler/emc2-dev"):
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), ".."))
Then later when determining the path for the "examples" ncfiles, it
constructs a path to the files included with emc then makes a symlink
to it from the user's ~/emc2/nc_files directory:
examples = os.path.join(BASE, "share", "emc", "ncfiles")
if not os.path.exists(examples):
examples = os.path.join(BASE, "nc_files")
if os.path.exists(examples):
os.symlink(examples, os.path.join(ncfiles, "examples"))
You'll keep the existing calculation of BASE as it is, and just use
it again:
helpdir = os.path.join(BASE, "share", "doc", "emc2", "pncconf")
if not os.path.exists(helpdir):
helpdir = os.path.join(
BASE, "src", "emc", "usr_intf", "pncconf", "pncconf-help")
.. then a specific helpfile is
axisdiagram = os.path.join(helpdir, "axisdiagram1.png")
And, in case you're not aware of it already, to build a package you:
debian/update-dch-from-git
debian/configure -a # EITHER for realtime systems
debian/configure sim # OR for simulator systems
dpkg-buildpackage # consider using -B -uc flags
Install with
sudo dpkg -i ../emc2*.i386.deb
# don't actually use wildcard, but name the specific file to
# install
or list files with
dpkg-deb -c ../emc2_2.4*.386.deb
# don't actually use wildcard, but name the specific file to
# list contents
hopefully this will let you adequately test your solution before pushing
it.
Unless it turns out to be more complicated than I outlined above, this
bugfix should probably go on the v2.4_branch.
Jeff
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers