|
|
@@ -184,19 +184,19 @@ void JSBModule::WriteIncludes(String& source)
|
|
|
|
|
|
String headerfile = GetFileNameAndExtension(header->filepath_);
|
|
|
|
|
|
-#ifdef WIN32
|
|
|
- headerPath.Replace(JSBind::ROOT_FOLDER + "/Source/Atomic/", "");
|
|
|
-#else
|
|
|
- headerPath.Replace(JSBind::ROOT_FOLDER + "/Source/Atomic/", "");
|
|
|
-#endif
|
|
|
- source.AppendWithFormat("#include \"%s%s\"\n", headerPath.CString(), headerfile.CString());
|
|
|
+ headerPath.Replace(JSBind::ROOT_FOLDER + "/Source/Atomic/", "Atomic/");
|
|
|
+
|
|
|
+ source.AppendWithFormat("#include <%s%s>\n", headerPath.CString(), headerfile.CString());
|
|
|
|
|
|
included.Push(header);
|
|
|
}
|
|
|
|
|
|
for (unsigned i = 0; i < includes_.Size(); i++)
|
|
|
{
|
|
|
- source.AppendWithFormat("#include \"%s\"\n", includes_[i].CString());
|
|
|
+ if (includes_[i].StartsWith("<"))
|
|
|
+ source.AppendWithFormat("#include %s\n", includes_[i].CString());
|
|
|
+ else
|
|
|
+ source.AppendWithFormat("#include \"%s\"\n", includes_[i].CString());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -206,10 +206,9 @@ void JSBModule::EmitSource(const String& filepath)
|
|
|
file.Open(filepath, FILE_WRITE);
|
|
|
|
|
|
source_ = "// This file was autogenerated by JSBind, changes will be lost\n";
|
|
|
- source_ += "#include \"Precompiled.h\"\n";
|
|
|
source_ += "#include <Duktape/duktape.h>\n";
|
|
|
- source_ += "#include \"Javascript/JSVM.h\"\n";
|
|
|
- source_ += "#include \"Javascript/JSAPI.h\"\n";
|
|
|
+ source_ += "#include <AtomicJS/Javascript/JSVM.h>\n";
|
|
|
+ source_ += "#include <AtomicJS/Javascript/JSAPI.h>\n";
|
|
|
|
|
|
WriteIncludes(source_);
|
|
|
|
|
|
@@ -366,11 +365,17 @@ void JSBModule::Load(const String &moduleJSONFilename)
|
|
|
{
|
|
|
String sourceFolder = sources.GetString(j);
|
|
|
Vector<String> fileNames;
|
|
|
- JSBind::fileSystem_->ScanDir(fileNames, JSBind::ROOT_FOLDER + "/Source/Atomic/" + sourceFolder, "*.h", SCAN_FILES, false);
|
|
|
+
|
|
|
+ String sourceRoot = "Atomic";
|
|
|
+
|
|
|
+ if (sourceFolder == "Javascript")
|
|
|
+ sourceRoot = "AtomicJS";
|
|
|
+
|
|
|
+ JSBind::fileSystem_->ScanDir(fileNames, JSBind::ROOT_FOLDER + "/Source/" + sourceRoot + "/" + sourceFolder, "*.h", SCAN_FILES, false);
|
|
|
for (unsigned k = 0; k < fileNames.Size(); k++)
|
|
|
{
|
|
|
// TODO: filter
|
|
|
- String filepath = JSBind::ROOT_FOLDER + "/Source/Atomic/" + sourceFolder + "/" + fileNames[k];
|
|
|
+ String filepath = JSBind::ROOT_FOLDER + "/Source/" + sourceRoot + "/" + sourceFolder + "/" + fileNames[k];
|
|
|
|
|
|
this->headerFiles_.Push(filepath);
|
|
|
}
|