secureswitools/swisistools/source/signsis/parameter.cpp
branchRCL_3
changeset 24 5cc91383ab1e
parent 1 c42dffbd5b4f
equal deleted inserted replaced
23:cd189dac02f7 24:5cc91383ab1e
     1 /*
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    56 
    56 
    57 	iSign = true;
    57 	iSign = true;
    58 
    58 
    59 	for (int index = 1; index < argc; index++)
    59 	for (int index = 1; index < argc; index++)
    60 		{
    60 		{
    61 		if (	(argv [index][0] == '-') ||
    61  			// WINDOWS ENVIRONMENT : If the underlying platform is WINDOWS then, 
    62 				(argv [index][0] == '/'))
    62  			// cope up with multiple arguments following the '-' or '/'. 
       
    63  			//
       
    64  			// LINUX ENVIRONMENT : If the underlying platform is LINUX then, cope 
       
    65  			// up with multiple arguments following only the '-'. This restriction 
       
    66  			// of not dealing with arguments following '/' is due to the fact that, 
       
    67  			// the absolute paths in case of LINUX start with a '/'. So, this could 
       
    68  			// be mistaken as an option if we treat anything prefixed by a '/' as 
       
    69  			// an option. Hence, this facility is being removed once for all and 
       
    70  			// only '-' can(should) be used for specifying an option.
       
    71 		    if (	   (argv [index][0] == '-')   
       
    72 #ifndef __LINUX__			
       
    73 				    || (argv [index][0] == '/')
       
    74 #endif
       
    75 			   )
    63 			{
    76 			{
    64  			// cope with multiple arguments following the '-' or '/'
       
    65  			int wCharacter = 1;
    77  			int wCharacter = 1;
    66  			while (argv[index][wCharacter] !='\0')
    78  			while (argv[index][wCharacter] !='\0')
    67 				{
    79 				{
    68 				switch (argv [index][wCharacter])
    80 				switch (argv [index][wCharacter])
    69 					{
    81 					{
   377 void CParameter::ShowBanner()
   389 void CParameter::ShowBanner()
   378 // Displays the copyright...
   390 // Displays the copyright...
   379 	{
   391 	{
   380 	std::cout << std::endl << "SIGNSIS  " << " Version  5.1" << std::endl;
   392 	std::cout << std::endl << "SIGNSIS  " << " Version  5.1" << std::endl;
   381 	std::cout << "A utility for signing Software Installation (SIS) files." << std::endl;
   393 	std::cout << "A utility for signing Software Installation (SIS) files." << std::endl;
   382 	std::cout << "Copyright (c) 2007 Symbian Software Ltd. All rights reserved. " << std::endl;
   394 	std::cout << "Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved." << std::endl;
   383 #ifdef _DEBUG
   395 #ifdef _DEBUG
   384 	std::cout << std::endl << "Development Version" << std::endl;
   396 	std::cout << std::endl << "Development Version" << std::endl;
   385 #endif
   397 #endif
   386 	std::cout << std::endl;
   398 	std::cout << std::endl;
   387 	}
   399 	}