[DEV] add get application name API
This commit is contained in:
parent
500e2ebfd6
commit
b02a75a7b8
@ -111,4 +111,8 @@ void etk::init(int _argc, const char** _argv) {
|
||||
}
|
||||
}
|
||||
TK_INFO("E-TK system init (END)");
|
||||
}
|
||||
}
|
||||
|
||||
std::string etk::getApplicationName() {
|
||||
return etk::FSNodeGetApplicationName();
|
||||
}
|
||||
|
@ -9,6 +9,8 @@
|
||||
#ifndef __ETK_H__
|
||||
#define __ETK_H__
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace etk {
|
||||
/**
|
||||
* @brief Initialize etk
|
||||
@ -16,6 +18,12 @@ namespace etk {
|
||||
* @param[in] _argv List of arguments
|
||||
*/
|
||||
void init(int _argc, const char** _argv);
|
||||
|
||||
/**
|
||||
* @brief Get application name.
|
||||
* @return The application name
|
||||
*/
|
||||
std::string getApplicationName();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -150,6 +150,9 @@ static std::string baseRunPathInHome = "/";
|
||||
static std::string baseFolderCache = "~/.tmp/cache/"; // Temporary data (can be removed the next time)
|
||||
#endif
|
||||
|
||||
std::string etk::FSNodeGetApplicationName() {
|
||||
return baseApplName;
|
||||
}
|
||||
|
||||
#ifdef __TARGET_OS__Android
|
||||
static etk::Archive* s_APKArchive = nullptr;
|
||||
|
@ -25,6 +25,12 @@ namespace etk {
|
||||
namespace etk {
|
||||
void setArgZero(const std::string& _val);
|
||||
std::string simplifyPath(std::string _input);
|
||||
|
||||
/**
|
||||
* @brief Get application name.
|
||||
* @return The application name
|
||||
*/
|
||||
std::string FSNodeGetApplicationName();
|
||||
/**
|
||||
* List of Type that a node can have (this wrap some type that not exist on Windows)
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user