linuxcnc/scripts/linuxcncmkdesktop.in
Dewey Garrett ef7d8bf0d0 configs/apps: new directory and .demo support
A new file type (.demo) in the configs tree is supported by the linuxcnc
script and the configuration selector (pickconfig.tcl).  A .demo file
must be executable and is typically implemented as a shell script that
invokes an application with appropriate parameters.

This facility makes it possible to demonstrate apps related to linuxcnc
using pickconfig without starting linuxcnc or requiring a complete ini
file.

Thanks to Chris Morley for suggestion

Details:
    Modify pickconfig to support .demo files
       Use noforcecopy for .demo files which should not be copied to
       a user dir
    Provide .demo apps for halrun,info,parport,xhc-hb04
    Provide .demo apps for gladevcp,pyvcp
    New script: linuxcnc_var and removal of several scripts/*.in.
    Rename latency scripts for consistency (and reduce merge overwrites).
    Remove latencyplot from menu.
    Moved gladevcp demo apps from root/gladevcp to configs/apps/gladevcp
       The root/gladevcp/ examples were orphans and didn't work with
          the configuration selector
       Change .py files so persistent files are named .save instead of
          .ini to avoid conflict with .ini files which the configuration
          selector presumes are working configs.
       Rebranding in some py files
       Some clarifications within copied README files
       Consolidate by-widgets dir
    Update docs
       New doc for configuration selector (needs formatting)
       Update for configs tree rearrangement
    Rename 2 non working sim .ini files to .ini.notworking
2014-03-22 06:13:56 -07:00

35 lines
530 B
Bash

#!/bin/sh
# file types supported: .ini, .demo
EMC_BIN_DIR=@EMC2_BIN_DIR@
EMC_SCRIPT_DIR=@EMC2_HOME@/scripts
if [ -x $EMC_BIN_DIR/linuxcnc ]; then
EMC=$EMC_BIN_DIR/linuxcnc
else
EMC=$EMC_SCRIPT_DIR/linuxcnc
fi
filename="$1"
name="$2"
comment="$3"
case ${filename##*.} in
ini) cat <<EOF
[Desktop Entry]
Name=$name
Exec=$EMC '$filename'
Type=Application
Comment=$comment
Icon=linuxcncicon
EOF
;;
demo) cat <<EOF
[Desktop Entry]
Name=$name
Exec=$filename
Type=Application
Comment=$comment
Icon=linuxcncicon
EOF
;;
esac