<commit_before>// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
// Please see LICENSE.md in repository root for license information
// https://github.com/AtomicGameEngine/AtomicGameEngine

#include <Atomic/Atomic.h>
#include <Atomic/Core/ProcessUtils.h>
#include <Atomic/Resource/ResourceCache.h>

#include "JSBind.h"
#include "JSBindings.h"

#ifdef WIN32
#include <Windows.h>
#endif

using namespace Atomic;

SharedPtr<Context> JSBind::context_;
SharedPtr<FileSystem> JSBind::fileSystem_;
SharedPtr<Engine> JSBind::engine_;
String JSBind::ROOT_FOLDER;
String JSBind::PLATFORM;

void JSBind::Initialize()
{
    context_ = new Context();
    fileSystem_ = new FileSystem(context_);
    engine_ = new Engine(context_);

}

#include <stdio.h>

void Run(const Vector<String>& arguments)
{
    JSBind::Initialize();

    if (arguments.Size() < 2)
    {
        ErrorExit("Usage: JSBind absolute_path_to_atomic_runtime_source_tree platform");
    }

    JSBind::ROOT_FOLDER = arguments[0];
    JSBind::PLATFORM = arguments[1];

    if (!JSBind::fileSystem_->DirExists(JSBind::ROOT_FOLDER + "/Source/AtomicJS/JSBind"))
    {
        ErrorExit("The given Atomic Runtime source tree is invalid");
    }

    VariantMap engineParameters;
    engineParameters["Headless"] = true;
    engineParameters["WorkerThreads"] = false;
    engineParameters["LogName"] = String::EMPTY;

    JSBind::engine_->Initialize(engineParameters);

    ResourceCache* cache = JSBind::context_->GetSubsystem<ResourceCache>();
    cache->AddResourceDir(JSBind::ROOT_FOLDER + "/Source/AtomicJS/JSBind");

    JSBindings* bindings = new JSBindings();
    bindings->Initialize();
    bindings->ParseHeaders();
}
<commit_msg>Do note try and add any resource paths for JSBind (may address MSVC issue)<commit_after>// Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
// Please see LICENSE.md in repository root for license information
// https://github.com/AtomicGameEngine/AtomicGameEngine

#include <Atomic/Atomic.h>
#include <Atomic/Core/ProcessUtils.h>
#include <Atomic/Resource/ResourceCache.h>

#include "JSBind.h"
#include "JSBindings.h"

#ifdef WIN32
#include <Windows.h>
#endif

using namespace Atomic;

SharedPtr<Context> JSBind::context_;
SharedPtr<FileSystem> JSBind::fileSystem_;
SharedPtr<Engine> JSBind::engine_;
String JSBind::ROOT_FOLDER;
String JSBind::PLATFORM;

void JSBind::Initialize()
{
    context_ = new Context();
    fileSystem_ = new FileSystem(context_);
    engine_ = new Engine(context_);

}

#include <stdio.h>

void Run(const Vector<String>& arguments)
{
    JSBind::Initialize();

    if (arguments.Size() < 2)
    {
        ErrorExit("Usage: JSBind absolute_path_to_atomic_runtime_source_tree platform");
    }

    JSBind::ROOT_FOLDER = arguments[0];
    JSBind::PLATFORM = arguments[1];

    if (!JSBind::fileSystem_->DirExists(JSBind::ROOT_FOLDER + "/Source/AtomicJS/JSBind"))
    {
        ErrorExit("The given Atomic Runtime source tree is invalid");
    }

    VariantMap engineParameters;
    engineParameters["Headless"] = true;
    engineParameters["WorkerThreads"] = false;
    engineParameters["LogName"] = String::EMPTY;
    engineParameters["ResourcePaths"] = String::EMPTY;

    JSBind::engine_->Initialize(engineParameters);

    ResourceCache* cache = JSBind::context_->GetSubsystem<ResourceCache>();
    cache->AddResourceDir(JSBind::ROOT_FOLDER + "/Source/AtomicJS/JSBind");

    JSBindings* bindings = new JSBindings();
    bindings->Initialize();
    bindings->ParseHeaders();
}

{'fraction_non_alphanumeric': 0.12952488687782807, 'fraction_numerical': 0.007352941176470588, 'mean_word_length': 4.904841402337229, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 35, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4802277', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1107, 'n_words': 231}