1 /* |
1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
233 String name = null; |
233 String name = null; |
234 if ((locationsInTree == null) || |
234 if ((locationsInTree == null) || |
235 (locationsInTree.size() == 0)) { |
235 (locationsInTree.size() == 0)) { |
236 filesNotFound.add(fileName); |
236 filesNotFound.add(fileName); |
237 } else if (locationsInTree.size() > 1) { |
237 } else if (locationsInTree.size() > 1) { |
238 // We shouldn't have duplicate file names in our workspace. |
|
239 System.err.println(); |
|
240 System.err.println("There are multiple files named as: " + fileName); |
|
241 System.exit(-1); |
|
242 // The following code could be safely removed if we don't need duplicate |
|
243 // file names. |
|
244 |
|
245 // Iterate through them, trying to find one with a |
238 // Iterate through them, trying to find one with a |
246 // preferred path |
239 // preferred path |
247 search: |
240 search: |
248 { |
241 { |
249 for (Iterator locIter = locationsInTree.iterator(); |
242 for (Iterator locIter = locationsInTree.iterator(); |
334 String projectFileName = BuildConfig.getFieldString(null, "ProjectFileName"); |
327 String projectFileName = BuildConfig.getFieldString(null, "ProjectFileName"); |
335 String ext = getProjectExt(); |
328 String ext = getProjectExt(); |
336 |
329 |
337 String projectName = getProjectName(projectFileName, ext); |
330 String projectName = getProjectName(projectFileName, ext); |
338 |
331 |
339 writeProjectFile(projectFileName, projectName, createAllConfigs()); |
332 writeProjectFile(projectFileName, projectName, createAllConfigs(BuildConfig.getFieldString(null, "PlatformName"))); |
340 } |
333 } |
341 |
334 |
342 protected void writePrologue(String[] args) { |
335 protected void writePrologue(String[] args) { |
343 System.err.println("WinGammaPlatform platform-specific arguments:"); |
336 System.err.println("WinGammaPlatform platform-specific arguments:"); |
344 for (int i = 0; i < args.length; i++) { |
337 for (int i = 0; i < args.length; i++) { |
588 } |
581 } |
589 |
582 |
590 BuildConfig.putField(null, "PlatformObject", this); |
583 BuildConfig.putField(null, "PlatformObject", this); |
591 } |
584 } |
592 |
585 |
593 Vector createAllConfigs() { |
586 Vector createAllConfigs(String platform) { |
594 Vector allConfigs = new Vector(); |
587 Vector allConfigs = new Vector(); |
595 |
588 |
596 allConfigs.add(new C1DebugConfig()); |
589 allConfigs.add(new C1DebugConfig()); |
597 |
590 |
598 boolean b = true; |
591 allConfigs.add(new C1FastDebugConfig()); |
599 if (b) { |
592 allConfigs.add(new C1ProductConfig()); |
600 allConfigs.add(new C1FastDebugConfig()); |
593 |
601 allConfigs.add(new C1ProductConfig()); |
594 allConfigs.add(new C2DebugConfig()); |
602 |
595 allConfigs.add(new C2FastDebugConfig()); |
603 allConfigs.add(new C2DebugConfig()); |
596 allConfigs.add(new C2ProductConfig()); |
604 allConfigs.add(new C2FastDebugConfig()); |
597 |
605 allConfigs.add(new C2ProductConfig()); |
598 allConfigs.add(new TieredDebugConfig()); |
606 |
599 allConfigs.add(new TieredFastDebugConfig()); |
607 allConfigs.add(new TieredDebugConfig()); |
600 allConfigs.add(new TieredProductConfig()); |
608 allConfigs.add(new TieredFastDebugConfig()); |
601 |
609 allConfigs.add(new TieredProductConfig()); |
602 allConfigs.add(new CoreDebugConfig()); |
610 |
603 allConfigs.add(new CoreFastDebugConfig()); |
611 allConfigs.add(new CoreDebugConfig()); |
604 allConfigs.add(new CoreProductConfig()); |
612 allConfigs.add(new CoreFastDebugConfig()); |
605 |
613 allConfigs.add(new CoreProductConfig()); |
606 if (platform.equals("Win32")) { |
614 |
|
615 allConfigs.add(new KernelDebugConfig()); |
607 allConfigs.add(new KernelDebugConfig()); |
616 allConfigs.add(new KernelFastDebugConfig()); |
608 allConfigs.add(new KernelFastDebugConfig()); |
617 allConfigs.add(new KernelProductConfig()); |
609 allConfigs.add(new KernelProductConfig()); |
618 } |
610 } |
619 |
611 |