Commit ac5c7eae authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Complete support of peekpoke and gui launching script

parent 11a77b7a
......@@ -383,6 +383,8 @@ package body TASTE.Concurrency_View is
Block_Assoc :=
Join_Sets (Block_Assoc, CV.Configuration.To_Template)
& Assoc ("Partition_Name",
Partition.Deployment_Partition.Name)
& Assoc ("Protected_PIs", Pro_PI_Tag)
& Assoc ("Unprotected_PIs", Unpro_PI_Tag)
& Assoc ("Required", RI_Tag);
......
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@ : Protected block name
@@-- @_Partition_Name_@ : Containing partition name
@@-- @_Language_@ : Implementation language
@@-- ...all function attribute: Zip_File, etc... are also available
@@-- @_Calling_Threads_@ : List of calling threads
......@@ -19,6 +20,24 @@
@# -u does not overwrite existing files (e.g. the .h generated by kazoo)
@# -j extracts everything in the folder specified with -d, removing subdirectories
unzip -j -u @_Zip_File_@ -d ../@_LOWER:Name_@/@_Language_@/src
@@ELSIF@@ @_LOWER:Name_@ = taste_probe_console
# Generate Peek-Poke code
@_LOWER:Name_@: ../binaries/peekpoke
../binaries/peekpoke:
echo "cd @_LOWER:Name_@_GUI && ./peekpoke.py ../@_Partition_Name_@" > $@
chmod +x ../binaries/peekpoke
echo "ASSERT_IGNORE_GUI_ERRORS=1 ./@_Partition_Name_@ & sleep 1 ; ./peekpoke ; pkill @_Partition_Name_@" > ../binaries/run_@_Partition_Name_@_partition
chmod +x ../binaries/run_@_Partition_Name_@_partition
@@ELSIF@@ @_Language_@ = GUI
# Provide scripts to run the gui and its partition automatically
@_LOWER:Name_@: ../binaries/@_Name_@
../binaries/@_Name_@:
echo "cd @_LOWER:Name_@_GUI && taste-gui" > $@
chmod +x $@
echo "./@_Partition_Name_@ & sleep 1 ; ./@_Name_@ ; pkill @_Partition_Name_@" > ../binaries/run_@_Partition_Name_@_partition
chmod +x ../binaries/run_@_Partition_Name_@_partition
@@ELSE@@
@_LOWER:Name_@:
@# Placeholder if anything has to be done for this function coded in @_Language_@
......
......@@ -176,6 +176,14 @@ dataview/C/built: ${DATAVIEW_UNIQ} ${DATAVIEW_ACN} ${CP_FILES}
cp -f @_LOWER:Function_Names_@/GUI/wrappers/python/* binaries/@_LOWER:Function_Names_@_GUI
cp -f @_LOWER:Function_Names_@/GUI/wrappers/*.py binaries/@_LOWER:Function_Names_@_GUI
cp -f @_LOWER:Function_Names_@/GUI/wrappers/*.ui binaries/@_LOWER:Function_Names_@_GUI
@@-- If system contains the PeekPoke component, copy the relevant code in the gui folder
@@IF@@ @_LOWER:Function_Names_@ = taste_probe_console
@# Peek-Poke function is placed in the gui folder
cp $(shell taste-config --prefix)/bin/taste-gnuplot-streams binaries/@_LOWER:Function_Names_@_GUI/driveGnuPlotsStreams.pl
cp $(shell taste-config --prefix)/share/peekpoke/peekpoke.py binaries/@_LOWER:Function_Names_@_GUI
cp $(shell taste-config --prefix)/share/peekpoke/PeekPoke.glade binaries/@_LOWER:Function_Names_@_GUI
@@END_IF@@
@@-- End of PeekPoke-specifics
@@END_IF@@
@@END_TABLE@@
touch $@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment