Commit 86ce502a authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

Fix for hard-coded base directory for cityLM.eff

parent e63d9cbb
......@@ -31,7 +31,7 @@ def main():
level_two_dirs.append(sub_dir_path + os.sep + level_two_dir)
if len(level_two_dirs) == 0:
logging("The scenery path does not seem to have necessary sub-directories in %s", scenery_path)
logging.error("The scenery path does not seem to have necessary sub-directories in %s", scenery_path)
orig_tex_dir = tools.get_osm2city_directory() + os.sep + "tex"
......@@ -1310,7 +1310,7 @@ if __name__ == "__main__":
# -- write .ac and .xml
building_lib.write(path_to_stg + file_name + ".ac", cl.objects, elev, tile_elev, tools.transform, offset)
write_xml(path_to_stg, file_name, cl.objects)
tools.install_files(['cityLM.eff', 'lightmap-switch.xml'], path_to_stg)
tools.install_files(['cityLM.eff', 'lightmap-switch.xml'], path_to_stg, True)
if args.uninstall:
for f in files_to_remove:
......@@ -786,15 +786,18 @@ def init(new_transform):
logging.debug("tools: init %s" % stats)
def install_files(file_list, dst):
"""link files in file_list to dst"""
def install_files(file_list, dst, from_osm2city_root=False):
"""Copy files in file_list to dst directory."""
for the_file in file_list:
the_dst = dst # + os.sep + the_file"cp %s %s" % (the_file, the_dst))
my_file = the_file
if from_osm2city_root:
my_file = get_osm2city_directory() + os.sep + the_file
the_dst = dst"cp %s %s", my_file, the_dst)
if os.path.exists(the_dst + the_file):
shutil.copy2(the_file, the_dst)
shutil.copy2(my_file, the_dst)
except OSError, reason:
if reason.errno not in [17]:
logging.warn("Error while installing %s: %s" % (the_file, reason))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment