Skip to content

Commit

Permalink
Refs #master check if vglrun is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Jun 6, 2019
1 parent e48b1af commit f8b312a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 15 additions & 5 deletions crystalplan.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
#!/usr/bin/env python
#!/bin/sh
# whether or not to use vglrun
if [ -n "${NXSESSIONID}" ]; then
command -v vglrun >/dev/null 2>&1 || { echo >&2 "MantidPlot requires VirtualGL but it's not installed. Aborting."; exit 1; }
VGLRUN="vglrun"
elif [ -n "${TLSESSIONDATA}" ]; then
command -v vglrun >/dev/null 2>&1 || { echo >&2 "MantidPlot requires VirtualGL but it's not installed. Aborting."; exit 1; }
VGLRUN="vglrun"
fi
$VGLRUN /usr/bin/python <<END
"""The CrystalPlan application.
CrystalPlan is an experiment planning tool for crystallography.
You can choose an instrument and supply your sample's lattice
parameters to simulate which reflections will be measured,
by which detectors and at what wavelengths.
Author: Janik Zikovsky, zikovskyjl@ornl.gov
Version: $Id$
"""
# Author: Janik Zikovsky, zikovskyjl@ornl.gov
# Version: $Id$

#Simply import and launch the GUI
import CrystalPlan.gui.main
CrystalPlan.gui.main.handle_arguments_and_launch(InstalledVersion=True)
CrystalPlan.gui.main.handle_arguments_and_launch(InstalledVersion=True)
END
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
formats = rpm

[bdist_rpm]
release = 10
release = 11
packager = ORNL NDAV
#doc_files = docs/user_guide.pdf
requires = numpy,scipy,python-traitsui,python-matplotlib-wx,Mayavi

0 comments on commit f8b312a

Please sign in to comment.