forked from ctrl_packages/epics_launcher
cleanup
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||

|
||||
|
||||
# Overview
|
||||
|
||||
The Launcher is a Python based, menu oriented application which allows users to launch applications and execute scripts. The Launcher is a customizable tool which builds its appearance (e.g. for different facilitates) depending on (menu) configuration files.
|
||||
@@ -10,7 +8,7 @@ The Launcher is a Python based, menu oriented application which allows users to
|
||||
The Launcher can be started as follows:
|
||||
|
||||
```bash
|
||||
pylauncher <configuration>
|
||||
epics_launcher <configuration>
|
||||
```
|
||||
|
||||
where __configuration__ is the configuration file that defines the Launcher menu e.g. for a specific facility, beamline, setup, etc. .
|
||||
@@ -23,8 +21,8 @@ It is possible to override the Launchers default mapping and/or default color sc
|
||||
For all available options and detailed help run
|
||||
|
||||
```bash
|
||||
~$ pylauncher -h
|
||||
usage: pylauncher [-h] [-m MAPPING] [-s STYLE] [--position X Y] configuration
|
||||
~$ epics_launcher -h
|
||||
usage: epics_launcher [-h] [-m MAPPING] [-s STYLE] [--position X Y] configuration
|
||||
|
||||
positional arguments:
|
||||
configuration menu/configuration file
|
||||
@@ -42,7 +40,7 @@ _Note:_ `--position` - 0 0 is on the top left, -1 -1 is on the lower right.
|
||||
|
||||
Password can be added to JSON configuration file(s) as follows:
|
||||
```bash
|
||||
pylauncher-protect <configuration>
|
||||
epics_launcher-protect <configuration>
|
||||
```
|
||||
Password can be added in the same call using the option
|
||||
|
||||
@@ -56,9 +54,9 @@ Password can be added to all the configuration file referenced within configurat
|
||||
For all available options and detailed help run
|
||||
|
||||
```bash
|
||||
~$ pylauncher-protect -h
|
||||
usage: pylauncher-protect [-h] [--password PASSWORD] [--recursive] configuration
|
||||
Example: pylauncher-protect -r menus/menu.json -p *****
|
||||
~$ epics_launcher-protect -h
|
||||
usage: epics_launcher-protect [-h] [--password PASSWORD] [--recursive] configuration
|
||||
Example: epics_launcher-protect -r menus/menu.json -p *****
|
||||
|
||||
positional arguments:
|
||||
configuration menu/configuration file
|
||||
@@ -181,7 +179,7 @@ Other/New, custom types can be specified within a launcher mapping file. See sec
|
||||
```
|
||||
|
||||
##### Default
|
||||
The default mapping file of __pylauncher__ specifies following types.
|
||||
The default mapping file of __epics_launcher__ specifies following types.
|
||||
|
||||
* __cmd__ - Executes a shell command defined with parameter __command__.
|
||||
|
||||
@@ -239,7 +237,7 @@ The default mapping file of __pylauncher__ specifies following types.
|
||||
|
||||
|
||||
## Mapping
|
||||
__pylauncher__ uses a mapping (json) file to specify the behavior of specific menu items on different systems. The default mapping file can be overwritten with the __-m <mapping__ option.
|
||||
__epics_launcher__ uses a mapping (json) file to specify the behavior of specific menu items on different systems. The default mapping file can be overwritten with the __-m <mapping__ option.
|
||||
|
||||
The mapping file has sections for each operating system, for Linux, Windows and OS_X right now.
|
||||
|
||||
@@ -331,67 +329,60 @@ LauncherDetachButton{
|
||||
}
|
||||
```
|
||||
|
||||
## Converter
|
||||
__epics_launcher__ provides a tool, __epics_launcher-convert__, to convert old PSI Launcher configurations. To convert configurations use:
|
||||
|
||||
# Installation
|
||||
## Anaconda
|
||||
Anaconda comes with all required packages for __pylauncher__. To install the package use
|
||||
|
||||
```bash
|
||||
conda install -c https://conda.anaconda.org/paulscherrerinstitute pylauncher
|
||||
``` bash
|
||||
epics_launcher-convert <original_config_file> <output_dir>
|
||||
```
|
||||
|
||||
## Standard Python
|
||||
To use __pylauncher__ with a standard Python following requirements need to be met:
|
||||
__epics_launcher-convert__ offers multiple features such as converting whole menu or single file, overriding converted files, etc. For detailed help run
|
||||
|
||||
* [Qt 4](http://www.qt.io/download/) (4.8 or higher)
|
||||
* [PyQt4](https://www.riverbankcomputing.com/software/pyqt/download) (4.8 or higher)
|
||||
* [pyparsing](http://pyparsing.wikispaces.com/Download+and+Installation)
|
||||
```bash
|
||||
~$ epics_launcher-convert -h
|
||||
usage: epics_launcher-convert [-h] [-o] [-s] [-f] inputfile outputfolder
|
||||
|
||||
positional arguments:
|
||||
inputfile TCL configuration script to be converted
|
||||
outputfolder folder where the converted json file will be stored
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-o, --overwrite overwrite output files that already exist
|
||||
-s, --single convert only a single file (nonrecursive)
|
||||
-f, --force continue even if some files cannot be found
|
||||
```
|
||||
|
||||
__Note:__ Because of dependencies __epics_launcher-convert__ skips any style specific configuration.
|
||||
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
## Standard Python
|
||||
To use __epics_launcher__ with a standard Python following requirements need to be met:
|
||||
|
||||
* pyqt (5)
|
||||
* pyparsing
|
||||
|
||||
To "install" the latest version clone Git repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/paulscherrerinstitute/pylauncher.git
|
||||
git clone https://github.com/paulscherrerinstitute/epics_launcher.git
|
||||
```
|
||||
|
||||
The code is then located in the `src/` directory.
|
||||
|
||||
|
||||
# Development
|
||||
## Anaconda Package
|
||||
> This section assumes that one already has a working Anaconda environment on his machine and conda-build is installed.
|
||||
|
||||
To build an Anaconda package of the last stable version of __pylauncher__ do
|
||||
|
||||
* Clone Git repository
|
||||
|
||||
```bash
|
||||
git clone https://github.com/paulscherrerinstitute/pylauncher.git
|
||||
```
|
||||
|
||||
* Build package
|
||||
|
||||
``` bash
|
||||
cd ./utils/conda_package
|
||||
conda build pylauncher
|
||||
```
|
||||
|
||||
_Note:_ To be able to build the Anaconda package you need to have the `patchelf` package installed in your Anaconda installation. If it is not provided in the central installation, create a new Anaconda environment and install the package in there before building
|
||||
|
||||
```bash
|
||||
conda create -n build_environment python patchelf
|
||||
source activate build_environment
|
||||
```
|
||||
|
||||
|
||||
|
||||
# NEW
|
||||
|
||||
This is how to build the rhel9 package
|
||||
```bash
|
||||
docker run --platform linux/amd64 -it --rm -v $(pwd):/data --workdir /data container.psi.ch/images/rhel9-developer
|
||||
|
||||
cd /tmp
|
||||
git clone https://github.com/paulscherrerinstitute/pylauncher.git
|
||||
cd pylauncher
|
||||
git checkout cleanup_sls2.0
|
||||
git clone https://github.com/paulscherrerinstitute/epics_launcher.git
|
||||
cd epics_launcher
|
||||
python3 setup.py bdist_rpm
|
||||
mkdir -p /data/dist
|
||||
mv -f dist/* /data/dist
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# Overview
|
||||
|
||||
At PSI, the __pylauncher__ is distributed as an [Anaconda](http://continuum.io/downloads) package and is installed by default in the PSI Controls central Python installation located at `/opt/gfa/`. For the time being the Launcher can be used by bringing this Python into your PATH as follows:
|
||||
|
||||
```bash
|
||||
source /opt/gfa/python
|
||||
```
|
||||
|
||||
Please refer to the generic [Readme](Readme.md) regarding the usage.
|
||||
|
||||
# Converter
|
||||
__pylauncher__ provides a tool, __pylauncher-convert__, to convert old PSI Launcher configurations. To convert configurations use:
|
||||
|
||||
``` bash
|
||||
pylauncher-convert <original_config_file> <output_dir>
|
||||
```
|
||||
|
||||
__pylauncher-convert__ offers multiple features such as converting whole menu or single file, overriding converted files, etc. For detailed help run
|
||||
|
||||
```bash
|
||||
~$ pylauncher-convert -h
|
||||
usage: pylauncher-convert [-h] [-o] [-s] [-f] inputfile outputfolder
|
||||
|
||||
positional arguments:
|
||||
inputfile TCL configuration script to be converted
|
||||
outputfolder folder where the converted json file will be stored
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-o, --overwrite overwrite output files that already exist
|
||||
-s, --single convert only a single file (nonrecursive)
|
||||
-f, --force continue even if some files cannot be found
|
||||
```
|
||||
|
||||
__Note:__ Because of dependencies __pylauncher-convert__ skips any style specific configuration.
|
||||
@@ -22,9 +22,9 @@ setup(
|
||||
},
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"epics-launcher=epics_launcher.launcher:main",
|
||||
"epics-launcher-convert = epics_launcher.convert.convert:main",
|
||||
"epics-launcher-protect = epics_launcher.protect:main",
|
||||
"epics_launcher=epics_launcher.launcher:main",
|
||||
"epics_launcher-convert = epics_launcher.convert.convert:main",
|
||||
"epics_launcher-protect = epics_launcher.protect:main",
|
||||
]
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user