Commit 8785038f authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

Mac version of tools launching;

parent 8117bf7c
implementation module tools
import StdBool, StdFunc, StdFile, StdPStClass, StdSystem
import StdBool, StdFunc, StdFile, StdPStClass, StdSystem, StdInt
import ExtNotice, StdPathname
import IdeState, UtilIO
//-- call out to supporting applications...
timepsuf =: " Time Profile.pcl"
timepsuf =: " Time Profile"
timeparg =: " -h 4M "
heappsuf =: " Heap Profile0.hcl"
heappsuf =: " Heap Profile0"
heapparg =: " -h 4M "
proofsuf =: ".prj"
proofarg =: " "
TimeProfileCode :== 0x50525449 // 'PRTI'
HeapProfileCode :== 0x50524850 // 'PRHP'
SparkleCode :== 0x50505050 // 'PPPP' FIXME: Maarten should register a creator code...
shoprofun :: !*(PSt General) -> *PSt General
shoprofun ps
# (prj,ps) = getProject ps
# execpath = PR_GetExecPath prj
# apppath = "Macintosh HD:Users:diederik:Desktop:CleanImage:Tools:ShowTimeProfile"
# docpath = execpath +++ timepsuf
# (err,ps) = LaunchTheDocument
docpath
apppath
TimeProfileCode
ps
| err <> 0
= openNotice (Notice ["Unable to launch " +++ apppath +++ ".",docpath,toString err] (NoticeButton "OK" id) []) ps
= ps
/*
# (prj,ps) = getProject ps
# execpath = PR_GetExecPath prj
// approximate name mangling done by RTE
......@@ -32,9 +49,22 @@ shoprofun ps
| not ok
= openNotice (Notice ["Unable to launch " +++ sp +++ ".",stup] (NoticeButton "OK" id) []) ps
= ps
*/
shoheapfun :: !*(PSt General) -> *PSt General
shoheapfun ps
# (prj,ps) = getProject ps
# execpath = PR_GetExecPath prj
# apppath = "Macintosh HD:Users:diederik:Desktop:CleanImage:Tools:ShowHeapProfile"
# docpath = execpath +++ heappsuf
# (err,ps) = LaunchTheDocument
docpath
apppath
HeapProfileCode
ps
| err <> 0
= openNotice (Notice ["Unable to launch " +++ apppath +++ ".",docpath,toString err] (NoticeButton "OK" id) []) ps
= ps
/*
# (prj,ps) = getProject ps
# execpath = PR_GetExecPath prj
// approximate name mangling done by RTE
......@@ -50,9 +80,21 @@ shoheapfun ps
| not ok
= openNotice (Notice ["Unable to launch " +++ sp +++ ".",stup] (NoticeButton "OK" id) []) ps
= ps
*/
provefun :: !*(PSt General) -> *PSt General
provefun ps
# (pathname,ps) = getPath ps
# apppath = "Macintosh HD:Users:diederik:Desktop:CleanImage:Tools:Sparkle"
# docpath = RemoveSuffix` pathname +++ proofsuf
# (err,ps) = LaunchTheDocument
docpath
apppath
SparkleCode
ps
| err <> 0
= openNotice (Notice ["Unable to launch " +++ apppath +++ ".",docpath,toString err] (NoticeButton "OK" id) []) ps
= ps
/*
# (pathname,ps) = getPath ps
# pr_path = quoted_string (RemoveSuffix` pathname +++. proofsuf)
# (prefs,ps) = getPrefs ps
......@@ -65,7 +107,7 @@ provefun ps
| not ok
= openNotice (Notice ["Unable to launch " +++ cps +++ "."] (NoticeButton "OK" id) []) ps
= ps
*/
:: ToolInfo = ToolInfo
......
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