Commit dba1dc4c authored by John van Groningen's avatar John van Groningen
Browse files

store relative paths in project file instead of absolute paths if a project

is saved (for paths in pg_static/static_info}
parent 8afa931c
...@@ -900,11 +900,11 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj ...@@ -900,11 +900,11 @@ step intr (DLink ds=:{ok, newpaths, fileinfo, libsinfo, modpaths, abccache, proj
= continue True False False fileinfo libsinfo modpaths project intr (abccache, ps) = continue True False False fileinfo libsinfo modpaths project intr (abccache, ps)
//*/ //*/
# static_info = # static_info =
{ stat_mods = symPaths app_path prj_path` modpaths { stat_mods = modpaths
, stat_objs = symPaths app_path prj_path` ofiles , stat_objs = ofiles
, stat_slibs = symPaths app_path prj_path` sfiles , stat_slibs = sfiles
, stat_dlibs = symPaths app_path prj_path` lfiles , stat_dlibs = lfiles
, stat_paths = symPaths app_path prj_path` srcpaths , stat_paths = srcpaths
, stat_app_path = app_path , stat_app_path = app_path
, stat_prj_path = prj_path` , stat_prj_path = prj_path`
} }
......
...@@ -634,7 +634,7 @@ GetProject applicationDir projectDir project ...@@ -634,7 +634,7 @@ GetProject applicationDir projectDir project
, pg_staticLibInfo = staticLibInfo , pg_staticLibInfo = staticLibInfo
, pg_target = target , pg_target = target
, pg_execpath = exepath , pg_execpath = exepath
, pg_static = project.static_info , 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 = project.posl , pg_postlink = project.posl
...@@ -658,6 +658,14 @@ where ...@@ -658,6 +658,14 @@ 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_objs,stat_slibs,stat_dlibs,stat_paths}
= { si & stat_mods = SubstitutePaths ap pp stat_mods
, stat_objs = SubstitutePaths ap pp stat_objs
, 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
......
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