build: windows deploy
* implemented a new deploy script for windows * created a new setup project for the Coati Trail
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration.Install;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace SetupApplicationSettingsLib
|
||||
{
|
||||
[RunInstaller(true)]
|
||||
public partial class SetupApplicationSettings : System.Configuration.Install.Installer
|
||||
{
|
||||
public SetupApplicationSettings()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void Commit(IDictionary savedState)
|
||||
{
|
||||
base.Commit(savedState);
|
||||
|
||||
string appDataCoatiPath = Environment.GetEnvironmentVariable("APPDATA") + "\\..\\local\\Coati Software\\Coati\\";
|
||||
string appSettingsPath = appDataCoatiPath + "ApplicationSettings.xml";
|
||||
string projectsPath = appDataCoatiPath + "projects\\";
|
||||
|
||||
XmlDocument appSettings = new XmlDocument();
|
||||
appSettings.Load(@appSettingsPath);
|
||||
|
||||
XmlNode recentProjects = appSettings.SelectSingleNode("config/user/recent_projects");
|
||||
recentProjects.RemoveAll();
|
||||
|
||||
XmlNode tutorial = appSettings.CreateElement("recent_project");
|
||||
tutorial.InnerText = projectsPath + "tutorial\\tutorial.coatiproject";
|
||||
recentProjects.AppendChild(tutorial);
|
||||
|
||||
XmlNode tictactoe = appSettings.CreateElement("recent_project");
|
||||
tictactoe.InnerText = projectsPath + "tictactoe\\tictactoe.coatiproject";
|
||||
recentProjects.AppendChild(tictactoe);
|
||||
|
||||
appSettings.Save(appSettingsPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user