#include <common/step/filesystem/step_copy_storage_directories.h>
#include <common/step/filesystem/step_copy_tep.h>
#include <common/step/filesystem/step_create_icons.h>
+#include <common/step/filesystem/step_create_globalapp_symlinks.h>
#include <common/step/filesystem/step_create_per_user_storage_directories.h>
-#include <common/step/filesystem/step_create_legacy_directories.h>
#include <common/step/filesystem/step_create_storage_directories.h>
#include <common/step/filesystem/step_delta_patch.h>
#include <common/step/filesystem/step_disable_external_mount.h>
#include <common/step/filesystem/step_recover_storage_directories.h>
#include <common/step/filesystem/step_remove_files.h>
#include <common/step/filesystem/step_remove_icons.h>
+#include <common/step/filesystem/step_remove_globalapp_symlinks.h>
#include <common/step/filesystem/step_remove_per_user_storage_directories.h>
-#include <common/step/filesystem/step_remove_legacy_directories.h>
#include <common/step/filesystem/step_remove_temporary_directory.h>
#include <common/step/filesystem/step_remove_zip_image.h>
#include <common/step/filesystem/step_remove_tep.h>
AddStep<wgt::security::StepCheckWgtImePrivilege>();
AddStep<hybrid::encryption::StepEncryptResources>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterSecurity>();
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
- AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::Update:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::Uninstall:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Uninstall);
AddStep<ci::pkgmgr::StepKillApps>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::filesystem::StepRemovePerUserStorageDirectories>();
AddStep<ci::pkgmgr::StepUnregisterApplication>();
AddStep<ci::security::StepRollbackDeinstallationSecurity>();
AddStep<ci::filesystem::StepRemoveTep>();
AddStep<ci::filesystem::StepRemoveFiles>();
- AddStep<ci::filesystem::StepRemoveLegacyDirectories>();
AddStep<ci::filesystem::StepRemoveZipImage>();
AddStep<ci::filesystem::StepRemoveIcons>();
AddStep<wgt::encryption::StepRemoveEncryptionData>();
AddStep<ci::security::StepRevokeSecurity>();
AddStep<ci::pkgmgr::StepRemoveManifest>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::Reinstall:
// RDS is not supported for hybrid apps
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::Recovery:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::security::StepCheckWgtImePrivilege>();
AddStep<hybrid::encryption::StepEncryptResources>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::mount::StepMountInstall>();
AddStep<tpk::filesystem::StepTpkPreparePackageDirectory>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterSecurity>();
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
- AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::MountUpdate:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::mount::StepMountUpdate>();
AddStep<tpk::filesystem::StepTpkUpdatePackageDirectory>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::ManifestDirectInstall:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<wgt::pkgmgr::StepGenerateXml>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Install);
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::security::StepRegisterSecurity>();
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
- AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::ManifestDirectUpdate:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
ci::configuration::StepParseManifest::StoreLocation::BACKUP);
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::security::StepUpdateSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<wgt::pkgmgr::StepGenerateXml>();
AddStep<ci::pkgmgr::StepUpdateApplication>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
case ci::RequestType::EnablePkg:
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
continue;
}
- bool is_sym = bf::is_symlink(current, error_code);
+ bool is_sym = bf::is_symlink(symlink_status(current, error_code));
if (error_code)
return false;
if (is_sym)
bf::path mount_point = ci::GetMountLocation(context_->pkg_path.get());
bf::path res_wgt_link = context_->pkg_path.get() / kResWgtDirectory;
if (bf::exists(res_wgt_link)) {
- if (!bf::is_symlink(res_wgt_link)) {
+ if (!bf::is_symlink(symlink_status(res_wgt_link))) {
LOG(ERROR) << res_wgt_link << " is not symlink. Cannot proceed";
return Status::APP_DIR_ERROR;
}
#include <common/step/filesystem/step_copy_storage_directories.h>
#include <common/step/filesystem/step_copy_tep.h>
#include <common/step/filesystem/step_create_icons.h>
+#include <common/step/filesystem/step_create_globalapp_symlinks.h>
#include <common/step/filesystem/step_create_per_user_storage_directories.h>
-#include <common/step/filesystem/step_create_legacy_directories.h>
#include <common/step/filesystem/step_create_storage_directories.h>
#include <common/step/filesystem/step_delta_patch.h>
#include <common/step/filesystem/step_disable_external_mount.h>
#include <common/step/filesystem/step_recover_storage_directories.h>
#include <common/step/filesystem/step_remove_files.h>
#include <common/step/filesystem/step_remove_icons.h>
+#include <common/step/filesystem/step_remove_globalapp_symlinks.h>
#include <common/step/filesystem/step_remove_per_user_storage_directories.h>
-#include <common/step/filesystem/step_remove_legacy_directories.h>
#include <common/step/filesystem/step_remove_temporary_directory.h>
#include <common/step/filesystem/step_remove_tep.h>
#include <common/step/filesystem/step_remove_zip_image.h>
AddStep<wgt::encryption::StepEncryptResources>();
AddStep<wgt::filesystem::StepWgtResourceDirectory>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
AddStep<ci::filesystem::StepCopy>();
AddStep<ci::filesystem::StepCopyTep>();
ci::Plugin::ActionType::Install);
AddStep<ci::security::StepRegisterSecurity>();
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
- AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Update: {
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::pkgmgr::StepUpdateApplication>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Uninstall: {
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::NORMAL);
AddStep<ci::pkgmgr::StepKillApps>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Uninstall);
AddStep<ci::security::StepRollbackDeinstallationSecurity>();
AddStep<ci::filesystem::StepRemoveTep>();
AddStep<ci::filesystem::StepRemoveFiles>();
- AddStep<ci::filesystem::StepRemoveLegacyDirectories>();
AddStep<ci::filesystem::StepRemoveZipImage>();
AddStep<ci::filesystem::StepRemoveIcons>();
AddStep<wgt::encryption::StepRemoveEncryptionData>();
AddStep<ci::security::StepRevokeSecurity>();
AddStep<ci::pkgmgr::StepRemoveManifest>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Reinstall: {
ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
ci::configuration::StepParseManifest::StoreLocation::BACKUP);
AddStep<ci::configuration::StepBlockCrossUpdate>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::rds::StepRDSParse>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<wgt::rds::StepWgtRDSModify>();
AddStep<wgt::security::StepCheckExtensionPrivileges>();
AddStep<ci::security::StepUpdateSecurity>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Delta: {
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(true);
AddStep<ci::backup::StepCopyBackup>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::pkgmgr::StepUpdateApplication>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Recovery: {
AddStep<wgt::security::StepCheckWgtImePrivilege>();
AddStep<wgt::encryption::StepEncryptResources>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::mount::StepMountInstall>();
AddStep<wgt::filesystem::StepWgtPreparePackageDirectory>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::filesystem::StepCreatePerUserStorageDirectories>();
AddStep<wgt::security::StepCheckExtensionPrivileges>();
AddStep<ci::security::StepRegisterSecurity>();
- AddStep<ci::filesystem::StepCreateLegacyDirectories>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::MountUpdate: {
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::backup::StepBackupIcons>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::mount::StepMountUpdate>();
AddStep<wgt::filesystem::StepWgtUpdatePackageDirectory>();
AddStep<ci::filesystem::StepUpdateTep>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::pkgmgr::StepUpdateApplication>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::ManifestDirectInstall: {
AddStep<wgt::security::StepCheckSettingsLevel>();
AddStep<wgt::security::StepCheckWgtBackgroundCategory>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<wgt::pkgmgr::StepGenerateXml>();
AddStep<ci::pkgmgr::StepRegisterApplication>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(ci::Plugin::ActionType::Install);
AddStep<ci::security::StepRegisterSecurity>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::ManifestDirectUpdate: {
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::filesystem::StepCopyTep>();
AddStep<ci::security::StepUpdateSecurity>();
+ AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<wgt::pkgmgr::StepGenerateXml>();
AddStep<ci::pkgmgr::StepRunParserPlugin>(
ci::Plugin::ActionType::Upgrade);
AddStep<ci::pkgmgr::StepUpdateApplication>();
+ AddStep<ci::filesystem::StepCreateGlobalAppSymlinks>();
break;
}
case ci::RequestType::Move: {