secureswitools/swisistools/source/interpretsis/commandparser.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
   119 		<< "\t\t[-s [sisfile | dir] [+drive [+mcard | +mcardnr | +nonremovablepkg | +mcardalone | +mcardalonenr] [+sucert]]] [-s ...]\n"
   119 		<< "\t\t[-s [sisfile | dir] [+drive [+mcard | +mcardnr | +nonremovablepkg | +mcardalone | +mcardalonenr] [+sucert]]] [-s ...]\n"
   120 		<< "\t\t[-p param_file] [-d drive] [-r rofsbuild_log_file1,rofsbuild_log_file2,...]\n" 
   120 		<< "\t\t[-p param_file] [-d drive] [-r rofsbuild_log_file1,rofsbuild_log_file2,...]\n" 
   121 		<< "\t\t[-t romstubdir] [-n language_code] [-i config_file] \n"
   121 		<< "\t\t[-t romstubdir] [-n language_code] [-i config_file] \n"
   122 		<< "\t\t[-x pkgUID[,pkgUID2,...]] [-w [off | error | warn | info]] [-l logfile]\n\n"
   122 		<< "\t\t[-x pkgUID[,pkgUID2,...]] [-w [off | error | warn | info]] [-l logfile]\n\n"
   123 		<< "Where:\t-h\t\tDisplays help\n"
   123 		<< "Where:\t-h\t\tDisplays help\n"
   124 		#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   125 		<< "\t-a\t\tThe path representing the location of Resource files\n"
       
   126 		<< "\t  \t\tSpecifying the ROM Drive (-z) is mandatory.\n"
       
   127 		<< "\t  \t\tLocalize resource file is read from (Rom_drive\\path_specified_in_resource_file)\n"
       
   128 		#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   129 		<< "\t-c\t\tThe directory representing the system drive on the device\n"
   124 		<< "\t-c\t\tThe directory representing the system drive on the device\n"
   130 		<< "\t-d\t\tThe system drive letter [default to 'C']\n"
   125 		<< "\t-d\t\tThe system drive letter [default to 'C']\n"
   131 		<< "\t-e\t\tDisable eclipsing and SID checks using Z drive \n"
   126 		<< "\t-e\t\tDisable eclipsing and SID checks using Z drive \n"
   132 		<< "\t  \t\t-z or -r not required when this option used \n"
   127 		<< "\t  \t\t-z or -r not required when this option used \n"
   133 		#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   128 		#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   173 		<< "\tsucert\t\tTo indicate that the SIS file has been signed with a SU certificate\n\n";
   168 		<< "\tsucert\t\tTo indicate that the SIS file has been signed with a SU certificate\n\n";
   174     }
   169     }
   175 
   170 
   176 void CCommandParser::DisplayVersion()
   171 void CCommandParser::DisplayVersion()
   177 	{
   172 	{
   178 	std::cout << "\nINTERPRETSIS  " << " Version  3.0.0 ." << std::endl;
   173 	std::cout << "\nINTERPRETSIS  " << " Version  2.2.0 ." << std::endl;
   179 	std::cout << "Copyright (c) 2009 Symbian Software Ltd. All rights reserved.\n " << std::endl;
   174 	std::cout << "Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.\n " << std::endl;
   180 	}
   175 	}
   181  
   176  
   182 
   177 
   183 CParameterList* CCommandParser::ParseOptions(int argc, const char**argv)
   178 CParameterList* CCommandParser::ParseOptions(int argc, const char**argv)
   184     {
   179     {
   211 		bool err = false;
   206 		bool err = false;
   212 		const char* optPtr = *argv;
   207 		const char* optPtr = *argv;
   213 
   208 
   214 		switch (toupper(*++optPtr))
   209 		switch (toupper(*++optPtr))
   215 		    {
   210 		    {
   216 			#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   211 			case 'C':
   217 			case 'A':
       
   218 				{
   212 				{
   219 				if (argc <= 1)
   213 				if (argc <= 1)
   220 					throw CCommandParser::ECmdLineNoDirArgument;
   214 					throw CCommandParser::ECmdLineNoDirArgument;
   221 				
   215 				
   222 				--argc;
   216 				--argc;
   223 				aParamList->SetResourceFilePath(*(++argv));
       
   224 				break;	
       
   225 				}
       
   226 			#endif //SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   227 			case 'C':
       
   228 				{
       
   229 				if (argc <= 1)
       
   230 					throw CCommandParser::ECmdLineNoDirArgument;
       
   231 				
       
   232 				--argc;
       
   233 				aParamList->SetSystemDrive(*(++argv));
   217 				aParamList->SetSystemDrive(*(++argv));
   234 				break;
   218 				break;
   235 				
       
   236 				}
   219 				}
   237 			case 'D':
   220 			case 'D':
   238 				{	
   221 				{	
   239 				--argc;
   222 				--argc;
   240 				wchar_t buf[2048];
   223 				wchar_t buf[2048];
   241 				ConvertMultiByteToWideChar(*++argv,-1, buf, 2048);
   224 				ConvertMultiByteToWideChar(*++argv,-1, buf, 2048);
   242 				aParamList->SetSystemDriveLetter(tolower(buf[0]));
   225 				aParamList->SetSystemDriveLetter(tolower(buf[0]));
   243 				break;
   226 				break;
   244 				}					
   227 				}
   245 			case 'E':
   228 			case 'E':
   246 				{
   229 				{
   247 				aParamList->SetFlag(CParameterList::EFlagsDisableZDriveChecksSet);
   230 				aParamList->SetFlag(CParameterList::EFlagsDisableZDriveChecksSet);
   248 				break;
   231 				break;
   249 				}
   232 				}