Skip AOT in plugin when pkg contains ni files accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/8.0/unified/20240724.010425
authorWoongsuk Cho <ws77.cho@samsung.com>
Thu, 18 Jul 2024 06:14:25 +0000 (15:14 +0900)
committerWoongsuk Cho <ws77.cho@samsung.com>
Tue, 23 Jul 2024 00:04:32 +0000 (09:04 +0900)
NativeLauncher/installer-plugin/prefer_dotnet_aot_plugin.cc

index a2e3659..68b3d91 100644 (file)
@@ -68,6 +68,15 @@ extern "C" int PKGMGR_MDPARSER_PLUGIN_INSTALL(const char *pkgId, const char *app
                iter = g_list_next(iter);
        }
 
+       // if package contains native image, skip AOT.
+       std::string rootPath = getRootPath(pkgId);
+       if (!rootPath.empty()) {
+               if (exist(concatPath(rootPath, concatPath("bin", APP_NI_SUB_DIR)))) {
+                       _INFO("Package already contains native images. Skip native image generation");
+                       doAOT = false;
+               }
+       }
+
        if (doAOT) {
                _DBG("Prefer dotnet application AOT set TRUE");