added linux and android stubs to help with the linux and android warnings

This commit is contained in:
amerhifi 2019-05-15 10:18:59 -07:00
parent 19a848d481
commit c43d3de213
7 changed files with 150 additions and 11 deletions

View file

@ -2,8 +2,8 @@
// Libraries
//
include ':oculus'
project(':oculus').projectDir = new File(settingsDir, 'libraries/oculus')
//include ':oculus'
//project(':oculus').projectDir = new File(settingsDir, 'libraries/oculus')
include ':qt'
project(':qt').projectDir = new File(settingsDir, 'libraries/qt')
@ -18,8 +18,8 @@ if (!getSettings().hasProperty("SUPPRESS_INTERFACE")) {
}
if (!getSettings().hasProperty("SUPPRESS_QUEST_INTERFACE")) {
include ':questInterface'
project(':questInterface').projectDir = new File(settingsDir, 'apps/questInterface')
// include ':questInterface'
// project(':questInterface').projectDir = new File(settingsDir, 'apps/questInterface')
}
//
@ -27,11 +27,11 @@ if (!getSettings().hasProperty("SUPPRESS_QUEST_INTERFACE")) {
//
if (!getSettings().hasProperty("SUPPRESS_FRAME_PLAYER")) {
include ':framePlayer'
project(':framePlayer').projectDir = new File(settingsDir, 'apps/framePlayer')
// include ':framePlayer'
// project(':framePlayer').projectDir = new File(settingsDir, 'apps/framePlayer')
}
if (!getSettings().hasProperty("SUPPRESS_QUEST_FRAME_PLAYER")) {
include ':questFramePlayer'
project(':questFramePlayer').projectDir = new File(settingsDir, 'apps/questFramePlayer')
//include ':questFramePlayer'
// project(':questFramePlayer').projectDir = new File(settingsDir, 'apps/questFramePlayer')
}

View file

@ -0,0 +1,40 @@
//
// Created by Amer Cerkic 05/02/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AndroidPlatform.h"
#include "platformJsonKeys.h"
#include <GPUIdent.h>
#include <string>
using namespace platform;
void AndroidInstance::enumerateCpu() {
json cpu;
cpu[jsonKeys::cpuBrand] = "";
cpu[jsonKeys::cpuModel] = "";
cpu[jsonKeys::cpuClockSpeed] = "";
cpu[jsonKeys::cpuNumCores] = "";
_cpu.push_back(cpu);
}
void AndroidInstance::enumerateGpu() {
GPUIdent* ident = GPUIdent::getInstance();
json gpu = {};
gpu[jsonKeys::gpuName] = ident->getName().toUtf8().constData();
gpu[jsonKeys::gpuMemory] = ident->getMemory();
gpu[jsonKeys::gpuDriver] = ident->getDriver().toUtf8().constData();
_gpu.push_back(gpu);
_display = ident->getOutput();
}
void AndroidInstance::enumerateMemory() {
json ram = {};
_memory.push_back(ram);
}

View file

@ -0,0 +1,25 @@
//
// Created by Amer Cerkic 05/02/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_AndroidPlatform_h
#define hifi_AndroidPlatform_h
#include "platformInstance.h"
namespace platform {
class AndroidInstance : public Instance {
public:
void enumerateCpu() override;
void enumerateMemory() override;
void enumerateGpu() override;
};
} // namespace platform
#endif //hifi_androidplatform_h

View file

@ -0,0 +1,42 @@
//
// Created by Amer Cerkic 05/02/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "LinuxPlatform.h"
#include "platformJsonKeys.h"
#include <GPUIdent.h>
#include <string>
using namespace platform;
void LinuxInstance::enumerateCpu() {
json cpu = {};
cpu[jsonKeys::cpuBrand] = "";
cpu[jsonKeys::cpuModel] = "";
cpu[jsonKeys::cpuClockSpeed] = "";
cpu[jsonKeys::cpuNumCores] = "";
_cpu.push_back(cpu);
}
void LinuxInstance::enumerateGpu() {
GPUIdent* ident = GPUIdent::getInstance();
json gpu = {};
gpu[jsonKeys::gpuName] = ident->getName().toUtf8().constData();
gpu[jsonKeys::gpuMemory] = ident->getMemory();
gpu[jsonKeys::gpuDriver] = ident->getDriver().toUtf8().constData();
_gpu.push_back(gpu);
_display = ident->getOutput();
}
void LinuxInstance::enumerateMemory() {
json ram = {};
_memory.push_back(ram);
}

View file

@ -0,0 +1,25 @@
//
// Created by Amer Cerkic 05/02/2019
// Copyright 2019 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_LinuxPlatform_h
#define hifi_LinuxPlatform_h
#include "platformInstance.h"
namespace platform {
class LinuxInstance : public Instance {
public:
void enumerateCpu() override;
void enumerateMemory() override;
void enumerateGpu() override;
};
} // namespace platform
#endif //hifi_linuxPlaform_h

View file

@ -19,7 +19,12 @@
#include "MACOSPlatform.h"
#endif
#ifdef Q_OS_ANDROID
#include "AndroidPlatform.h"
#endif
#ifdef Q_OS_LINUX
#include "LinuxPlatform.h"
#endif
using namespace platform;
@ -31,6 +36,10 @@ void platform::create() {
_instance =new WINInstance();
#elif defined(Q_OS_MAC)
_instance = new MACOSInstance();
#elif defined(Q_OS_ANDROID)
_instance= new AndroidInstance();
#elif defined(Q_OS_LINUX)
_instance= new LinuxInstance();
#endif
}

View file

@ -12,7 +12,6 @@
namespace platform {
namespace jsonKeys{
#if !defined(Q_OS_LINUX) || !defined(Q_OS_ANDROID) //hiding from linux at the moment due to unused variables warning
static const char* cpuBrand= "cpuBrand";
static const char* cpuModel = "cpuModel";
static const char* cpuClockSpeed = "clockSpeed";
@ -27,9 +26,8 @@ namespace platform {
static const char* displayCoordsRight = "coordinatesright";
static const char* displayCoordsTop = "coordinatestop";
static const char* displayCoordsBottom = "coordinatesbottom";
#endif
}
} // namespace platform
#endif
#endif