Ejemplo n.º 1
0
void CompilerThread_ErrorReciever(void*data, const char*error)
{
	CompilerThread* thread = (CompilerThread*)data;
	
	const String& currentFile = thread->getCurrentFile();
	if(currentFile.length()>0)
	{
		String fullPath = (String)ProjLoad_getSavedProjectsFolder() + '/' + thread->getOrganizer()->projData->getFolderName();
		fullPath += (String)"/bin/build/" + currentFile + ".output";
		FileTools::appendStringToFile(fullPath, (String)"stderr: " + error);
	}
	
	CompilerThread_OutputPacket* packet = new CompilerThread_OutputPacket();
	packet->organizer = thread->getOrganizer();
	packet->type = COMPILERPACKET_ERROR;
	packet->string = error;
	packet->value = 0;
	
	runCallbackInMainThread(&CompilerThread_MainThreadReciever, packet, false);
}
Ejemplo n.º 2
0
void CompilerThread_ResultReciever(void*data, int result)
{
	CompilerThread* thread = (CompilerThread*)data;
	thread->lastResult = result;
	
	CompilerThread_OutputPacket* packet = new CompilerThread_OutputPacket();
	packet->organizer = thread->getOrganizer();
	packet->type = COMPILERPACKET_RESULT;
	packet->string = "";
	packet->value = result;
	
	runCallbackInMainThread(&CompilerThread_MainThreadReciever, packet, false);
}