Exemplo n.º 1
0
        public void LaunchProcess()
        {
            ProcessStartInfo startInfo = new ProcessStartInfo();

            startInfo.FileName = RuntimeHelper.MapToCurrentLocation("Updater.exe");

            startInfo.Arguments += StartUp.defaultSettingFileOnGit + "=\"" + DefaultSettingFileOnGit + "\"";

            Process.Start(startInfo);
        }
Exemplo n.º 2
0
        private string GetCurrentVersion()
        {
            var localVersionFile = RuntimeHelper.MapToCurrentLocation(Constants.VersionFileName);

            var currentVersion = string.Empty;

            if (File.Exists(localVersionFile))
            {
                currentVersion = File.ReadAllText(localVersionFile);
            }

            return(currentVersion);
        }
Exemplo n.º 3
0
        public void StartUpdate(string[] args)
        {
            _args = args;

            settingFilePRovider.SettingFilePathOnGitHub = GetParameterValue(defaultSettingFileOnGit);

            var setting            = settingFilePRovider.GetUpdaterSettingsJason();
            var appToUpdateExeName = RuntimeHelper.GetParentProcessName();

            RuntimeHelper.KillAllProcess(appToUpdateExeName);
            var app = new AppUdaterExecuter(GetCurrentVersion(), new AppUpdaterFactory().GetAppUpdaters(setting));

            app.Execute();

            Process.Start(RuntimeHelper.MapToCurrentLocation(appToUpdateExeName));
        }