/*
		 * Check for warnings and errors
		 */
		public void checkWarningsAndErrors(ErrorReporter errorReporter)
		{
			PlatformProperties platformProperties = m_platform.getPlatformProperties();

			DistributionsPlatformRenderer distributionsPlatformRenderer = new DistributionsPlatformRenderer(platformProperties.getDistributionPlatformList());
			distributionsPlatformRenderer.checkWarningsAndErrors(errorReporter);

			if (platformProperties.getActivePlatformArchitectureList().Count == 0)
			{
				errorReporter.addWarning("No build will be performed for the platform '" + platformProperties.name + "'\nYou must select at least one platform architecture for this platform.");
			}
			else if (platformProperties.getActiveTextureCompressionList().Count == 0)
			{
				errorReporter.addWarning("No build will be performed for the platform '" + platformProperties.name + "'\nYou must select at least one texture compression for this platform.");
			}

			if (m_platformAdditionalRenderer != null)
			{
				m_platformAdditionalRenderer.checkWarningsAndErrors(errorReporter);
			}
		}
		/*
		 * Check for warnings and errors
		 */
		public void checkWarningsAndErrors(ErrorReporter errorReporter)
		{
			if (m_advancedBuilder.getAdvancedSettings().overwriteScenes)
			{
				foreach (Configuration configuration in m_projectConfigurations.configurationList)
				{
					if (configuration.scenePathList == null || configuration.scenePathList.Count == 0)
					{
						errorReporter.addError("The configuration " + configuration.ToString() + " has no scene defined");
					}
				}
			}
			else
			{
				if (Utils.GetActiveScenePathArray() == null || Utils.GetActiveScenePathArray().Length == 0)
				{
					errorReporter.addError("You need at least one active scene for your project. Check File -> Build Settings");
				}
			}

			#if !UNITY_EDITOR_OSX
			if (m_projectConfigurations.configurationList.Count(x => x.platformType.Equals(PlatformType.iOS) && x.shouldAutoRunPlayer) != 0)
			{
				errorReporter.addError("You can't autorun an iOS build because you're not using a Mac. You can still build for iOS, but can't autorun. Please uncheck the 'Autorun Build' box in your build configuration");
			}
			#endif

			List<ReleaseType> activeReleaseTypeList = m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.isActive).ToList();
			
			if (activeReleaseTypeList.Count == 0)
			{
				errorReporter.addWarning("You need to select at least one release type in the 'Release Type' window.");
			}

			if (m_projectConfigurations.configurationList.Count == 0)
			{
				errorReporter.addWarning("You need to add at least one configuration in order to build multiple configurations.");
			}
			else
			{
				if (m_projectConfigurations.configurationList.Count(x => x.isEnabled) == 0)
				{
					errorReporter.addWarning("You need to enable at least one configuration in order to build multiple configurations.");
				}

				if (m_projectConfigurations.configurationList.GroupBy(x => x.getBuildPath(m_advancedBuilder.getAdvancedSettings(), System.DateTime.Now, m_advancedBuilder.getProductParameters().bundleVersion)).SelectMany(group => group.Skip(1)).Count() != 0)
				{
					errorReporter.addError("Be careful. You have some build path that are exactly the same for some configuration. So one configuration build will erase the other! Please modify the build path in the 'Build folder path' section to avoid this!");
				}

				foreach (Configuration configuration in m_projectConfigurations.configurationList)
				{
					string finalBuildPath = Application.dataPath.Replace("/Assets", string.Empty) + configuration.getBuildPath(m_advancedBuilder.getAdvancedSettings(), System.DateTime.Now, m_advancedBuilder.getProductParameters().bundleVersion);
					if (File.Exists(finalBuildPath) || Directory.Exists(finalBuildPath))
					{
						errorReporter.addWarning("There is already a build at path " + finalBuildPath + " for the configuration " + configuration.getDescription() + ". If you build, it will overwrite it.");
					}
				}
			}

			foreach (Configuration configuration in m_projectConfigurations.configurationList)
			{
				if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.name.Equals(configuration.releaseType.name)).Count() == 0)
				{
					errorReporter.addWarning("Be careful, it seems you changed a release type name, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.releaseType == null ? "N/A" : configuration.releaseType.name) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
				}

				if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.bundleIdentifier.Equals(configuration.releaseType.bundleIdentifier)).Count() == 0)
				{
					errorReporter.addWarning("Be careful, it seems you changed a release type bundle identifier, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.releaseType == null ? "N/A" : configuration.releaseType.bundleIdentifier) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
				}
				
				if (m_advancedBuilder.getReleaseTypes().getReleaseTypeList().Where(x => x.productName.Equals(configuration.releaseType.productName)).Count() == 0)
				{
					errorReporter.addWarning("Be careful, it seems you changed a release type product name, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.releaseType == null ? "N/A" : configuration.releaseType.productName) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
				}

				if (!configuration.distributionPlatform.name.Equals("Default"))
				{
					if (configuration.platform.getPlatformProperties().getDistributionPlatformList().Where(x => x.name.Equals(configuration.distributionPlatform.name)).Count() == 0)
					{
						errorReporter.addWarning("Be careful, it seems you changed a distribution platform name, and your configuration " + configuration.getDescription() + " still uses the old one (" + (configuration.distributionPlatform == null ? "N/A" : configuration.distributionPlatform.name) + "). To update, please delete the configuration and add it back again (remember to save your custom defines)");
					}
				}
			}
		}