fixed linux bugs

This commit is contained in:
AlexandreRouma
2020-10-24 14:51:55 +02:00
parent 0d45217dfd
commit edbc0c149d
9 changed files with 165 additions and 75 deletions

View File

@@ -62,46 +62,11 @@ duk_ret_t test_func(duk_context *ctx) {
int sdrpp_main() {
#ifdef _WIN32
//FreeConsole();
// ConfigManager::setResourceDir("./res");
// ConfigManager::setConfigDir(".");
#endif
// TESTING
// duk_context* ctx = duk_create_heap_default();
// duk_console_init(ctx, DUK_CONSOLE_PROXY_WRAPPER);
// std::ifstream file("test.js", std::ios::in);
// std::stringstream ss;
// ss << file.rdbuf();
// std::string code = ss.str();
// duk_idx_t baseObj = duk_push_object(ctx);
// duk_push_int(ctx, 42);
// duk_put_prop_string(ctx, baseObj, "my_property");
// duk_push_c_function(ctx, test_func, 0);
// duk_put_prop_string(ctx, baseObj, "my_func");
// duk_put_global_string(ctx, "my_object");
// duk_push_object(ctx);
// if (duk_peval_string(ctx, code.c_str()) != 0) {
// printf("Error: %s\n", duk_safe_to_string(ctx, -1));
// return -1;
// }
// duk_pop(ctx);
core::scriptManager.createScript("TestScript 1", "test.js");
//core::scriptManager.createScript("TestScript 2", "test.js");
//core::scriptManager.createScript("TestScript 3", "test.js");
//core::scriptManager.createScript("TestScript 4", "test.js");
// TESTING
spdlog::info("SDR++ v" VERSION_STR);
// Load config