mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
ohos: Bundle resource files in hap (#33513)
Bundle resource files into the .hap, so they are available as files in the application sandbox, instead of included into the shared library. This should slightly reduce the binary size in debug and release mode. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
parent
ff86771b48
commit
88ffe9f7a5
10 changed files with 77 additions and 21 deletions
|
@ -194,6 +194,10 @@ class PackageCommands(CommandBase):
|
|||
print("Cleaning up from previous packaging")
|
||||
delete(ohos_target_dir)
|
||||
shutil.copytree(ohos_app_dir, ohos_target_dir)
|
||||
resources_src_dir = path.join(self.get_top_dir(), "resources")
|
||||
resources_app_dir = path.join(ohos_target_dir, "AppScope", "resources", "resfile", "servo")
|
||||
os.makedirs(resources_app_dir, exist_ok=True)
|
||||
shutil.copytree(resources_src_dir, resources_app_dir, dirs_exist_ok=True)
|
||||
|
||||
# Map non-debug profiles to 'release' buildMode HAP.
|
||||
if build_type.is_custom():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue