Projects/Tools/CSProjectGenerator/src/com/chilliworks/chillisource/csprojectgenerator/Main.java
/**
	 * The entry point into the application
	 * 
	 * @author Ian Copland
	 * 
	 * @param The input arguments.
	 */
The entry point into the application

@author Ian Copland

@param The input arguments.
The entry point into the application @author Ian Copland @param The input arguments .
public static void main(String[] in_arguments) throws Exception 
	{
		String[] arguments = Logging.start(in_arguments);
		if (arguments.length == 0)
		{
			printHelpText();
			return;
		}
		Options options = new Options();
		for (int i = 0; i < arguments.length; ++i)
		{
			if (arguments[i].equalsIgnoreCase(k_paramProjectName) == true || arguments[i].equalsIgnoreCase(k_shortParamProjectName) == true)
			{
				if (i+1 < arguments.length)
					options.m_projectName = arguments[i+1];
				else
					Logging.logFatal("No project name provided!");
				i++;
			}
			else if (arguments[i].equalsIgnoreCase(k_paramPackageName) == true || arguments[i].equalsIgnoreCase(k_shortParamPackageName) == true)
			{
				if (i+1 < arguments.length)
					options.m_packageName = arguments[i+1];
				else
					Logging.logFatal("No package name provided!");
				i++;
			}
			else if (arguments[i].equalsIgnoreCase(k_paramOutputDirectory) == true || arguments[i].equalsIgnoreCase(k_shortParamOutputDirectory) == true)
			{
				if (i+1 < arguments.length)
					options.m_outputDirectory = StringUtils.standardiseDirectoryPath(arguments[i+1]);
				else
					Logging.logFatal("No output directory path provided!");
				i++;
			}
			else if (arguments[i].equalsIgnoreCase(k_paramHelp) == true || arguments[i].equalsIgnoreCase(k_shortParamHelp) == true)
			{
				printHelpText();
				return;
			}
			else
			{
				Logging.logFatal("Invalid parameter found: " + arguments[i]);
			}
		}
		if (options.m_projectName.length() == 0 || options.m_packageName.length() ==0)
		{
			Logging.logFatal("Must provide project name, package name.");
		}
		CSProjectGenerator.generate(options);
		Logging.finish();
	}
public static void main ( String [ ] in_arguments ) throws Exception { String [ ] arguments = Logging . start ( in_arguments ) ; if ( arguments . length == 0 ) { printHelpText ( ) ; return ; } Options options = new Options ( ) ; for ( int i = 0 ; i < arguments . length ; ++ i ) { if ( arguments [ i ] . equalsIgnoreCase ( k_paramProjectName ) == true || arguments [ i ] . equalsIgnoreCase ( k_shortParamProjectName ) == true ) { if ( i + 1 < arguments . length ) options . m_projectName = arguments [ i + 1 ] ; else Logging . logFatal ( "No project name provided!" ) ; i ++ ; } else if ( arguments [ i ] . equalsIgnoreCase ( k_paramPackageName ) == true || arguments [ i ] . equalsIgnoreCase ( k_shortParamPackageName ) == true ) { if ( i + 1 < arguments . length ) options . m_packageName = arguments [ i + 1 ] ; else Logging . logFatal ( "No package name provided!" ) ; i ++ ; } else if ( arguments [ i ] . equalsIgnoreCase ( k_paramOutputDirectory ) == true || arguments [ i ] . equalsIgnoreCase ( k_shortParamOutputDirectory ) == true ) { if ( i + 1 < arguments . length ) options . m_outputDirectory = StringUtils . standardiseDirectoryPath ( arguments [ i + 1 ] ) ; else Logging . logFatal ( "No output directory path provided!" ) ; i ++ ; } else if ( arguments [ i ] . equalsIgnoreCase ( k_paramHelp ) == true || arguments [ i ] . equalsIgnoreCase ( k_shortParamHelp ) == true ) { printHelpText ( ) ; return ; } else { Logging . logFatal ( "Invalid parameter found: " + arguments [ i ] ) ; } } if ( options . m_projectName . length ( ) == 0 || options . m_packageName . length ( ) == 0 ) { Logging . logFatal ( "Must provide project name, package name." ) ; } CSProjectGenerator . generate ( options ) ; Logging . finish ( ) ; }
The entry point into the application
The entry point into the application
//input //template //output //help //failure