diff --git a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/Associations/RebelSoftware/InstallationScript.xml b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/Associations/RebelSoftware/InstallationScript.xml
new file mode 100644
index 00000000..2f81a2f8
--- /dev/null
+++ b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/Associations/RebelSoftware/InstallationScript.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ *.iap
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj
index 324ddbda..4a5e891c 100644
--- a/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj
+++ b/CSharp/Content/UniversalEditor.Content.PlatformIndependent/UniversalEditor.Content.PlatformIndependent.csproj
@@ -41,6 +41,7 @@
+
diff --git a/CSharp/Engines/WindowsForms/Plugins/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs b/CSharp/Engines/WindowsForms/Plugins/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs
index 17f7d35e..39dfc960 100644
--- a/CSharp/Engines/WindowsForms/Plugins/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs
+++ b/CSharp/Engines/WindowsForms/Plugins/UniversalEditor.Plugins.RebelSoftware.UserInterface.WindowsForms/Editors/RebelSoftware/InstallationScript/InstallationScriptEditor.cs
@@ -46,7 +46,23 @@ namespace UniversalEditor.Editors.RebelSoftware.InstallationScript
foreach (ISDialog dialog in script.Dialogs)
{
TreeNode tn = new TreeNode();
- if (dialog is WelcomeDialog)
+ if (dialog is CopyFilesDialog)
+ {
+ tn.Text = "CopyFiles";
+ }
+ else if (dialog is FinishDialog)
+ {
+ tn.Text = "Finish";
+ }
+ else if (dialog is LicenseDialog)
+ {
+ tn.Text = "License";
+ }
+ else if (dialog is StartCopyingDialog)
+ {
+ tn.Text = "StartCopying";
+ }
+ else if (dialog is WelcomeDialog)
{
tn.Text = "Welcome";
}
diff --git a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs
index 78a525c8..91fa6865 100644
--- a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs
+++ b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationDataFormat.cs
@@ -31,6 +31,10 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration
bool insideQuotedString = false;
bool escaping = false;
Group nextGroup = null;
+
+ // true if a real char (non-whitespace) was found; false otherwise
+ bool foundRealChar = false;
+
while (!tr.EndOfStream)
{
if (nextString.StartsWith(mvarSettings.SingleLineCommentStart))
@@ -46,6 +50,18 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration
}
char nextChar = tr.ReadChar();
+ if (!foundRealChar)
+ {
+ if (!Char.IsWhiteSpace(nextChar))
+ {
+ foundRealChar = true;
+ }
+ else
+ {
+ continue;
+ }
+ }
+
if (insideQuotedString)
{
if (nextChar == '"')
@@ -79,10 +95,11 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration
insideQuotedString = !insideQuotedString;
continue;
}
- else if (cw == mvarSettings.PropertyNameValueSeparator)
+ else if (cw == mvarSettings.PropertyNameValueSeparator && (mvarSettings.AllowTopLevelProperties || nextGroup != null))
{
nextPropertyName = nextString;
nextString = string.Empty;
+ foundRealChar = false;
}
else if (cw == mvarSettings.PropertySeparator)
{
@@ -102,6 +119,7 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration
}
nextPropertyName = string.Empty;
nextString = string.Empty;
+ foundRealChar = false;
}
else if (cw == mvarSettings.GroupStart)
{
diff --git a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs
index 5a9b4116..7312d1fc 100644
--- a/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs
+++ b/CSharp/Plugins/UniversalEditor.Essential/DataFormats/PropertyList/ExtensibleConfiguration/ExtensibleConfigurationSettings.cs
@@ -46,5 +46,10 @@ namespace UniversalEditor.DataFormats.PropertyList.ExtensibleConfiguration
///
public bool InlineGroupStart { get { return mvarInlineGroupStart; } set { mvarInlineGroupStart = value; } }
+ private bool mvarAllowTopLevelProperties = true;
+ ///
+ /// Determines whether top-level properties (i.e., those outside of a group definition) are allowed.
+ ///
+ public bool AllowTopLevelProperties { get { return mvarAllowTopLevelProperties; } set { mvarAllowTopLevelProperties = value; } }
}
}
diff --git a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs
index 8a558817..8e82e186 100644
--- a/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs
+++ b/CSharp/Plugins/UniversalEditor.Plugins.RebelSoftware/DataFormats/RebelSoftware/InstallationScript/IAPDataFormat.cs
@@ -11,8 +11,19 @@ using UniversalEditor.ObjectModels.RebelSoftware.InstallationScript.Actions;
namespace UniversalEditor.DataFormats.RebelSoftware.InstallationScript
{
- public class IAPDataFormat : ExtensibleConfigurationDataFormat
- {
+ public class IAPDataFormat : ExtensibleConfigurationDataFormat
+ {
+ private DataFormatReference _dfr = null;
+ protected override DataFormatReference MakeReferenceInternal()
+ {
+ if (_dfr == null)
+ {
+ _dfr = new DataFormatReference(GetType());
+ _dfr.Capabilities.Add(typeof(InstallationScriptObjectModel), DataFormatCapabilities.All);
+ }
+ return _dfr;
+ }
+
public IAPDataFormat()
{
// quote characters are literally part of the property value
@@ -24,15 +35,68 @@ namespace UniversalEditor.DataFormats.RebelSoftware.InstallationScript
// No separator except space between name and value
this.Settings.PropertyNameValueSeparator = " ";
+
+ // Property separator is the newline character
+ this.Settings.PropertySeparator = "\r\n";
+
+ // Do not allow top-level properties as property name/value separator (' ') conflicts with group definitions with spaces in them
+ this.Settings.AllowTopLevelProperties = false;
}
protected override void BeforeLoadInternal(Stack objectModels)
{
base.BeforeLoadInternal(objectModels);
+ objectModels.Push(new PropertyListObjectModel());
}
protected override void AfterLoadInternal(Stack objectModels)
{
- base.AfterLoadInternal(objectModels);
+ PropertyListObjectModel plom = (objectModels.Pop() as PropertyListObjectModel);
+ InstallationScriptObjectModel script = (objectModels.Pop() as InstallationScriptObjectModel);
+
+ foreach (Group group in plom.Groups)
+ {
+ switch (group.Name)
+ {
+ case "IA_Globals":
+ {
+ break;
+ }
+ case "IA_WelcomeDialog":
+ {
+ script.Dialogs.Add(new WelcomeDialog());
+ break;
+ }
+ case "IA_FinishDialog":
+ {
+ script.Dialogs.Add(new FinishDialog());
+ break;
+ }
+ case "IA_LicenseDialog":
+ {
+ script.Dialogs.Add(new LicenseDialog());
+ break;
+ }
+ case "IA_DestinationDialog":
+ {
+ script.Dialogs.Add(new DestinationDialog());
+ break;
+ }
+ case "IA_StartCopyingDialog":
+ {
+ script.Dialogs.Add(new StartCopyingDialog());
+ break;
+ }
+ case "IA_CopyFilesDialog":
+ {
+ script.Dialogs.Add(new CopyFilesDialog());
+ break;
+ }
+ case "IA_StartMenu":
+ {
+ break;
+ }
+ }
+ }
}
protected override void BeforeSaveInternal(Stack objectModels)
{
@@ -121,5 +185,5 @@ namespace UniversalEditor.DataFormats.RebelSoftware.InstallationScript
objectModels.Push(plom);
}
- }
+ }
}