1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Use the project line ending setting for auto-generated JUCE files and write the IDE project files using the native line endings

This commit is contained in:
ed 2018-11-28 15:32:15 +00:00
parent 3948e56486
commit 1f40a7b10e
14 changed files with 121 additions and 77 deletions

View file

@ -443,18 +443,12 @@ protected:
static void writeXmlOrThrow (const XmlElement& xml, const File& file, const String& encoding, int maxCharsPerLine, bool useUnixNewLines = false)
{
MemoryOutputStream mo;
xml.writeToStream (mo, String(), false, true, encoding, maxCharsPerLine);
if (useUnixNewLines)
{
MemoryOutputStream mo2;
mo2 << mo.toString().replace ("\r\n", "\n");
overwriteFileIfDifferentOrThrow (file, mo2);
}
else
{
overwriteFileIfDifferentOrThrow (file, mo);
}
mo.setNewLineString ("\n");
xml.writeToStream (mo, String(), false, true, encoding, maxCharsPerLine);
overwriteFileIfDifferentOrThrow (file, mo);
}
static Image rescaleImageForIcon (Drawable&, int iconSize);