putenv(const_cast<char *>("UNW_ARM_UNWIND_METHOD=6"));
#endif // __arm__
- if (standalone) {
- const char *deviceApiDirectory = getenv("__deviceAPIDirectory");
- const char *runtimeDirectory = getenv("__runtimeDirectory");
- if (deviceApiDirectory != nullptr)
- __deviceAPIDirectory = deviceApiDirectory;
- if (runtimeDirectory != nullptr)
- __runtimeDirectory = runtimeDirectory;
-
-#ifdef USE_MANAGED_LAUNCHER
- const char *launcherAssembly = getenv("__launcherAssembly");
- if (launcherAssembly != nullptr)
- __launcherAssembly = launcherAssembly;
-#endif
- }
-
if (__deviceAPIDirectory.empty()) {
_ERR("Empty Device API Directory");
return 1;
#include <Ecore.h>
#include <Eina.h>
#include <aul.h>
+#include <sys/types.h>
+#include <unistd.h>
#define __XSTR(x) #x
#define __STR(x) __XSTR(x)
if (standalone) {
_DBG("##### Run it standalone #########");
- const char* appId = getenv("AUL_APPID");
- _DBG("AUL_APPID : %s", appId);
+ char appId[1024] = {0,};
std::string appRoot;
- if (appId != nullptr) {
+ if (AUL_R_OK == aul_app_get_appid_bypid(getpid(), appId, sizeof(appId))) {
const char* appRootPath = aul_get_app_root_path();
if (appRootPath != nullptr)
appRoot = std::string(appRootPath);
} else {
- appId = "dotnet-launcher";
+ // If appId is not set, it is executed directly by cmdline.
+ // In this case, appRoot is passed as an argument.
+ snprintf(appId, 16, "%s", "dotnet-launcher");
+ appRoot = baseName(baseName(standalonePath));
}
+ _DBG("AUL_APPID : %s", appId);
- if (appRoot.empty())
- appRoot = baseName(baseName(standalonePath));
if (runtime->initialize(true) != 0) {
_ERR("Failed to initialize");
return 1;
if (fName.length() < ext.length() ||
fHame.compare(fName.length() - ext.length(), ext.length(), ext) != 0) {
return false;
+ }
std::string fullName = concatPath(dir, entry->d_name);
switch (entry->d_type) {