We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Commit bc4c6b52 authored by Jeroen Henrix's avatar Jeroen Henrix

- Added static & dynamic linker, code generator executables

- detect AppPath and AppName correctly if using dynamic linker

git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@1783 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent 647dce36
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
implementation module Engine
import StdMisc, StdArray, StdList, StdTuple, StdChar, StdFile, StdBool
from StdFunc import o
import StdMisc, StdArray, StdList, StdOrdList, StdTuple, StdChar, StdFile, StdBool
from StdFunc import o, seqList, ::St
import Map, Time, CommandLine, Error, File, FilePath, Directory, HTTP, OSError, Text, MIME, UrlEncoding
import Util, HtmlUtil
import TuningCombinators
......@@ -167,11 +167,25 @@ config world
// Determines the server executables path
determineAppPath :: !*World -> (!String, !*World)
determineAppPath world
# (args,world) = getCommandLine world
= (hd args,world)
# ([arg:_],world) = getCommandLine world
| dropDirectory arg <> "ConsoleClient.exe" = (arg, world)
//Using dynamic linker:
# (res, world) = getCurrentDirectory world
| isError res = abort "Cannot get current directory."
# currentDirectory = fromOk res
# (res, world) = readDirectory currentDirectory world
| isError res = abort "Cannot read current directory."
# batchfiles = [f \\ f <- fromOk res | takeExtension f == "bat" ]
| isEmpty batchfiles = abort "No dynamic linker batch file found."
# (infos, world) = seqList (map getFileInfo batchfiles) world
| any isError infos = abort "Cannot get file information."
= (currentDirectory </> (fst o hd o sortBy cmpFileTime) (zip2 batchfiles infos), world)
where
cmpFileTime (_,Ok {FileInfo | lastModifiedTime = x})
(_,Ok {FileInfo | lastModifiedTime = y}) = mkTime x > mkTime y
// Determines the server executables name
determineAppName :: !*World -> (!String,!*World)
determineAppName world
# (args,world) = getCommandLine world
= ((dropExtension o dropDirectory o hd) args,world)
# (appPath, world) = determineAppPath world
= ((dropExtension o dropDirectory) appPath, world)
......@@ -52,10 +52,10 @@ Environments
Path: {Application}\Libraries\Dynamics\implementation\windows
Path: {Application}\Libraries\TCPIP
Path: {Application}\iTasks-SDK\Server\API
EnvironmentCompiler: iTasks-SDK\Compiler\CleanCompiler.exe : -h 64M : -dynamics -generics
EnvironmentCodeGen: Tools\Clean System\CodeGenerator.exe
EnvironmentLinker: Tools\Clean System\StaticLinker.exe : -h 64M
EnvironmentDynLink: Tools\Dynamics\DynamicLinker.exe
EnvironmentCompiler: iTasks-SDK\Compiler\CleanCompiler.exe : -h 64M : -dynamics -generics
EnvironmentCodeGen: iTasks-SDK\Compiler\CodeGenerator.exe
EnvironmentLinker: iTasks-SDK\Compiler\StaticLinker.exe : -h 64M
EnvironmentDynLink: iTasks-SDK\Compiler\DynamicLinker.exe
EnvironmentVersion: 920
EnvironmentRedirect: False
EnvironmentCompileMethod: Pers
......
Markdown is supported
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