diff --git a/build/builder/commands/build.py b/build/builder/commands/build.py index 9c08ef9fd8ccc1941c5faa3fec63fc14ebaa8218..374fd3128f885c3c88b9c7d695a278943694e0fc 100755 --- a/build/builder/commands/build.py +++ b/build/builder/commands/build.py @@ -71,6 +71,21 @@ class Builder: rst = exec_sys_command(['sudo', 'cp', '-f', os.path.join(self.build_output_dir, 'common/common/', output_file), os.path.join(self.args.install, 'bin')]) if rst[0] == False : return False + # Install header files + install_header_files_dir = '/usr/include/ftengine/' + exec_sys_command(['sudo', 'mkdir', '-p', install_header_files_dir]) + install_header_files = open(os.path.join(self.project_dir, "install_header_files.txt")) + headers = install_header_files.readlines() + for header in headers: + if header.strip().startswith("#"): continue + header = header.rstrip('').rstrip('\n') + lit = header.split() + if len(lit) == 2 : + rst = exec_sys_command(['sudo', 'mkdir', '-p', install_header_files_dir + lit[1]]) + if rst[0] == False : return False + rst = exec_sys_command(['sudo', 'cp', '-rf', lit[0], install_header_files_dir + lit[1]]) + if rst[0] == False : return False + return True def launch_gn(self) -> bool: diff --git a/install_header_files.txt b/install_header_files.txt new file mode 100644 index 0000000000000000000000000000000000000000..24939544dabee9a84554d36de7281f4327abfac1 --- /dev/null +++ b/install_header_files.txt @@ -0,0 +1,10 @@ +#Instructions: 2 parameters are required to install the header file to /usr/include/ft_engine/ +# Param1: relative path of header file +# Param2: installation directory name (if this directory does not exist, +# it will be automatically created in /usr/include/ft_engine) +#Example: install test/test1.h to /usr/include/ft_engine/test_h, add: test/test1.h test_h + +window_manager/interfaces/innerkits/wm/window.h wm +window_manager/interfaces/innerkits/wm/window_option.h wm +window_manager/interfaces/innerkits/wm/wm_common.h wm +window_manager/interfaces/innerkits/dm/dm_common.h dm \ No newline at end of file