Commit fefe2be0 authored by John van Groningen's avatar John van Groningen

remove Static info from project files

parent 60f7e7f1
......@@ -980,13 +980,6 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
| not ood
= continue True False False fileinfo libsinfo modpaths project intr (abccache, ps)
//*/
# static_info =
{ stat_mods = modpaths
, stat_slibs = sfiles
, stat_dlibs = lfiles
, stat_paths = srcpaths
}
# project = setStaticInfo static_info project
# (_,ps) = accFiles (SaveProjectFile prj_path project app_path) ps
# (linkstr,ps) = getCurrentLink ps
# (startupdir,ps) = getStup ps
......
......@@ -21,7 +21,6 @@ ProjectFileVersion :== "1.4"
{ pg_built :: !Bool
, pg_codegen :: CodeGenOptions
, pg_application :: ApplicationOptions
// , pg_projectOptions :: ProjectOptions
, pg_link :: LinkOptions
, pg_projectPaths :: List Pathname
, pg_otherModules :: List ModInfoAndName
......@@ -29,19 +28,13 @@ ProjectFileVersion :== "1.4"
, pg_staticLibInfo :: StaticLibInfo
, pg_target :: String // specify used environment
, pg_execpath :: String // move to ApplicationOptions
, pg_static :: !ProjectStaticInfo
, pg_dynamic :: !ProjectDynamicInfo
// , pg_generateDLL :: !Bool
// , pg_exportedDLL :: !String
, pg_precompile :: !Maybe String // experiment: move to LinkOptions
, pg_postlink :: !Maybe String // experiment: move to LinkOptions
}
:: ProjectStaticInfo =
{ stat_mods :: !List Pathname
, stat_slibs :: !List Pathname
, stat_dlibs :: !List Pathname
, stat_paths :: !List Pathname
{ stat_paths :: !List Pathname
}
:: ProjectDynamicInfo =
......
......@@ -14,7 +14,6 @@ ProjectFileVersion :== "1.4"
{ pg_built :: !Bool
, pg_codegen :: CodeGenOptions
, pg_application :: ApplicationOptions
// , pg_projectOptions :: ProjectOptions
, pg_link :: LinkOptions
, pg_projectPaths :: List Pathname
, pg_otherModules :: List ModInfoAndName
......@@ -22,27 +21,18 @@ ProjectFileVersion :== "1.4"
, pg_staticLibInfo :: StaticLibInfo
, pg_target :: String
, pg_execpath :: String
, pg_static :: !ProjectStaticInfo
, pg_dynamic :: !ProjectDynamicInfo
// , pg_generateDLL :: !Bool
// , pg_exportedDLL :: !String
, pg_precompile :: !Maybe String
, pg_postlink :: !Maybe String
}
:: ProjectStaticInfo =
{ stat_mods :: !List Pathname
, stat_slibs :: !List Pathname
, stat_dlibs :: !List Pathname
, stat_paths :: !List Pathname
{ stat_paths :: !List Pathname
}
EmptyStaticInfo :: ProjectStaticInfo
EmptyStaticInfo =
{ stat_mods = Nil
, stat_slibs = Nil
, stat_dlibs = Nil
, stat_paths = Nil
{ stat_paths = Nil
}
:: ProjectDynamicInfo =
......@@ -142,7 +132,6 @@ ProjectTable = // +++ order is important here
{ GroupedOption "Global" ProjectGlobalOptionsTable id const
, GroupedOption "MainModule" ModInfoAndNameTable (\a->a.pg_mainModuleInfo) (\v a->{a & pg_mainModuleInfo=v})
, ListOption "OtherModules" ModInfoAndNameEntry {info=EmptyModInfo,name=""} (\a->a.pg_otherModules) (\v a->{a & pg_otherModules=v})
, GroupedOption "Static" StaticInfoTable (\a->a.pg_static) (\v a->{a & pg_static=v})
, GroupedOption "Dynamic" DynamicInfoTable (\a->a.pg_dynamic) (\v a->{a & pg_dynamic=v})
}
where
......@@ -311,13 +300,6 @@ WindowPositionTable =
getWindowPosAndSize (WindowPosAndSize wps) = wps
getWindowPosAndSize NoWindowPosAndSize = DefWindowPos_and_Size
StaticInfoTable =
{ ListOption "Mods" PathName "" (\a->a.stat_mods) (\v a->{a & stat_mods=v})
, ListOption "Slib" PathName "" (\a->a.stat_slibs) (\v a->{a & stat_slibs=v})
, ListOption "Dlib" PathName "" (\a->a.stat_dlibs) (\v a->{a & stat_dlibs=v})
, ListOption "Pths" PathName "" (\a->a.stat_paths) (\v a->{a & stat_paths=v})
}
DynamicInfoTable =
{ ListOption "Syms" Usym esym (\a->a.dyn_syms) (\v a->{a & dyn_syms=v})
, ListOption "Mods" Umod emod (\a->a.dyn_mods) (\v a->{a & dyn_mods=v})
......
......@@ -35,8 +35,6 @@ ReadProjectFile ::
),!*Files // returned filesystem
)
getStaticInfo :: !Project -> (ProjectStaticInfo,Project)
setStaticInfo :: !.ProjectStaticInfo !.Project -> .Project
getDynamicInfo :: !Project -> (ProjectDynamicInfo,Project)
setDynamicInfo :: !.ProjectDynamicInfo !.Project -> .Project
......
......@@ -38,7 +38,6 @@ Unmodified :== False;
, staticLibInfo :: !StaticLibInfo
, target :: !String // environment
, static_info :: !ProjectStaticInfo
, dynamic_info :: !ProjectDynamicInfo
, execpath :: !String // move to app_opts
......@@ -74,7 +73,6 @@ PR_InitProject =
, prjpaths = Nil
, staticLibInfo = DefStaticLibInfo
, target = ""
, static_info = EmptyStaticInfo
, dynamic_info = EmptyDynamicInfo
, prec = Nothing
, posl = Nothing
......@@ -582,10 +580,7 @@ SetProject applicationDir projectDir
, pg_target
, pg_staticLibInfo
, pg_execpath
, pg_static
, pg_dynamic
// , pg_generateDLL
// , pg_exportedDLL
, pg_precompile
, pg_postlink
}
......@@ -601,11 +596,10 @@ SetProject applicationDir projectDir
// # project = PR_SetGenDLL pg_generateDLL project
// # project = PR_SetExpDLL pg_exportedDLL project
// default of used appopts in exe are ok isn't right :-(
# pg_static = FixStatic applicationDir projectDir pg_static
# pg_postlink = case pg_postlink of
Just post_link -> Just (ExpandPath applicationDir projectDir post_link)
Nothing -> Nothing
# project = {project & static_info = pg_static, dynamic_info = pg_dynamic}
# project = {project & dynamic_info = pg_dynamic}
# project = {project & prec = pg_precompile, posl = pg_postlink}
= project
where
......@@ -614,14 +608,6 @@ where
addModules ({name, info} :! t) project
= addModules t (PR_AddModule name (ExpandModuleInfoPaths applicationDir projectDir info) project)
FixStatic ap pp si=:{stat_mods,stat_slibs,stat_dlibs,stat_paths} =
{ si
& stat_mods = ExpandPaths ap pp stat_mods
, stat_slibs = ExpandPaths ap pp stat_slibs
, stat_dlibs = ExpandPaths ap pp stat_dlibs
, stat_paths = ExpandPaths ap pp stat_paths
}
GetProject :: !{#Char} !{#Char} !Project -> ProjectGlobalOptions
GetProject applicationDir projectDir project
# post_link = case project.posl of
......@@ -637,7 +623,6 @@ GetProject applicationDir projectDir project
, pg_staticLibInfo = staticLibInfo
, pg_target = target
, pg_execpath = exepath
, pg_static = substitite_paths_in_static applicationDir projectDir project.static_info
, pg_dynamic = project.dynamic_info
, pg_precompile = project.prec
, pg_postlink = post_link
......@@ -661,13 +646,6 @@ where
staticLibInfo = SubstituteStaticLibPaths applicationDir projectDir (PR_GetStaticLibsInfo project)
target = PR_GetTarget project
substitite_paths_in_static ap pp si=:{stat_mods,stat_slibs,stat_dlibs,stat_paths}
= { si & stat_mods = SubstitutePaths ap pp stat_mods
, stat_slibs = SubstitutePaths ap pp stat_slibs
, stat_dlibs = SubstitutePaths ap pp stat_dlibs
, stat_paths = SubstitutePaths ap pp stat_paths
}
defaultModInfo :: ModInfo
defaultModInfo =
{ dir = EmptyPathname
......@@ -855,12 +833,6 @@ It's better to replace above with a dialog with popup of available environments.
= ((project, True,"The file \"" +++ projectName +++ "\" could not be closed."), ps)
= ((project, True,""), ps)
getStaticInfo :: !Project -> (ProjectStaticInfo,Project)
getStaticInfo prj=:{static_info} = (static_info,prj)
setStaticInfo :: !.ProjectStaticInfo !.Project -> .Project
setStaticInfo inf prj = {prj & static_info = inf}
getDynamicInfo :: !Project -> (ProjectDynamicInfo,Project)
getDynamicInfo prj=:{dynamic_info} = (dynamic_info,prj)
......
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