mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 21:36:12 +02:00
Load built-in resources earlier
This commit is contained in:
parent
e2c4af05bd
commit
686393d62f
1 changed files with 18 additions and 18 deletions
|
@ -630,6 +630,24 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
||||||
qApp->setProperty(hifi::properties::APP_LOCAL_DATA_PATH, cacheDir);
|
qApp->setProperty(hifi::properties::APP_LOCAL_DATA_PATH, cacheDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME fix the OSX installer to install the resources.rcc binary instead of resource files and remove
|
||||||
|
// this conditional exclusion
|
||||||
|
#if !defined(Q_OS_OSX)
|
||||||
|
{
|
||||||
|
#if defined(Q_OS_ANDROID)
|
||||||
|
const QString resourcesBinaryFile = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/resources.rcc";
|
||||||
|
#else
|
||||||
|
const QString resourcesBinaryFile = QCoreApplication::applicationDirPath() + "/resources.rcc";
|
||||||
|
#endif
|
||||||
|
if (!QFile::exists(resourcesBinaryFile)) {
|
||||||
|
throw std::runtime_error("Unable to find primary resources");
|
||||||
|
}
|
||||||
|
if (!QResource::registerResource(resourcesBinaryFile)) {
|
||||||
|
throw std::runtime_error("Unable to load primary resources");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Setting::init();
|
Setting::init();
|
||||||
|
|
||||||
// Tell the plugin manager about our statically linked plugins
|
// Tell the plugin manager about our statically linked plugins
|
||||||
|
@ -815,24 +833,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// FIXME fix the OSX installer to install the resources.rcc binary instead of resource files and remove
|
|
||||||
// this conditional exclusion
|
|
||||||
#if !defined(Q_OS_OSX)
|
|
||||||
{
|
|
||||||
#if defined(Q_OS_ANDROID)
|
|
||||||
const QString resourcesBinaryFile = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/resources.rcc";
|
|
||||||
#else
|
|
||||||
const QString resourcesBinaryFile = applicationDirPath() + "/resources.rcc";
|
|
||||||
#endif
|
|
||||||
if (!QFile::exists(resourcesBinaryFile)) {
|
|
||||||
throw std::runtime_error("Unable to find primary resources");
|
|
||||||
}
|
|
||||||
if (!QResource::registerResource(resourcesBinaryFile)) {
|
|
||||||
throw std::runtime_error("Unable to load primary resources");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
|
auto steamClient = PluginManager::getInstance()->getSteamClientPlugin();
|
||||||
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
setProperty(hifi::properties::STEAM, (steamClient && steamClient->isRunning()));
|
||||||
setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
|
setProperty(hifi::properties::CRASHED, _previousSessionCrashed);
|
||||||
|
|
Loading…
Reference in a new issue