From 1ada8917f389d0a8a48e86b00232012763ed56f9 Mon Sep 17 00:00:00 2001 From: Bas Lijnse Date: Mon, 7 Jul 2014 15:50:50 +0000 Subject: [PATCH] Removed sdkDirectory dependence, replaced by separate path options git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@3247 63da3aa8-80fd-4f01-9db8-e6ea747a3da2 --- Server/iTasks/API/Core/IntegrationTasks.icl | 4 +- .../iTasks/Framework/Client/RunOnClient.icl | 1 - Server/iTasks/Framework/Engine.icl | 107 +++++++++++------- Server/iTasks/Framework/IWorld.dcl | 2 +- Server/iTasks/Framework/RemoteAccess.icl | 4 +- 5 files changed, 69 insertions(+), 49 deletions(-) diff --git a/Server/iTasks/API/Core/IntegrationTasks.icl b/Server/iTasks/API/Core/IntegrationTasks.icl index f47fc13f4..c445a33cf 100644 --- a/Server/iTasks/API/Core/IntegrationTasks.icl +++ b/Server/iTasks/API/Core/IntegrationTasks.icl @@ -151,14 +151,14 @@ where initRPC = mkInstantTask eval - eval taskId iworld=:{IWorld|current={taskTime},server={buildID,paths={sdkDirectory,dataDirectory}},world} + eval taskId iworld=:{IWorld|current={taskTime},server={buildID,paths={dataDirectory}},world} # infile = dataDirectory "tmp-" +++ buildID (mkFileName taskId "request") # outfile = dataDirectory "tmp-" +++ buildID (mkFileName taskId "response") # (res,world) = writeFile infile request world | isError res # ex = RPCException ("Write file " +++ infile +++ " failed: " +++ toString (fromError res)) = (Error (dynamic ex,toString ex),{IWorld|iworld & world = world}) - # cmd = IF_POSIX_OR_WINDOWS "/usr/bin/curl" (sdkDirectory "Tools" "Curl" "curl.exe" ) + # cmd = IF_POSIX_OR_WINDOWS "/usr/bin/curl" ("Tools" "Curl" "curl.exe" ) # args = [ options , "--data-binary" , "@" +++ infile diff --git a/Server/iTasks/Framework/Client/RunOnClient.icl b/Server/iTasks/Framework/Client/RunOnClient.icl index 47c6dc817..85c064c06 100644 --- a/Server/iTasks/Framework/Client/RunOnClient.icl +++ b/Server/iTasks/Framework/Client/RunOnClient.icl @@ -112,7 +112,6 @@ createClientIWorld serverURL currentInstance ,buildID = "build" ,paths = {appDirectory = locundef "appDirectory" ,dataDirectory = locundef "dataDirectory" - ,sdkDirectory = locundef "sdkDirectory" ,publicWebDirectories = locundef "publicWebDirectories" } ,customCSS = False } ,config = {sessionTime = 3600, smtpServer = locundef "smtpServer"} diff --git a/Server/iTasks/Framework/Engine.icl b/Server/iTasks/Framework/Engine.icl index 5f95bcf2f..ea8408dec 100644 --- a/Server/iTasks/Framework/Engine.icl +++ b/Server/iTasks/Framework/Engine.icl @@ -10,6 +10,23 @@ import iTasks.Framework.IWorld, iTasks.Framework.WebService, iTasks.Framework.SD CLEAN_HOME_VAR :== "CLEAN_HOME" SESSION_TIMEOUT :== fromString "0000-00-00 00:10:00" +//The following modules are excluded by the SAPL -> Javascript compiler +//because they contain functions implemented in ABC code that cannot +//be compiled to javascript anyway. Handwritten Javascript overrides need +//to be provided for them. +JS_COMPILER_EXCLUDES :== + ["iTasks.Framework.Client.Override" + ,"dynamic_string" + ,"graph_to_string_with_descriptors" + ,"graph_to_sapl_string" + ,"Text.Encodings.Base64" + ,"Sapl.LazyLinker" + ,"Sapl.Target.JS.CodeGeneratorJS" + ,"System.Pointer" + ,"System.File" + ,"System.Directory" + ] + import StdFile, StdInt, StdList, StdChar, StdBool, StdString, StdFunc import tcp import Internet.HTTP, System.Time, System.CommandLine, Data.Func @@ -35,14 +52,17 @@ startEngine publishable world # keepalive = fromMaybe DEFAULT_KEEPALIVE_TIME (intOpt "-keepalive" opts) # help = boolOpt "-help" opts # sdkOpt = stringOpt "-sdk" opts + # webDirsOpt = stringOpt "-webpublic" opts + # webDirPaths = fmap (split ":") webDirsOpt + # storeOpt = stringOpt "-store" opts + # saplOpt = stringOpt "-sapl" opts //If -help option is given show help and stop | help = show instructions world //Check sdkpath # mbSDKPath = maybe mbSDKPath Just sdkOpt //Commandline SDK option overrides found paths - | isNothing mbSDKPath = show sdkpatherror world //Normal execution # world = show (running port) world - # iworld = initIWorld (fromJust mbSDKPath) world + # iworld = initIWorld mbSDKPath webDirPaths storeOpt saplOpt world //Initialize task instance index # iworld = initInstanceMeta iworld // mark all instance as outdated initially @@ -58,25 +78,15 @@ where instructions = ["Available commandline options:" ," -help : Show this message and exit" - ," -sdk : Use as location of the iTasks SDK" + ," -sdk : Use as location of the iTasks SDK (optional)" + ," -webpublic : Use to point to the folders that contain the application's static web content" + ," -store : Use as data store location" + ," -sapl : Use to point to the folders that hold the sapl version of the application" ," -port : Set port number (default " +++ toString DEFAULT_PORT +++ ")" ," -keepalive