Esempio n. 1
0
        public void CheckForUpdates()
        {
            Version localVersion = new Version(IOVariables.RemindMeVersion);
            Version newVersion   = BLIO.GetGithubVersion();

            if (!BLIO.LastLogMessage.Contains("No new version."))
            {
                BLIO.Log("localVersion: " + localVersion + " gitVersion: " + newVersion);
            }

            if (newVersion > localVersion) //New version!
            {
                if (!BLIO.LastLogMessage.Contains("No new version."))
                {
                    BLIO.Log("New version detected!");
                }
                //SetupRemindMe exists? is the version of the msi the same as the github version? That means it is the one you downloaded. Let's not download it again!
                if (File.Exists(IOVariables.rootFolder + "SetupRemindMe.msi") &&
                    new Version(BLIO.GetMsiVersion(IOVariables.rootFolder + "SetupRemindMe.msi")) == newVersion)
                {
                    return;
                }

                DownloadMsi();
            }
            else
            if (!BLIO.LastLogMessage.Contains("No new version."))
            {
                BLIO.Log("No new version.");
            }
        }