]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/GenBuild/org/tianocore/build/id/PackageIdentification.java
1 package org
.tianocore
.build
.id
;
4 import org
.tianocore
.build
.global
.GlobalData
;
6 public class PackageIdentification
extends Identification
{
13 public PackageIdentification(String guid
, String version
){
17 public PackageIdentification(String name
, String guid
, String version
){
18 super(name
, guid
, version
);
21 public PackageIdentification(String name
, String guid
, String version
, String spdFilename
){
22 super(name
, guid
, version
);
23 this.spdFile
= new File(spdFilename
);
26 public PackageIdentification(String name
, String guid
, String version
, File spdFile
){
27 super(name
, guid
, version
);
28 this.spdFile
= spdFile
;
31 public void setSpdFile(File spdFile
) {
32 this.spdFile
= spdFile
;
35 public File
getSpdFile() {
39 public String
toString(){
41 GlobalData
.refreshPackageIdentification(this);
43 if (version
== null || version
.trim().equalsIgnoreCase("")) {
44 return "package [" + name
+ "]";
47 return "package [" + name
+ " " + version
+ "]";
51 public String
getPackageDir(){
53 return spdFile
.getParent();
56 public String
getPackageRelativeDir(){
58 return spdFile
.getParent().substring(GlobalData
.getWorkspacePath().length() + 1);
61 private void prepareSpdFile(){
62 if (spdFile
== null) {
63 GlobalData
.refreshPackageIdentification(this);
67 public String
getName() {
69 GlobalData
.refreshPackageIdentification(this);