From 060f96ae7cf34a9358978981258e6e6ea74a5002 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 12 Apr 2021 16:00:21 +0100 Subject: [PATCH] Projucer: Generate consistent Xcode projects when saving on Windows --- .../ProjectSaving/jucer_ProjectExport_Xcode.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index 670ec593cd..af173cae0e 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -1971,8 +1971,8 @@ private: //============================================================================== static String expandPath (const String& path) { - if (! File::isAbsolutePath (path)) return "$(SRCROOT)/" + path; - if (path.startsWithChar ('~')) return "$(HOME)" + path.substring (1); + if (! build_tools::isAbsolutePath (path)) return "$(SRCROOT)/" + path; + if (path.startsWithChar ('~')) return "$(HOME)" + path.substring (1); return path; } @@ -2812,7 +2812,7 @@ private: String addFileOrFolderReference (const String& pathString, String sourceTree, String fileType) const { auto fileRefID = createFileRefID (pathString); - auto filename = File::createFileWithoutCheckingPath (pathString).getFileName(); + auto filename = build_tools::RelativePath (pathString, build_tools::RelativePath::unknown).getFileName(); ValueTree v (fileRefID + " /* " + filename + " */"); v.setProperty ("isa", "PBXFileReference", nullptr); @@ -2947,7 +2947,7 @@ private: String addBuildFile (const FileOptions& opts) const { auto fileID = createID (opts.path + "buildref"); - auto filename = File::createFileWithoutCheckingPath (opts.path).getFileName(); + auto filename = build_tools::RelativePath (opts.path, build_tools::RelativePath::unknown).getFileName(); if (opts.compile) { @@ -3084,7 +3084,7 @@ private: auto path = frameworkName; auto isRelativePath = path.startsWith ("../"); - if (! File::isAbsolutePath (path) && ! isRelativePath) + if (! build_tools::isAbsolutePath (path) && ! isRelativePath) path = "System/Library/Frameworks/" + path; if (! path.endsWithIgnoreCase (".framework")) @@ -3092,7 +3092,7 @@ private: auto fileRefID = createFileRefID (path); - addFileReference (((File::isAbsolutePath (frameworkName) || isRelativePath) ? "" : "${SDKROOT}/") + path); + addFileReference (((build_tools::isAbsolutePath (frameworkName) || isRelativePath) ? "" : "${SDKROOT}/") + path); frameworkFileIDs.add (fileRefID); return addBuildFile (FileOptions().withPath (path) @@ -3118,7 +3118,7 @@ private: String addEmbeddedFramework (const String& path) const { auto fileRefID = createFileRefID (path); - auto filename = File::createFileWithoutCheckingPath (path).getFileName(); + auto filename = build_tools::RelativePath (path, build_tools::RelativePath::unknown).getFileName(); auto fileType = getFileType (path); addFileOrFolderReference (path, "", fileType);