|
|
@@ -11,8 +11,6 @@
|
|
|
#include "JSBModule.h"
|
|
|
#include "JSBFunction.h"
|
|
|
|
|
|
-
|
|
|
-
|
|
|
void JSBModule::ParseHeaders()
|
|
|
{
|
|
|
for (unsigned i = 0; i < headerFiles_.Size(); i++)
|
|
|
@@ -180,10 +178,15 @@ void JSBModule::WriteIncludes(String& source)
|
|
|
continue;
|
|
|
|
|
|
String headerPath = GetPath(header->filepath_);
|
|
|
- headerPath.Replace(JSBind::ROOT_FOLDER + "/Source/Atomic", "..");
|
|
|
|
|
|
- String headerfile = GetFileNameAndExtension(header->filepath_);
|
|
|
- source.AppendWithFormat("#include \"%s\%s\"\n", headerPath.CString(), headerfile.CString());
|
|
|
+ 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());
|
|
|
|
|
|
included.Push(header);
|
|
|
}
|
|
|
@@ -192,7 +195,6 @@ void JSBModule::WriteIncludes(String& source)
|
|
|
{
|
|
|
source.AppendWithFormat("#include \"%s\"\n", includes_[i].CString());
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
void JSBModule::EmitSource(const String& filepath)
|
|
|
@@ -201,10 +203,10 @@ 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 <Duktape/duktape.h>\n";
|
|
|
- source_ += "#include \"../Precompiled.h\"\n";
|
|
|
- source_ += "#include \"../Javascript/JSVM.h\"\n";
|
|
|
- source_ += "#include \"../Javascript/JSAPI.h\"\n";
|
|
|
+ source_ += "#include \"Precompiled.h\"\n";
|
|
|
+ source_ += "#include <Duktape/duktape.h>\n";
|
|
|
+ source_ += "#include \"../../Javascript/JSVM.h\"\n";
|
|
|
+ source_ += "#include \"../../Javascript/JSAPI.h\"\n";
|
|
|
|
|
|
WriteIncludes(source_);
|
|
|
|