mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 14:12:50 +02:00
added linux and android stubs to help with the linux and android warnings
This commit is contained in:
parent
19a848d481
commit
c43d3de213
7 changed files with 150 additions and 11 deletions
|
@ -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')
|
||||
}
|
||||
|
|
40
libraries/platform/src/AndroidPlatform.cpp
Normal file
40
libraries/platform/src/AndroidPlatform.cpp
Normal 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);
|
||||
}
|
25
libraries/platform/src/AndroidPlatform.h
Normal file
25
libraries/platform/src/AndroidPlatform.h
Normal 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
|
42
libraries/platform/src/LinuxPlatform.cpp
Normal file
42
libraries/platform/src/LinuxPlatform.cpp
Normal 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);
|
||||
}
|
25
libraries/platform/src/LinuxPlatform.h
Normal file
25
libraries/platform/src/LinuxPlatform.h
Normal 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
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue