Commit 5460f63f authored by John van Groningen's avatar John van Groningen

add editing of postlink

parent 258e9f91
......@@ -15,6 +15,7 @@ import Platform, morecontrols
, lo :: !LinkOptions
, xp :: !String // exepath
, sl :: !StaticLibInfo
, post_link :: !Maybe String
}
projectOptions :: !(PSt General) -> PSt General
......@@ -45,6 +46,7 @@ projectDialog actualProject ps`
# prj = PR_SetStaticLibsInfo ret.sl prj
# (xxId,ps) = getPWX ps
# ps = setFlexTexts [(xxId,ret.xp)] ps
# prj = PR_SetPostlink ret.post_link prj
= setProject prj ps
// prefs
# (prfs,ps) = getPrefs ps
......@@ -74,8 +76,8 @@ where
]) ps
// actualProject
(project,ps0) = getProject ps`
([okId,cancelId,dlogId,hsId,ssId,emId,hmId,ihId,mhId,c1id,r1id,c2id,c3id,c4id,xpId,rsrcsId,symbolsId:_],ps1)
= openIds 17 ps0
([okId,cancelId,dlogId,hsId,ssId,emId,hmId,ihId,mhId,c1id,r1id,c2id,c3id,c4id,xpId,rsrcsId,symbolsId,post_link_id:_],ps1)
= openIds 18 ps0
(lbpadId,ps2) = openExtListBoxId ps1
(lbobjId,ps3) = openExtListBoxId ps2
(lbdlibId,ps4) = openExtListBoxId ps3
......@@ -107,7 +109,8 @@ where
paths = PR_GetPaths project
sl = PR_GetStaticLibsInfo project
root_path = PR_GetRootPath project
inils = {ao=ao,cgo=cgo,paths=paths,lo=lo,xp=fulexepath,sl=sl}
(post_link,_) = PR_GetPostlink project
inils = {ao=ao,cgo=cgo,paths=paths,lo=lo,xp=fulexepath,sl=sl,post_link=post_link}
// generic...
panesOptions = TabControl
......@@ -346,19 +349,14 @@ where
[ControlId symbolsId,ControlPos (Left,zero)]
:+: ButtonControl "Set dll symbol source..."
[ControlFunction setsymbols,ControlPos (Left,zero)]
:+: TextControl ("Postlink: "+++(case post_link of Just s -> s ; _ -> ""))
[ControlId post_link_id,ControlPos (Left,zero)]
:+: ButtonControl "Set postlink..."
[ControlFunction set_post_link,ControlPos (Left,zero)]
)
NilLS
)
/*
where
inilinkmethod = case lo.method of
LM_Static -> 1
LM_Dynamic -> 2
*/
/*
LM_Eager -> 2
LM_Dynamic -> 3
*/
setrsrcs (ls,ps)
# (rsrcname,ps) = PlatformDependant
(selectOutputFile` "Resource source" "*.exe" "Set" ps) // win
......@@ -366,11 +364,8 @@ where
| isNothing rsrcname
= (ls,ps)
# rsrcname = fromJust rsrcname
# (appPath,ps) = getStup ps
# (prjPath,ps) = getPath ps
# prjPath = RemoveFilename prjPath
# rsrcname = symPath appPath prjPath rsrcname
# ls = {ls & lo = {ls.lo & resource_source = rsrcname}}
# (rsrcname,ps) = make_sym_path rsrcname ps
# ls = {ls & lo.resource_source = rsrcname}
# ps = appPIO (setControlText rsrcsId ("Source of resource section: "+++rsrcname)) ps
= (ls,ps)
......@@ -381,14 +376,29 @@ where
| isNothing symbname
= (ls,ps)
# symbname = fromJust symbname
# (appPath,ps) = getStup ps
# (prjPath,ps) = getPath ps
# prjPath = RemoveFilename prjPath
# symbname = symPath appPath prjPath symbname
# ls = {ls & lo = {ls.lo & dll_export_list_name = symbname}}
# (symbname,ps) = make_sym_path symbname ps
# ls = {ls & lo.dll_export_list_name = symbname}
# ps = appPIO (setControlText symbolsId ("Source of dll symbols: "+++symbname)) ps
= (ls,ps)
set_post_link (ls,ps)
# (post_link,ps) = PlatformDependant
(selectInputFile` ps) // win
(selectInputFile ps) // mac
| isNothing post_link
= ({ls & post_link = Nothing},ps)
# post_link = fromJust post_link
# (post_link,ps) = make_sym_path post_link ps
# ls = {ls & post_link = Just post_link}
# ps = appPIO (setControlText post_link_id ("Postlink: "+++post_link)) ps
= (ls,ps)
make_sym_path name ps
# (appPath,ps) = getStup ps
# (prjPath,ps) = getPath ps
# prjPath = RemoveFilename prjPath
= (symPath appPath prjPath name,ps)
objectsPane = Pane "Extra Objects"
{addLS = inifull
,addDef
......
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