clean yet
This commit is contained in:
@@ -123,10 +123,11 @@ PIInit::PIInit() {
|
||||
PIStringList ifpathes;
|
||||
ifpathes << PIStringAscii("/bin/ifconfig") << PIStringAscii("/sbin/ifconfig")
|
||||
<< PIStringAscii("/usr/bin/ifconfig") << PIStringAscii("/usr/sbin/ifconfig");
|
||||
piForeachC (PIString & i, ifpathes)
|
||||
if (fileExists(i)) {
|
||||
sinfo->ifconfigPath = i;
|
||||
piBreak;
|
||||
piForeachC (PIString & i, ifpathes) {
|
||||
if (fileExists(i)) {
|
||||
sinfo->ifconfigPath = i;
|
||||
piBreak;
|
||||
}
|
||||
}
|
||||
# else
|
||||
// OS version
|
||||
@@ -228,12 +229,12 @@ PIInit::PIInit() {
|
||||
GetSystemInfo(&sysinfo);
|
||||
sinfo->processorsCount = sysinfo.dwNumberOfProcessors;
|
||||
switch (sysinfo.wProcessorArchitecture) {
|
||||
case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = PIStringAscii("x86_64"); break;
|
||||
case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = PIStringAscii("arm"); break;
|
||||
case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = PIStringAscii("Intel Itanium-based"); break;
|
||||
case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = PIStringAscii("x86"); break;
|
||||
case PROCESSOR_ARCHITECTURE_UNKNOWN:
|
||||
default: sinfo->architecture = PIStringAscii("unknown"); break;
|
||||
case PROCESSOR_ARCHITECTURE_AMD64: sinfo->architecture = PIStringAscii("x86_64"); break;
|
||||
case PROCESSOR_ARCHITECTURE_ARM: sinfo->architecture = PIStringAscii("arm"); break;
|
||||
case PROCESSOR_ARCHITECTURE_IA64: sinfo->architecture = PIStringAscii("Intel Itanium-based"); break;
|
||||
case PROCESSOR_ARCHITECTURE_INTEL: sinfo->architecture = PIStringAscii("x86"); break;
|
||||
case PROCESSOR_ARCHITECTURE_UNKNOWN:
|
||||
default: sinfo->architecture = PIStringAscii("unknown"); break;
|
||||
}
|
||||
int argc_(0);
|
||||
wchar_t ** argv_ = CommandLineToArgvW(GetCommandLineW(), &argc_);
|
||||
@@ -271,7 +272,7 @@ PIInit::PIInit() {
|
||||
sinfo->OS_version = esp_get_idf_version();
|
||||
#endif
|
||||
sinfo->OS_name =
|
||||
#ifdef WINDOWS
|
||||
#ifdef WINDOWS
|
||||
PIStringAscii("Windows");
|
||||
#else
|
||||
# ifdef QNX
|
||||
@@ -323,61 +324,55 @@ PIInit::~PIInit() {
|
||||
|
||||
bool PIInit::isBuildOptionEnabled(PIInit::BuildOption o) {
|
||||
switch (o) {
|
||||
case ICU: return
|
||||
#ifdef PIP_ICU
|
||||
true;
|
||||
case ICU: return
|
||||
#ifdef PIP_ICU
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case USB: return
|
||||
#ifdef PIP_USB
|
||||
true;
|
||||
case USB: return
|
||||
#ifdef PIP_USB
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case STL: return
|
||||
#ifdef PIP_CONTAINERS_STL
|
||||
true;
|
||||
case Crypt: return
|
||||
#ifdef PIP_CRYPT
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case Crypt: return
|
||||
#ifdef PIP_CRYPT
|
||||
true;
|
||||
case Introspection: return
|
||||
#ifdef PIP_INTROSPECTION
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case Introspection: return
|
||||
#ifdef PIP_INTROSPECTION
|
||||
true;
|
||||
case FFTW: return
|
||||
#ifdef PIP_FFTW
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case FFTW: return
|
||||
#ifdef PIP_FFTW
|
||||
true;
|
||||
case Compress: return
|
||||
#ifdef PIP_COMPRESS
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case Compress: return
|
||||
#ifdef PIP_COMPRESS
|
||||
true;
|
||||
case OpenCL: return
|
||||
#ifdef PIP_OPENCL
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case OpenCL: return
|
||||
#ifdef PIP_OPENCL
|
||||
true;
|
||||
case Cloud: return
|
||||
#ifdef PIP_CLOUD
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
false;
|
||||
#endif
|
||||
case Cloud: return
|
||||
#ifdef PIP_CLOUD
|
||||
true;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
default: return false;
|
||||
default: return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -387,7 +382,6 @@ PIStringList PIInit::buildOptions() {
|
||||
PIStringList ret;
|
||||
if (isBuildOptionEnabled(ICU)) ret << "ICU";
|
||||
if (isBuildOptionEnabled(USB)) ret << "USB";
|
||||
if (isBuildOptionEnabled(STL)) ret << "STL";
|
||||
if (isBuildOptionEnabled(Crypt)) ret << "Crypt";
|
||||
if (isBuildOptionEnabled(Introspection)) ret << "Introspection";
|
||||
if (isBuildOptionEnabled(FFTW)) ret << "FFTW";
|
||||
|
||||
Reference in New Issue
Block a user