imgtools/romtools/rofsbuild/rofsbuild.cpp
changeset 631 9435b9008a58
parent 626 ac03b93ca9c4
child 647 53d1ab72f5bc
equal deleted inserted replaced
630:31ef8a13d4f4 631:9435b9008a58
    45 #define _alloca alloca
    45 #define _alloca alloca
    46 #endif
    46 #endif
    47 
    47 
    48 static const TInt RofsbuildMajorVersion=2;
    48 static const TInt RofsbuildMajorVersion=2;
    49 static const TInt RofsbuildMinorVersion=13;
    49 static const TInt RofsbuildMinorVersion=13;
    50 static const TInt RofsbuildPatchVersion=1;
    50 static const TInt RofsbuildPatchVersion=2;
    51 static TBool SizeSummary=EFalse;
    51 static TBool SizeSummary=EFalse;
    52 static TPrintType SizeWhere=EAlways;
    52 static TPrintType SizeWhere=EAlways;
    53 
    53 
    54 static TInt gHeaderType=1;			// EPOC header
    54 static TInt gHeaderType=1;			// EPOC header
    55 static TInt MAXIMUM_THREADS = 128;
    55 static TInt MAXIMUM_THREADS = 128;
    84 bool gCleanCache = false;
    84 bool gCleanCache = false;
    85 bool gNoCache = false;
    85 bool gNoCache = false;
    86 TBool gIsOBYUTF8 = EFalse;
    86 TBool gIsOBYUTF8 = EFalse;
    87 TBool gKeepGoing = EFalse;
    87 TBool gKeepGoing = EFalse;
    88 void PrintVersion() {
    88 void PrintVersion() {
    89 	Print(EAlways,"\nROFSBUILD - Rofs/Datadrive image builder");
    89 	printf("\nROFSBUILD - Rofs/Datadrive image builder");
    90 	Print(EAlways, " V%d.%d.%d\n", RofsbuildMajorVersion, RofsbuildMinorVersion, RofsbuildPatchVersion);
    90 	printf(" V%d.%d.%d\n", RofsbuildMajorVersion, RofsbuildMinorVersion, RofsbuildPatchVersion);
    91 	Print(EAlways,Copyright);
    91 	printf("%s\n\n", "Copyright (c) 1996-2010 Nokia Corporation.");
    92 }
    92 }
    93 
    93 
    94 char HelpText[] = 
    94 char HelpText[] = 
    95 	"Syntax: ROFSBUILD [options] obeyfilename(Rofs)\n"
    95 	"Syntax: ROFSBUILD [options] obeyfilename(Rofs)\n"
    96 	"Option: -v verbose,  -?,  -s[log|screen|both] size summary\n"
    96 	"Option: -v verbose,  -?,  -s[log|screen|both] size summary\n"
   515 	if ((!obeyFileName) && (!gDriveFilename.empty()) && (!gSmrFileName.empty())){
   515 	if ((!obeyFileName) && (!gDriveFilename.empty()) && (!gSmrFileName.empty())){
   516 		return KErrGeneral;
   516 		return KErrGeneral;
   517 	}
   517 	}
   518 	if(gThreadNum == 0) {
   518 	if(gThreadNum == 0) {
   519 		if(gCPUNum > 0) {
   519 		if(gCPUNum > 0) {
   520 			Print (EWarning, "The number of processors (%d) is used as the number of concurrent jobs.\n", gCPUNum);
   520 			printf("WARNING: The number of processors (%d) is used as the number of concurrent jobs.\n", gCPUNum);
   521 			gThreadNum = gCPUNum;
   521 			gThreadNum = gCPUNum;
   522 		}
   522 		}
   523 		else {
   523 		else {
   524 			Print (EWarning, "Can't automatically get the valid number of concurrent jobs and %d is used.\n", DEFAULT_THREADS);
   524 			printf("WARNING: Can't automatically get the valid number of concurrent jobs and %d is used.\n", DEFAULT_THREADS);
   525 			gThreadNum = DEFAULT_THREADS;
   525 			gThreadNum = DEFAULT_THREADS;
   526 		}
   526 		}
   527 	}
   527 	}
   528 	// Process drive obey files.
   528 	// Process drive obey files.
   529 	if(gDriveImage) {  
   529 	if(gDriveImage) {