From 14589b218e5796e4a85f2a73b440a25848ebe747 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Sun, 7 May 2017 20:48:03 +0200 Subject: [PATCH] small update, new iTasks version --- Makefile | 3 ++- Shares/mTaskShare.icl | 1 + install_clean.sh | 4 ---- miTask.icl | 17 +++++++++-------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index b81c658..c6c5975 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,11 @@ ifeq "$(GCCVERSIONGTEQ6)" "1" override CLMFLAGS+=-l -no-pie endif +# -I ~/projects/iTasks-SDK/Libraries CLMLIBS:=\ -I $(CLEAN_HOME)/lib/Platform\ -I $(CLEAN_HOME)/lib/Platform/Deprecated/StdLib\ - -I ~/projects/iTasks-SDK/Libraries\ + -I $(CLEAN_HOME)/lib/iTasks\ -I $(CLEAN_HOME)/lib/GraphCopy\ -I $(CLEAN_HOME)/lib/Sapl\ -I $(CLEAN_HOME)/lib/StdEnv\ diff --git a/Shares/mTaskShare.icl b/Shares/mTaskShare.icl index f4b0721..7ae47e1 100644 --- a/Shares/mTaskShare.icl +++ b/Shares/mTaskShare.icl @@ -15,6 +15,7 @@ manageShares :: [MTaskShare] -> Task () manageShares shares = withShared Nothing $ \cs->forever $ (viewSharesGrid cs shares -|| updateShares shares <<@ ArrangeVertical) @! () + updateShares :: [MTaskShare] -> Task BCValue updateShares shares = anyTask (map updateS shares) <<@ ArrangeWithTabs diff --git a/install_clean.sh b/install_clean.sh index 2a42593..f7fe903 100755 --- a/install_clean.sh +++ b/install_clean.sh @@ -17,9 +17,5 @@ mkdir -p "$TARGET" echo "Downloading and installing clean nightly" >&2 curl -sSL ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz \ | tar --gunzip --strip-components=1 --extract --directory="$TARGET" -curl -sSL https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/raw/master/Libraries/iTasks/_Framework/TaskServer.dcl \ - > $TARGET/lib/iTasks/iTasks/_Framework/TaskServer.dcl -curl -sSL https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK/raw/master/Libraries/iTasks/_Framework/TaskServer.icl \ - > $TARGET/lib/iTasks/iTasks/_Framework/TaskServer.icl echo "export CLEAN_HOME=$TARGET; export PATH=$TARGET/bin:\$PATH;" diff --git a/miTask.icl b/miTask.icl index c7b68dd..9a486af 100644 --- a/miTask.icl +++ b/miTask.icl @@ -24,21 +24,22 @@ import iTasks._Framework.Serialization import TTY, iTasksTTY -//derive class iTask ByteSize, Parity, BaudRate, TTYSettings, TCPSettings -//derive class iTask MTaskDeviceSpec, MTaskResource, MTaskTask, MTaskDevice +Start world = startEngine [ + publish "/manage" $ const $ mTaskManager + >>* [OnAction (Action "Shutdown") (always $ shutDown)], + publish "/" $ const demo + ] world -Start world = startEngine (mTaskManager - >>* [OnAction (Action "Shutdown") (always $ shutDown)]) world +demo = viewInformation "" [] "Hello world" mTaskManager :: Task () mTaskManager = startupDevices >>| anyTask [ viewmTasks @! () , whileUnchanged sdsStore manageShares , whileUnchanged deviceStore $ manageDevices process - ] <<@ ApplyLayout (sequenceLayouts - [ arrangeWithSideBar 0 LeftSide 260 True - , arrangeSplit Vertical True - ]) + ] <<@ ApplyLayout (foldr1 sequenceLayouts + [arrangeWithSideBar 0 LeftSide 260 True + ,arrangeSplit Vertical True]) where viewmTasks :: Task String viewmTasks = enterChoiceWithShared "Available mTasks" [ChooseFromList id] mTaskTaskStore -- 2.20.1