install default XML startup files under /home/nemu/.musrfit rather than /bin. Since this is a substantial indentation, the version number has been incremented.

This commit is contained in:
suter_a 2016-02-17 12:59:03 +01:00
parent bd05f57523
commit 352ac5db21
8 changed files with 39 additions and 23 deletions

View File

@ -2,11 +2,16 @@
# ChangeLog
#---------------------------------------------------------------------
changes since 0.17.0
===================================
changes since 0.16.0
===================================
NEW 2016-01-22 update of the docu which now describes the RRF option.
CHANGED 2016-02-17 start to move the startup XML-files to $HOME/.musrfit
rather than having it within $prefix/bin.
CHANGED 2016-02-17 move the startup XML-files to $HOME/.musrfit
rather than having it within $prefix/bin. Increase
therefore the version number to 0.17.0
CHANGED 2016-02-16 if the LEM file is created 2012 or later and the
data-file-format tag is still ROOT-NPP or ROOT-PPC, it
will automatically switched to MUSR-ROOT. This way red/green

View File

@ -30,3 +30,4 @@ For a more exhaustive user documentation see:
### Contact ###
<andreas.suter@psi.ch>

View File

@ -1,7 +1,7 @@
AC_REVISION([m4_esyscmd_s([git describe --always])])
AC_PREREQ(2.63)
AC_INIT([musrfit],[0.16.0],[andreas.suter@psi.ch])
AC_INIT([musrfit],[0.17.0],[andreas.suter@psi.ch])
AC_CONFIG_AUX_DIR(admin)
AC_CANONICAL_HOST
#AC_MSG_RESULT([${host} ${host_cpu} ${host_vendor} ${host_os}])
@ -35,7 +35,7 @@ dnl -----------------------------------------------
#release versioning
MUSR_MAJOR_VERSION=0
MUSR_MINOR_VERSION=16
MUSR_MINOR_VERSION=17
MUSR_MICRO_VERSION=0
#release versioning
@ -1401,6 +1401,7 @@ echo ""
echo " Installation directories:"
echo " -------------------------"
echo ""
echo " Programs and XML configuration files: ${INSTALLDIR}/bin"
echo " Programs: ${INSTALLDIR}/bin"
echo " XML configuration files: ${HOME}/.musrfit"
echo " Documentation: ${DOCDIR}"
echo ""

View File

@ -60,7 +60,7 @@ write_musrRoot_runHeader_SOURCES = write_musrRoot_runHeader.cpp
musrRootValidation_SOURCES = musrRootValidation.cpp
dump_header_SOURCES = dump_header.cpp
xmldir = $(bindir)
xmldir = $(HOME)/.musrfit
xml_DATA = musrfit_startup.xml
LIBADD = $(PMUSR_LIBS) $(MUSR_ROOT_LIBS) $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS)
@ -82,7 +82,7 @@ install-xmlDATA: $(xml_DATA)
DIFF="$$(diff "$(DESTDIR)$(xmldir)/$(xml_DATA)" "$(xml_DATA)" 2>&1)"; \
if test "x$$DIFF" != "x"; then \
echo " " && \
echo " musrfit_startup.xml in $(bindir)" && \
echo " musrfit_startup.xml in $(xmldir)" && \
echo " is different from the distribution's version." && \
echo " Do you want to overwrite it? [y/N]" && \
read OVERWRITE && \
@ -101,7 +101,7 @@ uninstall-xmlDATA:
DIFF="$$(diff "$(DESTDIR)$(xmldir)/$(xml_DATA)" "$(xml_DATA)" 2>&1)"; \
if test "x$$DIFF" != "x"; then \
echo " " && \
echo " musrfit_startup.xml in $(bindir)" && \
echo " musrfit_startup.xml in $(xmldir)" && \
echo " is different from the distribution's version." && \
echo " Do you want to remove it? [y/N]" && \
read REMOVE && \

View File

@ -93,11 +93,13 @@ PStartupHandler::PStartupHandler()
fStartupFilePath = "";
// get default path (for the moment only linux like)
Char_t *pmusrpath;
Char_t *home;
Char_t *pmusrpath=0;
Char_t *home=0;
Char_t musrpath[128];
Char_t startup_path_name[128];
Bool_t pmusrpathfound = false;
Bool_t found = false;
strncpy(musrpath, "", sizeof(musrpath));
// check if the startup file is found in the current directory
strcpy(startup_path_name, "./musrfit_startup.xml");
@ -105,20 +107,27 @@ PStartupHandler::PStartupHandler()
fStartupFileFound = true;
fStartupFilePath = TString(startup_path_name);
} else { // startup file is not found in the current directory
// check if the MUSRFITPATH system variable is set
// check if the startup file is found under $HOME/.musrfit
home = getenv("HOME");
if (home != 0) {
sprintf(musrpath, "%s/.musrfit", home);
found = true;
}
pmusrpath = getenv("MUSRFITPATH");
if (!found) {
// check if the MUSRFITPATH system variable is set
if (pmusrpath != 0) {
if (strcmp(pmusrpath, "")) { // MUSRFITPATH variable set but empty
pmusrpathfound = true;
found = true;
}
}
if (!pmusrpathfound) { // MUSRFITPATH not set or empty, will try default one
}
if (!found) { // MUSRFITPATH not set or empty, will try default one
home = getenv("ROOTSYS");
sprintf(musrpath, "%s/bin", home);
cerr << endl << "**WARNING** MUSRFITPATH environment variable not set will try " << musrpath << endl;
} else {
strncpy(musrpath, pmusrpath, sizeof(musrpath));
}
sprintf(startup_path_name, "%s/musrfit_startup.xml", musrpath);
fStartupFilePath = TString(startup_path_name);
if (StartupFileExists(startup_path_name)) {

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/facilities/software/musrfit/user/MUSR/MusrGui.html">
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/facilities/software/musrfit/user/MUSR/MusrGui.html">
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<musrfit xmlns="http://lmu.web.psi.ch/facilities/software/musrfit/user/MUSR/MusrFit.html">
<musrfit xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/WebHome.html">
<comment>
Defines default settings for the musrfit package
</comment>