summaryrefslogtreecommitdiff
path: root/Tools/XMLSchema/FarManifest.xsd
blob: 5993208fde98d9bc91a0c17dd7374c74efaf0aab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?xml version="1.0" encoding="UTF-8"?>
<!--
Filename: FarManifest.xsd

Copyright (c) 2006, Intel Corp.
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.TianoCore.org/2006/Edk2.0" xmlns="http://www.TianoCore.org/2006/Edk2.0">
  <xs:include schemaLocation="FrameworkHeaders.xsd"/>  
  <xs:annotation>
    <xs:documentation xml:lang="en">
      The Framework Archive File Format is defined as a Java Archive file, with a special xml file called FrameworkArchiveManifest.xml at the top of the archive. The FrameworkArchiveManifest.xml must be an instance of this schema.
    </xs:documentation>
  </xs:annotation>
  <xs:element name="FrameworkArchiveManifest">
    <xs:annotation>
      <xs:documentation xml:lang="en">
        This schema defines the Framework Archive Manifest. 
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" ref="FarHeader"/>
        <xs:element minOccurs="0" maxOccurs="1" ref="FarPackageList">   
          <xs:annotation>
            <xs:documentation>
              The list of packages in this FAR.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" ref="FarPlatformList">          
          <xs:annotation>
            <xs:documentation>
              The list of platforms in this FAR.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" ref="Contents">   
          <xs:annotation>
            <xs:documentation>
              Extra contents that are not part of any Package or Platform. These file paths are WORKSPACE relative.  If a file exists in the workspace at this location, then the user should be asked whether to overwrite.  When the user removes the far, these should be removed also, unless they have been modified (per md5sum).
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FarPackageList">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="unbounded" ref="FarPackage"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FarPackage">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="FarFilename">
          <xs:annotation>
            <xs:documentation>
              This is the name of the .spd or file that describes the package. It must exist in the directory identified by DefaultPath.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="GuidValue"></xs:element>
        <xs:element ref="Version"></xs:element>
        <xs:element ref="DefaultPath">
          <xs:annotation>
            <xs:documentation>
              This is the default installation location within the workspace. This also serves as the location within the far itself of the package root. The Contents of the pacakage will be found there. The user may choose some other location within the workspace to install the package, as long as it does not overlap a package that is already installed.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" ref="FarPlatformList">
          <xs:annotation>
            <xs:documentation>
              This list of platforms is relative to the package root of the package that they are contained in. If the package that these are bound to is intstalled in some directory other than the default, then these platforms should be stored relative to that.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="Contents">
          <xs:annotation>
            <xs:documentation>
              This is the list of files that belong to the package. They are specified by relative path from the root of the pacakge.                            
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FarPlatform">
    <xs:annotation>
      <xs:documentation>
        Platforms are treated separately from packages. A platform is listed in the far if, and only if, it is not part of some package.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="FarFilename">
          <xs:annotation>
            <xs:documentation>
              This is the relative path to the .fpd file that describes the platform.
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="GuidValue"></xs:element>
        <xs:element ref="Version"></xs:element>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="UserExtensions"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="DefaultPath" type="PathAndFilename"/>
  <xs:element name="FarPlatformList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="FarPlatform">
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="FarFilename" type="DbPathAndFilename">
    <xs:annotation>
      <xs:documentation>
        The FarFilename is used to build up the Contents list. It has an md5sum attribute for keeping track of whether the file is changed after it is installed. The Md5sum can also be used to check the integrity of a far before it is installed into the workspace.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="GuidValue" type="GuidType">
    <xs:annotation>
      <xs:documentation>
        The purpose of this element is to allow Guids to be assigned to or used by other elements in the schema.
      </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="Contents">
    <xs:annotation>
      <xs:documentation>
        This tag allows us to specify a tree of files all having a common root. All the files specified are relative to that common root.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="FarFilename"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:annotation>
    <xs:documentation xml:lang="en">
      Definitions and rules for creating, installing, updating and removing fars within the workspace.
    </xs:documentation>
    <xs:documentation>
      1.  A module m is said to depend upon a package p, iff there exists a tuple (PackageGuid, PackageVerion) in the set m->PackageDependencies for which p->Guid==PackageGuid, and if PackageVersion is not empty, then p->Version== PackageVersion.
    </xs:documentation>
    <xs:documentation>
      2.  A far f is said to depend on a far g, iff there is a module in a package in f that depends on a package in g.
    </xs:documentation>
    <xs:documentation>
      3.  A far f is said to depend on a package p, iff there is a module m contained in f that depends on p.
    </xs:documentation>
    <xs:documentation>
      3.1 A platform q is said to depend on a package p, iff p, or some module m contained in p, is necessary to build q.
    </xs:documentation>
    <xs:documentation>
      4.  A far f may be installed into the workspace w, iff for each module m in f, m’s dependencies are met by the packages in w.
    </xs:documentation>
    <xs:documentation>
      a. (If the dependencies are not met, then no part of far f will be installed. It is not legal to partially install a far into the workspace.)
    </xs:documentation>
    <xs:documentation>
      5.  A far f may be removed from the workspace w, iff for each module m in w, and for each package p in f, m does not depend on p.
    </xs:documentation>
    <xs:documentation>
      a. (If there is some dependency on f, then no part of f may be uninstalled from w. It is not legal to partially uninstall a far from the workspace.)
    </xs:documentation>
    <xs:documentation>
      6.  When installing a far f into workspace w, for each package p in f, allow the user to install in p's default location, or choose a new location l (which must be unoccupied) within the workspace. Record this location l in the database. Each package p in f will be recorded in the database, associated with the GUID of f, as well as the actual install location l. (So we will know which far each package belongs to.)
    </xs:documentation>
    <xs:documentation>
      7.  When installing a far f into workspace w, if there exists a package p in w, and p is in f, then the user must be prompted to choose a location that does not collide with the location of p in workspace w. We will end up with two instances of p in w at two distinct locations.
    </xs:documentation>
    <xs:documentation>
      8.  A far f may replace a far g in the workspace w, iff for each module m contained in w, if m depends on a package p, and p is only contained in g, then there must exist a package q in f, such that m depends on q. The net effect is that g is removed and f is installed, in one operation. The normal rules for installing f still apply--the dependencies of the modules of f must be satisfied. After the replacement, it must be the case that all the modules dependencies in the workspace are satisfied. Note that it is possible to backrev a package in this way. 
    </xs:documentation>
    <xs:documentation>
          (If we find that the replace is not permitted, then the user may install f and keep g. Next, he could _port_ every module m in w that depends on g, to f and eventually remove g.)
    </xs:documentation>
    <xs:documentation>
      9.  A special case of the above rule is that a far f may be reinstalled into the workspace. (This would allow the user to get a fresh copy, or change the location in the workspace where one or more of the packages of f are installed.)
    </xs:documentation>
    <xs:documentation>
      10. When a far f is removed from the workspace w, for each package p in f, we will remove p from w.
    </xs:documentation>
    <xs:documentation>
      11. If a package p belongs to a far f, then it is not legal to remove p from the workspace w unless f is removed from w.
    </xs:documentation>
    <xs:documentation>
      11.1 If a platform p belongs to a far f, then it is not legal to remove p from the workspace w unless f is removed from w.
    </xs:documentation>
    <xs:documentation>
      12. A package p may be removed from the workspace, provided there does not exist a far f that contains p. (Newly created or cloned packages will not exist within a far, and thus may be removed from the workspace directly.)
    </xs:documentation>
    <xs:documentation>
      13. When a far f is removed from the workspace, the we will remove all the files in f from the workspace tree. If a file has been modified from the original as installed from the far (per md5sum) then the user should be asked if he is "sure" he wants to remove it.
    </xs:documentation>
    <xs:documentation>
      14. When a far is created, a GUID is generated and assigned to the far. If a far is created from the same components at a later time, it would have a different GUID.
    </xs:documentation>
    <xs:documentation>
      15. If a package p is marked with p->RePackage==false, then p may not be added to a far.
    </xs:documentation>
    <xs:documentation>
      16. When constructing a far f that contains at least one platform, then f may optionally be constructed such that for each platform q in f, every package p on which q depends should be included in f, unless p->RePackage==false. The far will have all the packages required, and may then be installed as a self-inflating executable that will create a brand new workspace on the developer's workstation.
    </xs:documentation>
    <xs:documentation>
      17. A far f is identical to a far g, iff f->Guid == g->Guid.
    </xs:documentation>
    <xs:documentation>
      18. A far f may be installed into the workspace w, iff there is no far g in w such that f->Guid==g->Guid.
    </xs:documentation>
  </xs:annotation>
</xs:schema>