-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8b312a
commit 142900f
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env python | ||
# 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; } | ||
import os | ||
if os.environ.get('NXSESSIONID') is not None: | ||
os.system('command -v vglrun >/dev/null 2>&1 || { echo >&2 "CrystalPlan requires VirtualGL but it is 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; } | ||
elif os.environ.get('TLSESSIONDATA') is not None: | ||
os.system('command -v vglrun >/dev/null 2>&1 || { echo >&2 "CrystalPlan requires VirtualGL but it is 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) | ||
END | ||
os.system(VGLRUN +" /usr/bin/python <<END\n"\ | ||
"import CrystalPlan.gui.main\n"\ | ||
"CrystalPlan.gui.main.handle_arguments_and_launch(InstalledVersion=True)\n"\ | ||
"END") |