|
|
@ -189,14 +189,14 @@ inline int SplitPlatfrom(const vector<string>& features) |
|
|
|
* Example: armv7_neon, armv5_vfpv3 |
|
|
|
* Example: armv7_neon, armv5_vfpv3 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
PackageInfo::PackageInfo(const string& version, int platform, int cpu_id, std::string install_path): |
|
|
|
PackageInfo::PackageInfo(const string& version, int platform, int cpu_id, std::string install_path): |
|
|
|
Version(version), |
|
|
|
Version(version), |
|
|
|
Platform(platform), |
|
|
|
Platform(platform), |
|
|
|
CpuID(cpu_id), |
|
|
|
CpuID(cpu_id), |
|
|
|
InstallPath("") |
|
|
|
InstallPath("") |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifndef __SUPPORT_TEGRA3 |
|
|
|
#ifndef __SUPPORT_TEGRA3 |
|
|
|
Platform = PLATFORM_UNKNOWN; |
|
|
|
Platform = PLATFORM_UNKNOWN; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
FullName = BasePackageName + "_v" + Version.substr(0, Version.size()-1); |
|
|
|
FullName = BasePackageName + "_v" + Version.substr(0, Version.size()-1); |
|
|
|
if (PLATFORM_UNKNOWN != Platform) |
|
|
|
if (PLATFORM_UNKNOWN != Platform) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -210,41 +210,41 @@ PackageInfo::PackageInfo(const string& version, int platform, int cpu_id, std::s |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch x86"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch x86"); |
|
|
|
FullName += string("_") + ARCH_X86_NAME; |
|
|
|
FullName += string("_") + ARCH_X86_NAME; |
|
|
|
#ifdef __SUPPORT_INTEL_FEATURES |
|
|
|
#ifdef __SUPPORT_INTEL_FEATURES |
|
|
|
string features = JoinIntelFeatures(CpuID); |
|
|
|
string features = JoinIntelFeatures(CpuID); |
|
|
|
if (!features.empty()) |
|
|
|
if (!features.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + features; |
|
|
|
FullName += string("_") + features; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ARCH_X64 & CpuID) |
|
|
|
else if (ARCH_X64 & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch x64"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch x64"); |
|
|
|
#ifdef __SUPPORT_INTEL_x64 |
|
|
|
#ifdef __SUPPORT_INTEL_x64 |
|
|
|
FullName += string("_") + ARCH_X64_NAME; |
|
|
|
FullName += string("_") + ARCH_X64_NAME; |
|
|
|
#else |
|
|
|
#else |
|
|
|
FullName += string("_") + ARCH_X86_NAME; |
|
|
|
FullName += string("_") + ARCH_X86_NAME; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef __SUPPORT_INTEL_FEATURES |
|
|
|
#ifdef __SUPPORT_INTEL_FEATURES |
|
|
|
string features = JoinIntelFeatures(CpuID); |
|
|
|
string features = JoinIntelFeatures(CpuID); |
|
|
|
if (!features.empty()) |
|
|
|
if (!features.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + features; |
|
|
|
FullName += string("_") + features; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ARCH_ARMv5 & CpuID) |
|
|
|
else if (ARCH_ARMv5 & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv5"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv5"); |
|
|
|
FullName += string("_") + ARCH_ARMv5_NAME; |
|
|
|
FullName += string("_") + ARCH_ARMv5_NAME; |
|
|
|
#ifdef __SUPPORT_ARMEABI_FEATURES |
|
|
|
#ifdef __SUPPORT_ARMEABI_FEATURES |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
if (!features.empty()) |
|
|
|
if (!features.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + features; |
|
|
|
FullName += string("_") + features; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ARCH_ARMv6 & CpuID) |
|
|
|
else if (ARCH_ARMv6 & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -252,46 +252,46 @@ PackageInfo::PackageInfo(const string& version, int platform, int cpu_id, std::s |
|
|
|
// NOTE: ARM v5 used instead ARM v6
|
|
|
|
// NOTE: ARM v5 used instead ARM v6
|
|
|
|
//FullName += string("_") + ARCH_ARMv6_NAME;
|
|
|
|
//FullName += string("_") + ARCH_ARMv6_NAME;
|
|
|
|
FullName += string("_") + ARCH_ARMv5_NAME; |
|
|
|
FullName += string("_") + ARCH_ARMv5_NAME; |
|
|
|
#ifdef __SUPPORT_ARMEABI_FEATURES |
|
|
|
#ifdef __SUPPORT_ARMEABI_FEATURES |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
if (!features.empty()) |
|
|
|
if (!features.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + features; |
|
|
|
FullName += string("_") + features; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ARCH_ARMv7 & CpuID) |
|
|
|
else if (ARCH_ARMv7 & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv7"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv7"); |
|
|
|
FullName += string("_") + ARCH_ARMv7_NAME; |
|
|
|
FullName += string("_") + ARCH_ARMv7_NAME; |
|
|
|
#ifdef __SUPPORT_ARMEABI_V7A_FEATURES |
|
|
|
#ifdef __SUPPORT_ARMEABI_V7A_FEATURES |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
string features = JoinARMFeatures(CpuID); |
|
|
|
if (!features.empty()) |
|
|
|
if (!features.empty()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + features; |
|
|
|
FullName += string("_") + features; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
else if (ARCH_ARMv8 & CpuID) |
|
|
|
else if (ARCH_ARMv8 & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv8"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch ARMv8"); |
|
|
|
#ifdef __SUPPORT_ARMEABI_V8 |
|
|
|
#ifdef __SUPPORT_ARMEABI_V8 |
|
|
|
FullName += string("_") + ARCH_ARMv8_NAME; |
|
|
|
FullName += string("_") + ARCH_ARMv8_NAME; |
|
|
|
#else |
|
|
|
#else |
|
|
|
FullName += string("_") + ARCH_ARMv7_NAME; |
|
|
|
FullName += string("_") + ARCH_ARMv7_NAME; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
//string features = JoinARMFeatures(CpuID);
|
|
|
|
//string features = JoinARMFeatures(CpuID);
|
|
|
|
//if (!features.empty())
|
|
|
|
//if (!features.empty())
|
|
|
|
//{
|
|
|
|
//{
|
|
|
|
// FullName += string("_") + features;
|
|
|
|
// FullName += string("_") + features;
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
} |
|
|
|
} |
|
|
|
#ifdef __SUPPORT_MIPS |
|
|
|
#ifdef __SUPPORT_MIPS |
|
|
|
else if (ARCH_MIPS & CpuID) |
|
|
|
else if (ARCH_MIPS & CpuID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FullName += string("_") + ARCH_MIPS_NAME; |
|
|
|
FullName += string("_") + ARCH_MIPS_NAME; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch unknown"); |
|
|
|
LOGD("PackageInfo::PackageInfo: package arch unknown"); |
|
|
@ -316,8 +316,8 @@ PackageInfo::PackageInfo(const string& version, int platform, int cpu_id, std::s |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PackageInfo::PackageInfo(const string& fullname, const string& install_path, string package_version): |
|
|
|
PackageInfo::PackageInfo(const string& fullname, const string& install_path, string package_version): |
|
|
|
FullName(fullname), |
|
|
|
FullName(fullname), |
|
|
|
InstallPath(install_path) |
|
|
|
InstallPath(install_path) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("PackageInfo::PackageInfo(\"%s\", \"%s\", \"%s\")", fullname.c_str(), install_path.c_str(), package_version.c_str()); |
|
|
|
LOGD("PackageInfo::PackageInfo(\"%s\", \"%s\", \"%s\")", fullname.c_str(), install_path.c_str(), package_version.c_str()); |
|
|
|
|
|
|
|
|
|
|
@ -424,12 +424,12 @@ PackageInfo::PackageInfo(const string& fullname, const string& install_path, str |
|
|
|
{ |
|
|
|
{ |
|
|
|
CpuID = ARCH_X64 | SplitIntelFeatures(features); |
|
|
|
CpuID = ARCH_X64 | SplitIntelFeatures(features); |
|
|
|
} |
|
|
|
} |
|
|
|
#ifdef __SUPPORT_MIPS |
|
|
|
#ifdef __SUPPORT_MIPS |
|
|
|
else if (ARCH_MIPS_NAME == features[2]) |
|
|
|
else if (ARCH_MIPS_NAME == features[2]) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CpuID = ARCH_MIPS; |
|
|
|
CpuID = ARCH_MIPS; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGD("It is not OpenCV library package for this platform"); |
|
|
|
LOGD("It is not OpenCV library package for this platform"); |
|
|
|