Exemplo n.º 1
0
        private void DoAdditionalInstallTasks()
        {
            if (!Directory.Exists(LocationFolder))
            {
                Directory.CreateDirectory(LocationFolder);
            }
            UnInstallInfo.Save();
            //copy icon file
            if (!string.IsNullOrEmpty(GeneralInfo.Params[ParamNamesConst.ICON].Value) &&
                File.Exists(GeneralInfo.Params[ParamNamesConst.ICON].Value))
            {
                File.Copy(GeneralInfo.Params[ParamNamesConst.ICON].Value,
                          LocationFolder + "icon" + Path.GetExtension(GeneralInfo.Params[ParamNamesConst.ICON].Value),
                          true);
            }
            //copy the package file
            string newlocation = LocationFolder + GeneralInfo.Id + ".mpe2";

            if (newlocation.CompareTo(GeneralInfo.Location) != 0)
            {
                File.Copy(GeneralInfo.Location, newlocation, true);
                GeneralInfo.Location = newlocation;
            }
            MpeInstaller.InstalledExtensions.Add(this);
            MpeInstaller.KnownExtensions.Add(this);
            MpeInstaller.Save();
        }
Exemplo n.º 2
0
 private void DoAdditionalUnInstallTasks()
 {
   if (!Directory.Exists(LocationFolder))
     Directory.CreateDirectory(LocationFolder);
   UnInstallInfo.Save();
   MpeInstaller.InstalledExtensions.Remove(this);
   MpeInstaller.Save();
 }