* removed trial target * updated deploy scripts to exclude trial * cleanup CMakeLists * removed Eigen dependencies * split parser lib into lib_cxx and lib_java * added ProjectFactory and ProjectFactoryModules * removed old installer projects * updated wix installer * updated readme for wix setup * updated to use obfuscated exe * added qt.conf * added indexing dialog images * added jars * added coatidb files of sample projects * added source code of javaparser sample * removed auto-refresh image * intermediate files of windows installer are created in build folder * preselected desktop shortcut * build bat is executed from deploy_windows script
60 lines
2.0 KiB
C#
60 lines
2.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Microsoft.Deployment.WindowsInstaller;
|
|
using System.Xml;
|
|
|
|
namespace SetupAppSettings
|
|
{
|
|
public class CustomActions
|
|
{
|
|
[CustomAction]
|
|
public static ActionResult Main(Session session)
|
|
{
|
|
session.Log("Configuring AppSettings");
|
|
|
|
try
|
|
{
|
|
SetupAppSettings();
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
session.Log("Failed to configure AppSettings.");
|
|
session.Log("Exception: " + e.ToString());
|
|
return ActionResult.NotExecuted;
|
|
}
|
|
|
|
session.Log("Done configuring AppSettings");
|
|
|
|
return ActionResult.Success;
|
|
}
|
|
|
|
private static void SetupAppSettings()
|
|
{
|
|
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);
|
|
|
|
XmlNode javaparser = appSettings.CreateElement("recent_project");
|
|
javaparser.InnerText = projectsPath + "javaparser\\javaparser.coatiproject";
|
|
recentProjects.AppendChild(javaparser);
|
|
|
|
appSettings.Save(appSettingsPath);
|
|
}
|
|
}
|
|
}
|