Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 8133)
+++ src/sdk/globals.cpp (working copy)
@@ -201,6 +201,11 @@
return result;
}
+wxString NativeToUnix(const wxString& filename)
+{
+ wxFileName fname(filename);
+ return fname.GetFullPath(wxPATH_UNIX);
+}
void QuoteStringIfNeeded(wxString& str)
{
Index: src/sdk/projectloader.cpp
===================================================================
--- src/sdk/projectloader.cpp (revision 8133)
+++ src/sdk/projectloader.cpp (working copy)
@@ -1175,7 +1175,7 @@
{
wxFileName fname(outputFileName);
fname.ClearExt();
- outputFileName = fname.GetFullPath();
+ outputFileName = fname.GetFullPath(wxPATH_UNIX);
}
if ( (prefixPolicy == tgfpPlatformDefault)
@@ -1197,7 +1197,7 @@
if (!outputFileNameWOPrefix.IsEmpty())
{
fname.SetFullName(outputFileNameWOPrefix);
- outputFileName = fname.GetFullPath();
+ outputFileName = fname.GetFullPath(wxPATH_UNIX);
}
}
}
@@ -1207,19 +1207,19 @@
if (target->GetTargetType() == ttDynamicLib)
{
if (target->GetDynamicLibImportFilename() != _T("$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME)"))
- outnode->SetAttribute("imp_lib", cbU2C(target->GetDynamicLibImportFilename()));
+ outnode->SetAttribute("imp_lib", cbU2C(NativeToUnix(target->GetDynamicLibImportFilename())));
if (target->GetDynamicLibImportFilename() != _T("$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME)"))
- outnode->SetAttribute("def_file", cbU2C(target->GetDynamicLibDefFilename()));
+ outnode->SetAttribute("def_file", cbU2C(NativeToUnix(target->GetDynamicLibDefFilename())));
}
outnode->SetAttribute("prefix_auto", prefixPolicy == tgfpPlatformDefault ? "1" : "0");
outnode->SetAttribute("extension_auto", extensionPolicy == tgfpPlatformDefault ? "1" : "0");
if (target->GetWorkingDir() != _T("."))
- AddElement(tgtnode, "Option", "working_dir", target->GetWorkingDir());
+ AddElement(tgtnode, "Option", "working_dir", NativeToUnix(target->GetWorkingDir()));
if (target->GetObjectOutput() != _T(".objs"))
- AddElement(tgtnode, "Option", "object_output", target->GetObjectOutput());
+ AddElement(tgtnode, "Option", "object_output", NativeToUnix(target->GetObjectOutput()));
if (target->GetDepsOutput() != _T(".deps"))
- AddElement(tgtnode, "Option", "deps_output", target->GetDepsOutput());
+ AddElement(tgtnode, "Option", "deps_output", NativeToUnix(target->GetDepsOutput()));
}
if (!target->GetExternalDeps().IsEmpty())
AddElement(tgtnode, "Option", "external_deps", target->GetExternalDeps());
@@ -1377,7 +1377,7 @@
ProjectFile* f = pfa[i];
FileType ft = FileTypeOf(f->relativeFilename);
- TiXmlElement* unitnode = AddElement(prjnode, "Unit", "filename", f->relativeFilename);
+ TiXmlElement* unitnode = AddElement(prjnode, "Unit", "filename", NativeToUnix(f->relativeFilename));
if (!f->compilerVar.IsEmpty())
{
wxString ext = f->relativeFilename.AfterLast(_T('.')).Lower();
@@ -1404,7 +1404,7 @@
AddElement(unitnode, "Option", "weight", f->weight);
if (!f->virtual_path.IsEmpty())
- AddElement(unitnode, "Option", "virtualFolder", f->virtual_path);
+ AddElement(unitnode, "Option", "virtualFolder", NativeToUnix(f->virtual_path));
// loop and save custom build commands
for (pfCustomBuildMap::iterator it = f->customBuild.begin(); it != f->customBuild.end(); ++it)
Index: src/include/globals.h
===================================================================
--- src/include/globals.h (revision 8133)
+++ src/include/globals.h (working copy)
@@ -181,6 +181,7 @@
extern DLLIMPORT void AppendArray(const wxArrayString& from, wxArrayString& to);
extern DLLIMPORT wxString UnixFilename(const wxString& filename);
+extern DLLIMPORT wxString NativeToUnix(const wxString& filename);
extern DLLIMPORT void QuoteStringIfNeeded(wxString& str);
/// Escapes spaces and tabs (NOT quoting the string)