Ejemplo n.º 1
0
 public DependencyItem(string type)
 {
   Type = type;
   Id = string.Empty;
   MinVersion = new VersionInfo();
   MaxVersion = new VersionInfo();
   WarnOnly = true;
   Message = string.Empty;
   Name = string.Empty;
 }
Ejemplo n.º 2
0
 public static VersionInfo Parse(string s)
 {
   VersionInfo ver = new VersionInfo();
   string[] vers = s.Split('.');
   if (vers.Length > 3)
   {
     ver.Major = vers[0];
     ver.Minor = vers[1];
     ver.Build = vers[2];
     ver.Revision = vers[3];
   }
   return ver;
 }
Ejemplo n.º 3
0
 public GeneralInfoItem()
 {
   Version = new VersionInfo();
   Id = Guid.NewGuid().ToString();
   ReleaseDate = DateTime.Now;
   Tags = string.Empty;
   ExtensionDescription = string.Empty;
   VersionDescription = string.Empty;
   Params = new SectionParamCollection();
   Params.Add(new SectionParam(ParamNamesConst.ICON, "", ValueTypeEnum.File,
                               "The icon file of the package (jpg,png,bmp)"));
   Params.Add(new SectionParam(ParamNamesConst.ONLINE_ICON, "", ValueTypeEnum.String,
                               "The icon file of the package stored online (jpg,png,bmp)"));
   Params.Add(new SectionParam(ParamNamesConst.CONFIG, "", ValueTypeEnum.Template,
                               "The file used to configure the extension.\n If have .exe extension the will be executed\n If have .dll extension used like MP plugin configuration"));
   Params.Add(new SectionParam(ParamNamesConst.ONLINE_SCREENSHOT, "", ValueTypeEnum.String,
                               "Online stored screenshot urls separated by ; "));
   Params.Add(new SectionParam(ParamNamesConst.FORCE_TO_UNINSTALL_ON_UPDATE, "yes", ValueTypeEnum.Bool,
                               "Show dialog and force to uninstall previous version when updating an extension. Should only be disabled if you are using an NSIS/MSI installer."));
 }
 /// <summary>
 /// Sets version and Id information from the package specified. Used to determine where to save uninstall data
 /// </summary>
 /// <param name="pak">Package from which to gather the information</param>
 public void SetInfo(PackageClass pak)
 {
   Version = pak.GeneralInfo.Version;
   ExtensionId = pak.GeneralInfo.Id;
 }
Ejemplo n.º 5
0
 public int CompareTo(VersionInfo obj)
 {
   int i1 = CompareNumber(Major, obj.Major);
   int i2 = CompareNumber(Minor, obj.Minor);
   int i3 = CompareNumber(Build, obj.Build);
   int i4 = CompareNumber(Revision, obj.Revision);
   if (i1 != 0)
     return i1;
   if (i2 != 0)
     return i2;
   if (i3 != 0)
     return i3;
   return i4;
 }
Ejemplo n.º 6
0
 protected bool Equals(VersionInfo other)
 {
   return string.Equals(_major, other._major) && string.Equals(_minor, other._minor) && string.Equals(_build, other._build) && string.Equals(_revision, other._revision);
 }