Commit d29e3da4 authored by Diederik van Arkel's avatar Diederik van Arkel

add platform dependancies

parent eaf628e7
......@@ -6,7 +6,7 @@ import PmTypes, PmProject, PmPath, UtilStrictLists
import tabcontrol, ExtListBox, ioutil, IdeState
import ExtNotice, UtilIO
import Platform
import Platform, morecontrols
:: PO_LS =
{ ao :: !ApplicationOptions
......@@ -82,8 +82,25 @@ where
(lbslibId,ps5) = openExtListBoxId ps4
(ap,ps6) = getStup ps5
(pp,ps7) = fix (getPath ps6) where fix (l,r) = (RemoveFilename l,r)
(prefs,ps) = getPrefs ps7
(prefs,ps) = PlatformDependant
(getPrefs ps7) // Win
(getPrefs ps9) // Mac
// mac only...
(fontNames`, ps8)
= accPIO (accScreenPicture getFontNames) ps7 // filteren naar alleen fixed width fonts....
// (fixed,ps9) = seqList (map (\f->accPIO (accScreenPicture (lisFixedWidth f))) fontNames`) ps8
(fixed,ps9) = accPIO (accScreenPicture (seqList (map lisFixedWidth fontNames`))) ps8
fontNames = lfilter fixed fontNames`
fontSizes = [7, 8, 9, 10, 12, 14, 18, 24 ]
inifn = ao.fn
inifs = ao.fs
fontfun name (ls,ps)
# ls = {ls & ao.fn = name}
= (ls,ps)
sizefun size (ls,ps)
# ls = {ls & ao.fs = size}
= (ls,ps)
// ...mac only
ao = if actualProject (PR_GetApplicationOptions project) prefs.applopts
cgo = if actualProject (PR_GetCodeGenOptions project) prefs.cgenopts
lo = if actualProject (PR_GetLinkOptions project) prefs.linkopts
......@@ -236,6 +253,9 @@ where
)
[ ControlPos (Left,zero)
]
:+: PlatformDependant
NilLS
(FontNameSizeControl inifn inifs fontNames fontSizes fontfun sizefun [])
// .exe name and location
:+: TextControl ("Executable produced as: "+++symexepath) [ControlId xpId,ControlPos (Left,zero):if actualProject [] [ControlHide]]
:+: ButtonControl "Set executable..." [ControlFunction setexe,ControlPos (Left,zero):if actualProject [] [ControlHide]]
......@@ -300,25 +320,33 @@ where
:+: CheckControl
[ ("Generate Relocations" ,Nothing,toMark lo.generate_relocations,noPS (\ls -> {ls & lo = {ls.lo & generate_relocations = not ls.lo.generate_relocations}}))
, ("Generate Link Map" ,Nothing,toMark lo.generate_link_map,noPS (\ls -> {ls & lo = {ls.lo & generate_link_map = not ls.lo.generate_link_map}}))
: PlatformDependant
// winOnly
, ("Generate DLL" ,Nothing,toMark lo.generate_dll,noPS (\ls -> {ls & lo = {ls.lo & generate_dll = not ls.lo.generate_dll}}))
[ ("Generate DLL" ,Nothing,toMark lo.generate_dll,noPS (\ls -> {ls & lo = {ls.lo & generate_dll = not ls.lo.generate_dll}}))
, ("Use Standard Runtime Environment" ,Nothing,toMark ao.standard_rte,noPS (\l->{l & ao = {l.ao & standard_rte = not l.ao.standard_rte}}))
, ("Include Resource Section" ,Nothing,toMark lo.link_resources,noPS (\ls->{ls & lo = {ls.lo & link_resources = not ls.lo.link_resources}}))
]
// macOnly
[ ("Add 'carb' Resource" ,Nothing,toMark lo.add_carb_resource,noPS (\ls -> {ls & lo.add_carb_resource = not ls.lo.add_carb_resource}))
]
] (Columns 1)
[ ControlPos (Left,zero)
]
:+: PlatformDependant
// winOnly
// .exe name and location
:+: TextControl ("Source of resource section: "+++lo.resource_source)
( TextControl ("Source of resource section: "+++lo.resource_source)
[ControlId rsrcsId,ControlPos (Left,zero)]
:+: ButtonControl "Set resource source..."
[ControlFunction setrsrcs,ControlPos (Left,zero)]
// winOnly
// .dll symbol source
:+: TextControl ("Source of dll symbols: "+++lo.dll_export_list_name)
[ControlId symbolsId,ControlPos (Left,zero)]
:+: ButtonControl "Set dll symbol source..."
[ControlFunction setsymbols,ControlPos (Left,zero)]
)
NilLS
)
/*
where
inilinkmethod = case lo.method of
......
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