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