Followup from the alpha3 announce discussion:
This is what i do atm to keep the package small and keep a good overlook ( wip ):
1: have a simplified dir:
( luxcoreui has now an '$ORIGIN/lib' rpath ! , pyluxcorebla.py's are included in /lib )
2: Use one cmd script ( could be a binary as well ) to acces all cmd's ( todo: merger, done ):
Code: Select all
#!/bin/bash
sleep 0.2 # just to let the terminal appear and become active
wmctrl -r :ACTIVE: -e 5,0,0,860,440 # set left/top, experimental
function jumpto
{
label=$1
cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$')
eval "$cmd"
exit
}
start=${1:-"start"}
filename=${1:-"filename"}
jumpto $start
start:
pause=0
echo Choose task: [S]ingleConsole \ Net[C]onsole \ Net[N]ode \ [M]erge \( Leave empty to abort \)
read task
case "$task" in
"") echo "Canceled by user ..."; sleep 1; exit
;;
S|s) echo "Setup Console"
action=console
;;
C|c) echo "Setup NetConsole"
action=netconsole
;;
N|n) echo "Setup NetNode"
action=netnode
;;
M|m) echo "Setup Merge"
action=merge
;;
*) echo "Invalid choice ..."; sleep 1; jumpto $start
;;
esac
echo Set extra arguments here \(-h shows helpchart\) \( + return \)
read args
if [ $args == "" ]; then
echo "No arguments"
else
echo "Arguments: $args"
fi
if [ "$args" == "-h" ]; then
pause=10
echo "Holding help-page for $pause seconds"
elif [ "$task" == "m" ]; then
pause=3
echo "Holding result-page for $pause seconds"
fi
filename:
if [[ "$task" != "n" && "$args" != "-h" ]]; then
echo "Drop or type path(s) to file(s)"
read filepath
if [ "$filepath" == "" ]
then echo "Missing file(s), try again ..."; jumpto $filename
fi
fi
echo Starting $action
gnome-terminal -e '/bin/bash -c "python3 ./lib/pyluxcore'$action'.py '"$args"' '"$filepath"'; sleep '$pause'" '
jumpto $start
Remark: the sleeps are needed to keep the helppage open a while.
This package is much smaller than the orig. alpha3 ( 90mb vs. 220mb uncompressed, 24mb vs. 140mb bz2 compressed )
and does not need any install. I have already some rework in mind, is on todo.
EDIT: did a few optimizations, added merger
Jens