The Pre-Compiled app skips the TAC (#444)
[platform/core/dotnet/launcher.git] / NativeLauncher / tool / tac_installer.cc
index 6e7d377..f512400 100644 (file)
@@ -260,6 +260,11 @@ int tacInstall(const std::string& pkgId, tac_state state, bool tacForce)
        }
 
        std::string binPath = concatPath(rootPath, "bin");
+       if (exist(concatPath(binPath, PRE_COMPILED_PACKAGE_FILE))) {
+               _INFO("The %s is a Pre-Compiled package. So, skip the TAC", pkgId.c_str());
+               return 0;
+       }
+
        std::string metaValue = getMetadataValue(pkgId, TAC_METADATA_KEY);
        if (!tacForce) {
                if (metaValue.empty()) {
@@ -492,6 +497,11 @@ int tacUpgrade(const std::string& pkgId, tac_state state, bool tacForce)
        }
 
        std::string binPath = concatPath(rootPath, "bin");
+       if (exist(concatPath(binPath, PRE_COMPILED_PACKAGE_FILE))) {
+               _INFO("The %s is a Pre-Compiled package. So, skip the TAC", pkgId.c_str());
+               state = TAC_STATE_REMOVED;
+       }
+
        if (state == TAC_STATE_REMOVED) {
                _INFO("Skipped to parse of deps.json");
        } else { //TAC_STATE_UPGRADE