equal
deleted
inserted
replaced
245 for( MifConvSourceFileList::iterator i = iSourceFiles.begin(); i != iSourceFiles.end(); ++i ) |
245 for( MifConvSourceFileList::iterator i = iSourceFiles.begin(); i != iSourceFiles.end(); ++i ) |
246 { |
246 { |
247 // Build temp filename by replacing dir separator and ':' chars with '_': |
247 // Build temp filename by replacing dir separator and ':' chars with '_': |
248 MifConvString tmpFileName(i->Filename()); |
248 MifConvString tmpFileName(i->Filename()); |
249 ConvertToBinaryFilename(tmpFileName); |
249 ConvertToBinaryFilename(tmpFileName); |
250 |
250 |
251 // Copy source file to temp directory: |
251 // Copy source file to temp directory: |
252 MifConvString to(iTempDir + tmpFileName); |
252 MifConvString to(iTempDir + tmpFileName); |
253 if( MifConvUtil::CopyFile(i->Filename(), to) == false ) |
253 if( MifConvUtil::CopyFile(i->Filename(), to) == false ) |
254 { |
254 { |
255 THROW_ERROR_COMMON("File copy failed: " + to, MifConvString(__FILE__), __LINE__ ); |
255 THROW_ERROR_COMMON("File copy failed: " + to, MifConvString(__FILE__), __LINE__ ); |
257 iTempFilenames.push_back(to); |
257 iTempFilenames.push_back(to); |
258 // It seems that system() function does not work if the command consists of two separate parts |
258 // It seems that system() function does not work if the command consists of two separate parts |
259 // enclosed with quotation marks. If the whole string is enclosed with quotation marks then it works... |
259 // enclosed with quotation marks. If the whole string is enclosed with quotation marks then it works... |
260 // For example: command '"\epoc32\tools\bmconv" "somefile"' does not work while command |
260 // For example: command '"\epoc32\tools\bmconv" "somefile"' does not work while command |
261 // '""\epoc32\tools\bmconv" "somefile""' does. |
261 // '""\epoc32\tools\bmconv" "somefile""' does. |
262 |
262 cout << "Mifconvdebugging - executing" << MifConvString("\""+extConverterCommand+"\""+to+"\"\"").c_str() << endl; |
|
263 |
263 if( system(MifConvString("\""+extConverterCommand+"\""+to+"\"\"").c_str()) < 0 ) |
264 if( system(MifConvString("\""+extConverterCommand+"\""+to+"\"\"").c_str()) < 0 ) |
264 { |
265 { |
|
266 cout << "Mifconvdebugging - failed to execute" << MifConvString("\""+extConverterCommand+"\""+to+"\"\"").c_str() << endl; |
265 int ernro = errno; // The error number must check straight away before any next system command |
267 int ernro = errno; // The error number must check straight away before any next system command |
266 |
268 |
267 MifConvString errStr("Executing SVGTBINENCODE failed"); |
269 MifConvString errStr("Executing SVGTBINENCODE failed"); |
268 if( ernro ) |
270 if( ernro ) |
269 { |
271 { |