comparison src/share/tools/ProjectCreator/WinGammaPlatform.java @ 2233:15d6977f04b0

7017824: Add support for creating 64-bit Visual Studio projects Summary: Updated create.bat and ProjectCreator Reviewed-by: brutisso, stefank, ohair
author sla
date Thu, 10 Feb 2011 13:03:22 +0100
parents aa6e219afbf1
children 74e790c48cd4
comparison
equal deleted inserted replaced
2205:b83527d0482d 2233:15d6977f04b0
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++) {
374 "BuildBase", 367 "BuildBase",
375 " (Did you set the HotSpotBuildSpace environment variable?)", 368 " (Did you set the HotSpotBuildSpace environment variable?)",
376 HsArgHandler.STRING 369 HsArgHandler.STRING
377 ), 370 ),
378 371
379 new HsArgRule("-projectFileName", 372 new HsArgRule("-platformName",
373 "PlatformName",
374 null,
375 HsArgHandler.STRING
376 ),
377
378 new HsArgRule("-projectFileName",
380 "ProjectFileName", 379 "ProjectFileName",
381 null, 380 null,
382 HsArgHandler.STRING 381 HsArgHandler.STRING
383 ), 382 ),
384 383
389 ), 388 ),
390 389
391 new HsArgRule("-compiler", 390 new HsArgRule("-compiler",
392 "CompilerVersion", 391 "CompilerVersion",
393 " (Did you set the VcVersion correctly?)", 392 " (Did you set the VcVersion correctly?)",
394 HsArgHandler.STRING
395 ),
396
397 new HsArgRule("-platform",
398 "Platform",
399 null,
400 HsArgHandler.STRING 393 HsArgHandler.STRING
401 ), 394 ),
402 395
403 new HsArgRule("-absoluteInclude", 396 new HsArgRule("-absoluteInclude",
404 "AbsoluteInclude", 397 "AbsoluteInclude",
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