Skip to content

Commit 0c26457

Browse files
lufinkeylufinkey
lufinkey
authored and
lufinkey
committed
Fixed small building issues
Changed CompilerThread to clear the ProjectBuildInfo edited files after everything is assembled, rather than after the app is compiled. Also updated Project Templates to have the project type in their project.plist
1 parent 5a00568 commit 0c26457

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

CompilerWarnings.txt

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
-Wfour-char-constants
5757
-Wglobal-constructors
5858
-Wgnu-designator
59+
-Wgnu-static-float-init
5960
-Wgnu
6061
-Wheader-hygiene
6162
-Widiomatic-parentheses

Project Templates/Application/Navigation-based Application/project.plist

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<string>___EXECUTABLE_NAME___</string>
1313
<key>product</key>
1414
<string>___PRODUCT_NAME___</string>
15+
<key>projectType</key>
16+
<string>Application</string>
1517
<key>frameworks</key>
1618
<array>
1719
<string>UIKit</string>

Project Templates/Application/Window-based Application/project.plist

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<string>___EXECUTABLE_NAME___</string>
1313
<key>product</key>
1414
<string>___PRODUCT_NAME___</string>
15+
<key>projectType</key>
16+
<string>Application</string>
1517
<key>frameworks</key>
1618
<array>
1719
<string>UIKit</string>

Project Templates/Console/Blank Project/project.plist

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<string>___EXECUTABLE_NAME___</string>
1313
<key>product</key>
1414
<string>___PRODUCT_NAME___</string>
15+
<key>projectType</key>
16+
<string>Console</string>
1517
<key>frameworks</key>
1618
<array>
1719
</array>

Source/Compiler/CompilerOrganizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ void CompilerOrganizer::parseError(const String& error)
242242
}
243243
else if(expectingSupplementaryOutput==1)
244244
{
245-
if(error.length()>4 && (error.substring(0,4).equals(" ") || error.charAt(0)=='\t'))
245+
if(error.length()>2 && (error.substring(0,2).equals(" ") || error.charAt(0)=='\t'))
246246
{
247247
currentError.addSupplementaryOutput(error);
248248
return;

Source/Compiler/CompilerThread.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ void CompilerThread::run()
270270
for(int i=0; i<fakeCompiling.size(); i++)
271271
{
272272
String relPath = fakeCompiling.get(i);
273-
274273
CompilerThread_ChangeStatus(this, (String)"Reading bin/build/" + relPath + ".output");
275274

276275
String fullPath = buildFolder + '/' + relPath + ".output";
@@ -339,7 +338,12 @@ void CompilerThread::run()
339338
}
340339
}
341340

342-
if(result!=0)
341+
if(result==0)
342+
{
343+
projBuildInfo.getEditedFiles().clear();
344+
ProjectBuildInfo_saveBuildInfoPlist(&projBuildInfoStruct, &projDataStruct);
345+
}
346+
else
343347
{
344348
CompilerThread_ChangeStatus(this, "Failed");
345349
CompilerThread_FinishReciever(this, result);
@@ -446,12 +450,6 @@ void CompilerThread::run()
446450
}
447451
}
448452

449-
if(result==0)
450-
{
451-
projBuildInfo.getEditedFiles().clear();
452-
ProjectBuildInfo_saveBuildInfoPlist(&projBuildInfoStruct, &projDataStruct);
453-
}
454-
455453
CompilerThread_FinishReciever(this, result);
456454
}
457455

0 commit comments

Comments
 (0)