2022-07-31 22:50:02 +00:00
|
|
|
/*##############################################################################
|
|
|
|
## Author: Shaun Reed ##
|
|
|
|
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
|
|
|
|
## About: Manage files and resources used by qtk ##
|
|
|
|
## ##
|
|
|
|
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
|
|
|
##############################################################################*/
|
|
|
|
|
|
|
|
#include "resourcemanager.h"
|
2022-08-02 02:33:33 +00:00
|
|
|
#include <algorithm>
|
|
|
|
#include <string>
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
static std::string nixPath(std::string path)
|
|
|
|
{
|
|
|
|
#ifdef Q_OS_WINDOWS
|
|
|
|
std::replace(path.begin(), path.end(), '\\', '/');
|
|
|
|
#endif
|
|
|
|
return path;
|
|
|
|
}
|
2022-07-31 22:50:02 +00:00
|
|
|
|
|
|
|
std::string RM::resourcesDir =
|
2022-08-02 02:33:33 +00:00
|
|
|
std::string(__FILE__).substr(0, nixPath(__FILE__).find("src/"))
|
2022-07-31 22:50:02 +00:00
|
|
|
+ "resources/";
|