Beispiel #1
0
        private void CheckPrerequisits(bool log)
        {
            if (log)
            {
                Logger.LogMessage("Name:    " + this.Name);
                Logger.LogMessage("Edition: " + this.Edition);
                Logger.LogMessage("Type:    " + this.Type);
                Logger.LogMessage("Level:   " + this.Level);
                if (this.Level != PackageLevel.Tool)
                {
                    Logger.LogMessage("Package version: " + this.VersionControl.Target);
                }
                if (this.Type == PackageType.Application)
                {
                    Logger.LogMessage("AppId: {0}", this.AppId);
                }
            }

            if (Level == PackageLevel.Install)
            {
                // Workaround for creating an in-memory version info in case the
                // database does not exist yet (or will be overwritten anyway).
                if (Type == PackageType.Product)
                {
                    RepositoryVersionInfo.SetInitialVersion(new ApplicationInfo
                    {
                        Name        = this.Name,
                        Edition     = this.Edition,
                        Version     = this.VersionControl.Target,
                        Description = this.Description
                    });
                }

                CheckInstall(RepositoryVersionInfo.Instance, log);
            }
            else
            {
                CheckUpdate(RepositoryVersionInfo.Instance, log);
            }
        }