48 private static String dictpath= "epoc32\\ost_dictionaries\\"; //$NON-NLS-1$ |
48 private static String dictpath= "epoc32\\ost_dictionaries\\"; //$NON-NLS-1$ |
49 private static String autogenpath= "epoc32\\include\\platform\\symbiantraces\\autogen\\"; //$NON-NLS-1$ |
49 private static String autogenpath= "epoc32\\include\\platform\\symbiantraces\\autogen\\"; //$NON-NLS-1$ |
50 private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$ |
50 private static Pattern versionPattern = Pattern.compile("^.*(\\d+\\.\\d+\\.\\d+).*$"); //$NON-NLS-1$ |
51 private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$ |
51 private static Pattern oldversionPat = Pattern.compile("^(1\\..*)|(2\\.1.*)"); //$NON-NLS-1$ |
52 //old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope) |
52 //old TC version should be up to 2.12.5 as new functionality was submitted to 2.12.6 (we hope) |
53 private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-2]\\.[0-3].*)"); //$NON-NLS-1$ |
53 private static Pattern sbsoldversionPat = Pattern.compile("^(1\\..*)|(2\\.[01]\\..*)|(2\\.1[0-4]\\.[0-9].*)"); //$NON-NLS-1$ |
54 private static String TCversion = ""; //$NON-NLS-1$ |
54 private static String TCversion = ""; //$NON-NLS-1$ |
55 private static String SBSversion = ""; //$NON-NLS-1$ |
55 private static String SBSversion = ""; //$NON-NLS-1$ |
56 private static File compilerpath; |
56 private static File compilerpath; |
57 private static boolean oldTC = false; |
57 private static boolean oldTC = false; |
58 private static boolean oldBuilder = false; |
58 private static boolean oldBuilder = false; |
76 } |
76 } |
77 |
77 |
78 compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
78 compilerpath = new File (epocroot + "epoc32" + File.separator + "tools" + File.separator +"tracecompiler" + File.separator); //default value to remove warnings. //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ |
79 |
79 |
80 ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$ |
80 ProcessBuilder tc = new ProcessBuilder("java", "-classpath", compilerpath.getPath(), //$NON-NLS-1$//$NON-NLS-2$ |
81 "com.nokia.tracecompiler.TraceCompiler", "-v"); //$NON-NLS-1$//$NON-NLS-2$ |
81 "com.nokia.tracecompiler.TraceCompilerMain", "-v"); //$NON-NLS-1$//$NON-NLS-2$ |
82 System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$ |
82 System.out.println("compilerPath= " + compilerpath); //$NON-NLS-1$ |
83 tc.directory(compilerpath); |
83 tc.directory(compilerpath); |
84 tc.redirectErrorStream(true); |
84 tc.redirectErrorStream(true); |
85 try { |
85 try { |
86 Process p = tc.start(); |
86 Process p = tc.start(); |
182 |
182 |
183 ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$ |
183 ostTraceDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\OstTraceDefinitions.h"); //$NON-NLS-1$ |
184 fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$) |
184 fixedidDefinitions = new File(epocroot+projectdir+"mmp_traces\\traces\\fixed_id.definitions"); //$NON-NLS-1$) |
185 headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$ |
185 headers.put("_traces", Arrays.asList(tracesHeader1,tracesHeader2,tracesHeader3,tracesHeader4,ostTraceDefinitions,fixedidDefinitions)); //$NON-NLS-1$ |
186 |
186 |
187 ostDict1 = new File(epocroot+dictpath+"mmp_traces1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
187 ostDict1 = new File(epocroot+dictpath+"mmp_traces1_dot_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
188 ostDict2 = new File(epocroot+dictpath+"mmp_traces2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
188 ostDict2 = new File(epocroot+dictpath+"mmp_traces2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
189 autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
189 autogenDict1 = new File(epocroot+autogenpath+"mmp_traces1_dot_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
190 autogenDict2 = new File(epocroot+autogenpath+"mmp_traces2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
190 autogenDict2 = new File(epocroot+autogenpath+"mmp_traces2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
191 dicts.put("_traces", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
191 dicts.put("_traces", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
192 |
192 |
193 //============================= |
193 //============================= |
194 |
194 |
319 source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$ |
319 source2 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile1.cpp"); //$NON-NLS-1$ |
320 source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$ |
320 source3 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\MultipleMmpApp2.cpp"); //$NON-NLS-1$ |
321 source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$ |
321 source4 = new File (epocroot+projectdir+"mmp_traces_target_type\\src\\ExtraCppFile2.cpp"); //$NON-NLS-1$ |
322 sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4)); |
322 sources.put("_traces_target_type", Arrays.asList(source1, source2, source3, source4)); |
323 |
323 |
324 ostDict1 = new File(epocroot+dictpath+"target11_exe_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
324 ostDict1 = new File(epocroot+dictpath+"mmp_traces_target_type1_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
325 ostDict2 = new File(epocroot+dictpath+"target12_exe_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
325 ostDict2 = new File(epocroot+dictpath+"mmp_traces_target_type2_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
326 autogenDict1 = new File(epocroot+autogenpath+"target11_exe_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
326 autogenDict1 = new File(epocroot+autogenpath+"mmp_traces_target_type1_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
327 autogenDict2 = new File(epocroot+autogenpath+"target12_exe_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
327 autogenDict2 = new File(epocroot+autogenpath+"mmp_traces_target_type2_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
328 dicts.put("_traces_target_type", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
328 dicts.put("_traces_target_type", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
329 |
329 |
330 //================================== |
330 //================================== |
331 |
331 |
332 loc = "traces\\"; //$NON-NLS-1$ |
332 loc = "traces\\"; //$NON-NLS-1$ |
360 name = "mmp_traces_mixed1"; |
360 name = "mmp_traces_mixed1"; |
361 } |
361 } |
362 |
362 |
363 ostDict1 = new File(epocroot+dictpath+name + suffix + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
363 ostDict1 = new File(epocroot+dictpath+name + suffix + "_0xe8576d96_Dictionary.xml"); //$NON-NLS-1$ |
364 autogenDict1 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
364 autogenDict1 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d96_TraceDefinitions.h"); //$NON-NLS-1$ |
365 if (!oldBuilder) { |
365 suffix= ""; |
366 suffix = "_kext"; //$NON-NLS-1$ |
366 //if (!oldBuilder) { |
367 name = "target4"; |
367 // suffix = "_kext"; //$NON-NLS-1$ |
368 } else { |
368 // name = "target4"; |
|
369 // } else { |
369 name = "mmp_traces_mixed2"; |
370 name = "mmp_traces_mixed2"; |
370 } |
371 // } |
371 ostDict2 = new File(epocroot+dictpath+name + suffix + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
372 ostDict2 = new File(epocroot+dictpath+name + suffix + "_0xe8576d95_Dictionary.xml"); //$NON-NLS-1$ |
372 autogenDict2 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
373 autogenDict2 = new File(epocroot+autogenpath+name + suffix + "_0xe8576d95_TraceDefinitions.h"); //$NON-NLS-1$ |
373 dicts.put("_traces_mixed", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
374 dicts.put("_traces_mixed", Arrays.asList(ostDict1, ostDict2, autogenDict1, autogenDict2)); //$NON-NLS-1$ |
374 } |
375 } |
375 |
376 |