Changeset 7

Show
Ignore:
Timestamp:
02/25/06 13:18:02 (6 years ago)
Author:
mloar2
Message:

Modified schema to support dependencies.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Makefile

    r4 r7  
    88        cd ..\wipt-get 
    99        nmake /$(MAKEFLAGS) wipt-get.exe 
     10        cd ..\wipt-gui 
     11        nmake /$(MAKEFLAGS) wipt-gui.exe 
    1012        cd .. 
    1113        -mkdir bin 
     
    1315        copy /y wiptlib\wiptlib.dll bin 
    1416        copy /y System.Installer\System.Installer.dll bin 
     17        copy /y wipt-gui\wipt-gui.exe bin 
    1518 
    1619wipt.msi: all 
     
    2427 
    2528clean: 
     29        -rmdir /s /q bin 
    2630        -del Wipt.msi Wipt.wixobj 
    2731        cd System.Installer 
  • trunk/WiptLib/src/Library.cs

    r6 r7  
    131131 
    132132  /// <remarks> 
     133  /// The Dependency class represents a dependency. 
     134  /// </remarks> 
     135  [Serializable()] 
     136    public class Dependency 
     137    { 
     138      public string productName; 
     139      public Version minVersion; 
     140      public Version maxVersion; 
     141 
     142      public Dependency(string ProductName) 
     143      { 
     144        productName = ProductName; 
     145      } 
     146    } 
     147 
     148  /// <remarks> 
    133149  /// The Product class represents an installable product, such as rwho or 
    134150  /// Wipt. 
     
    149165      /// </summary>  
    150166      public Version develVersion; 
    151       /// <summary>A array of transforms for this product.</summary> 
     167      /// <summary>An array of Dependency objects this product depends on.</summary> 
     168      public Dependency[] dependencies; 
     169      /// <summary>An array of transforms for this product.</summary> 
    152170      public Transform[] transforms; 
    153171 
     
    437455                        ); 
    438456                    break; 
     457                  case "Dependency": 
     458                    Dependency d = new Dependency(e.GetAttribute("ProductName")); 
     459                    if(p.dependencies == null) 
     460                    { 
     461                      p.dependencies = new Dependency[1]; 
     462                      p.dependencies[0] = d; 
     463                    } 
     464                    else 
     465                    { 
     466                      Dependency[] nd = new Dependency[p.dependencies.Length + 1]; 
     467                      Array.Copy(p.dependencies, nd, p.dependencies.Length); 
     468                      nd[p.dependencies.Length] = d; 
     469                      p.dependencies = nd; 
     470                    } 
     471                    foreach(XmlElement t in e.ChildNodes) 
     472                    { 
     473                      switch(t.Name) 
     474                      { 
     475                        case "MinVersion": 
     476                          d.minVersion = new Version( 
     477                              t.GetAttribute("Major"), 
     478                              t.GetAttribute("Minor"), 
     479                              t.GetAttribute("Build") 
     480                              ); 
     481                        break; 
     482                        case "MaxVersion": 
     483                          d.maxVersion = new Version( 
     484                              t.GetAttribute("Major"), 
     485                              t.GetAttribute("Minor"), 
     486                              t.GetAttribute("Build") 
     487                              ); 
     488                        break; 
     489                      } 
     490                    } 
     491                    break; 
    439492                  case "Package": 
    440493                    Package a = new Package(e.GetAttribute("ProductCode")); 
  • trunk/WiptSchema.xsd

    r2 r7  
    11<?xml version="1.0" encoding="utf-8" ?> 
    22<xs:schema targetNamespace="urn:xmlns:sigwin:wipt-get:repository" xmlns="urn:xmlns:sigwin:wipt-get:repository" 
    3         xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="0.2"> 
     3        xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="0.3"> 
    44        <xs:element name="Repository"> 
    55                <xs:complexType> 
     
    1616                        <xs:element name="StableVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
    1717                        <xs:element name="DevelVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
     18      <xs:element name="Dependency" type="Dependency" minOccurs="0" maxOccurs="unbounded" /> 
    1819                        <xs:element name="Package" type="Package" maxOccurs="unbounded" /> 
    1920                        <xs:element name="Transform" type="Transform" minOccurs="0" maxOccurs="unbounded" /> 
     
    3839                <xs:attribute name="Minor" type="xs:int" /> 
    3940                <xs:attribute name="Build" type="xs:int" /> 
    40     <xs:attribute name="MatchMode" type="xs:int" /> 
    4141        </xs:complexType> 
     42  <xs:complexType name="Dependency"> 
     43    <xs:sequence> 
     44      <xs:element name="MinVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
     45      <xs:element name="MaxVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
     46    </xs:sequence> 
     47    <xs:attribute name="ProductName" type="xs:string" use="required" /> 
     48  </xs:complexType> 
    4249        <xs:complexType name="Package"> 
    4350                <xs:sequence> 
     
    4956        <xs:complexType name="Transform"> 
    5057                <xs:sequence> 
    51                         <xs:element name="Version" type="Version" minOccurs="0" maxOccurs="1" /> 
    52       <xs:element name="UpgradeCode" type="xs:string" minOccurs="0" maxOccurs="1" /> 
    53       <xs:element name="ProductCode" type="xs:string" minOccurs="0" maxOccurs="1" /> 
     58                        <xs:element name="MinVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
     59      <xs:element name="MaxVersion" type="Version" minOccurs="0" maxOccurs="1" /> 
    5460                        <xs:element name="URL" type="xs:string" minOccurs="1" maxOccurs="unbounded" /> 
    5561                </xs:sequence> 
  • trunk/Wipt.sln

    r2 r7  
    55EndProject 
    66Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wipt-get", "wipt-get\wipt-get.csproj", "{CE4162CC-B0C4-4541-A37D-CF64301012D4}" 
     7        ProjectSection(ProjectDependencies) = postProject 
     8        EndProjectSection 
     9EndProject 
     10Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WiptLib", "WiptLib\WiptLib.csproj", "{269B8A70-BEDB-4C36-BAB1-05E475F9C4EC}" 
    711        ProjectSection(ProjectDependencies) = postProject 
    812        EndProjectSection 
     
    2226                {CE4162CC-B0C4-4541-A37D-CF64301012D4}.Release.ActiveCfg = Release|.NET 
    2327                {CE4162CC-B0C4-4541-A37D-CF64301012D4}.Release.Build.0 = Release|.NET 
     28                {269B8A70-BEDB-4C36-BAB1-05E475F9C4EC}.Debug.ActiveCfg = Debug|.NET 
     29                {269B8A70-BEDB-4C36-BAB1-05E475F9C4EC}.Debug.Build.0 = Debug|.NET 
     30                {269B8A70-BEDB-4C36-BAB1-05E475F9C4EC}.Release.ActiveCfg = Release|.NET 
     31                {269B8A70-BEDB-4C36-BAB1-05E475F9C4EC}.Release.Build.0 = Release|.NET 
    2432        EndGlobalSection 
    2533        GlobalSection(ExtensibilityGlobals) = postSolution 
  • trunk/Wipt.wxs

    r2 r7  
    2222              <RemoveFolder Id="ACMDataDirRemove" On="uninstall" Property="ACMDataDir" /> 
    2323                                                </Component> 
    24                                                 <Component Id="WiptComponent" Guid="8C9ECEB5-A540-4700-9DED-E29B13582AD7"> 
     24                                                <Component Id="WiptgetComponent" Guid="8C9ECEB5-A540-4700-9DED-E29B13582AD7"> 
    2525                                                        <File Id="wiptget.exeFile" Name="WIPT-GET.EXE" DiskId="1" src="wipt-get\wipt-get.exe" Vital="yes" KeyPath="yes" /> 
    2626                                                        <Environment Id="UpdatePath" Name="PATH" Action="create" System="yes" Part="last" Value="[INSTALLDIR]" /> 
    2727                                                </Component> 
     28            <Component Id="WiptguiComponent" Guid="B4FCF30E-409C-45D4-81AE-CB41F0B88BF7"> 
     29                                                        <File Id="wiptgui.exeFile" Name="WIPT-GUI.EXE" DiskId="1" src="wipt-gui\wipt-gui.exe" Vital="yes" KeyPath="yes" /> 
     30            </Component> 
    2831                                        </Directory> 
    2932                                </Directory>