diff -r a1925fb7753a -r ac03b93ca9c4 imgtools/romtools/rofsbuild/rofsbuild.cpp --- a/imgtools/romtools/rofsbuild/rofsbuild.cpp Thu Aug 12 09:00:16 2010 +0100 +++ b/imgtools/romtools/rofsbuild/rofsbuild.cpp Tue Aug 17 15:31:16 2010 +0800 @@ -46,8 +46,8 @@ #endif static const TInt RofsbuildMajorVersion=2; -static const TInt RofsbuildMinorVersion=12; -static const TInt RofsbuildPatchVersion=4; +static const TInt RofsbuildMinorVersion=13; +static const TInt RofsbuildPatchVersion=1; static TBool SizeSummary=EFalse; static TPrintType SizeWhere=EAlways; @@ -77,11 +77,13 @@ TBool reallyHelp = EFalse; TBool gSmrImage = EFalse; string gSmrFileName = ""; +static string rofslogfile = "ROFSBUILD.LOG"; //Cache global variables bool gCache = false; bool gCleanCache = false; bool gNoCache = false; +TBool gIsOBYUTF8 = EFalse; TBool gKeepGoing = EFalse; void PrintVersion() { Print(EAlways,"\nROFSBUILD - Rofs/Datadrive image builder"); @@ -107,11 +109,13 @@ " -datadrive=,,... for driveimage creation\n" " user can also input rofs oby file if required to generate both.\n" " -smr=,,... for SMR partition creation\n" + " -oby-charset= used character set in which OBY was written\n" " -loglevel level of information to log (valid levels are 0,1,2).\n"//Tools like Visual ROM builder need the host/ROM filenames, size & if the file is hidden. " -wstdpath warn if destination path provided for a file is not the standard path\n" " -argfile= specify argument-file name containing list of command-line arguments\n" " -lowmem use memory-mapped file for image build to reduce physical memory consumption\n" -" -k to enable keepgoing when duplicate files exist in oby\n"; +" -k to enable keepgoing when duplicate files exist in oby\n" +" -logfile= specify log file\n"; char ReallyHelpText[] = "Log Level:\n" @@ -228,6 +232,13 @@ } } } + else if(strnicmp(argv[i], "-OBY-CHARSET=", 13) == 0) + { + if((stricmp(&argv[i][13], "UTF8")==0) || (stricmp(&argv[i][13], "UTF-8")==0)) + gIsOBYUTF8 = ETrue; + else + Print(EError, "Invalid encoding %s, default system internal encoding will be used.\n", &argv[i][13]); + } else if (stricmp(argv[i], "-UNCOMPRESS") == 0) { gCompress = ECompressionUncompress; } @@ -311,6 +322,9 @@ gLogLevel = DEFAULT_LOG_LEVEL; else if (stricmp(argv[i], "-LOWMEM") == 0) gLowMem = ETrue; + else if (strnicmp(argv[i], "-logfile=",9) ==0) { + rofslogfile = argv[i] + 9; + } else { #ifdef WIN32 Print (EWarning, "Unrecognised option %s\n",argv[i]); @@ -570,7 +584,9 @@ } // Process Rofs Obey files. if(obeyFileName) { - H.SetLogFile("ROFSBUILD.LOG"); + if (rofslogfile[rofslogfile.size()-1] == '\\' || rofslogfile[rofslogfile.size()-1] == '/') + rofslogfile += "ROFSBUILD.LOG"; + H.SetLogFile(rofslogfile.c_str()); ObeyFileReader *reader = new ObeyFileReader(obeyFileName); if (!reader->Open()) return KErrGeneral;