Merge branch 'master' of github.com:alcexhim/UniversalEditor

This commit is contained in:
Michael Becker 2022-03-17 14:36:44 -04:00
parent a65a3303e4
commit 38b61618eb
No known key found for this signature in database
GPG Key ID: 98C333A81F18C22C
25 changed files with 160 additions and 176 deletions

View File

@ -2,6 +2,6 @@
<UniversalEditor Version="4.0">
<ObjectModels>
<ObjectModel TypeName="UniversalEditor.ObjectModels.FileSystem.FileSystemObjectModel"
Visible="true" />
Visible="true" EmptyTemplatePrefix="EmptyFileSystem" />
</ObjectModels>
</UniversalEditor>

View File

@ -6,6 +6,7 @@
<Title>Windows filesystem</Title>
<Description>Creates a standard Windows NT file structure.</Description>
<IconPath LargeFileName="windows_32x32.png" SmallFileName="windows_16x16.png" />
<Prefix>WindowsFileSystem</Prefix>
<Path>
<Part>General</Part>
<Part>File system/archive</Part>

View File

@ -4,7 +4,7 @@
<ProjectTemplate ID="{BAB6BF34-F163-46A4-A34C-8FC0B08BC607}" TypeID="{B37FAACC-9946-454A-B4DB-4FAB8D044316}">
<Information>
<Title>Empty File System</Title>
<ProjectNamePrefix>FileSystem</ProjectNamePrefix>
<Prefix>FileSystem</Prefix>
<Description>Creates an empty FileSystem project for packaging files in various archive formats.</Description>
<IconPath LargeFileName="Images/FileSystem_32x32.png" SmallFileName="Images/FileSystem_16x16.png" />
<Path>

View File

@ -4,7 +4,7 @@
<ProjectTemplate ID="{BAB6BF34-F163-46A4-A34C-8FC0B08BC607}" TypeID="{8E28DA96-1267-4077-910E-91D5E863C557}">
<Information>
<Title>Empty Torrent</Title>
<ProjectNamePrefix>Torrent</ProjectNamePrefix>
<Prefix>Torrent</Prefix>
<Description>Creates an empty Torrent project for distributing files over peer-to-peer networks.</Description>
<IconPath LargeFileName="Images/Torrent_32x32.png" SmallFileName="Images/Torrent_16x16.png" />
<Path>

View File

@ -4,7 +4,7 @@
<ProjectTemplate ID="{b6aa9ce4-0212-448c-aadb-0a55d82262de}" TypeID="{642aa8e1-5279-430a-a57b-4d846bd0801f}">
<Information>
<Title>Empty Project</Title>
<ProjectNamePrefix>Project</ProjectNamePrefix>
<Prefix>Project</Prefix>
<Description>Creates an empty project.</Description>
<IconPath LargeFileName="Images/EmptyProject_32x32.png" SmallFileName="Images/EmptyProject_16x16.png" />
<Path>

View File

@ -11,7 +11,7 @@
</ProjectTypes>
<Information>
<Title>Basic PlayStation(R) Mobile Project</Title>
<ProjectNamePrefix>PsmApp</ProjectNamePrefix>
<Prefix>PsmApp</Prefix>
<Description>Creates a basic PlayStation Mobile app for developing on PlayStation Vita and PlayStation 3.</Description>
<IconPath LargeFileName="Images/Psm_32x32.png" SmallFileName="Images/Psm_16x16.png" />
<Path>

View File

@ -13,6 +13,7 @@
<TargetFrameworkProfile />
<AssemblyOriginatorKeyFile>..\..\UniversalEditor.snk</AssemblyOriginatorKeyFile>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>

View File

@ -16,6 +16,8 @@
<AssemblyOriginatorKeyFile>..\..\UniversalEditor.snk</AssemblyOriginatorKeyFile>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -238,6 +238,7 @@ namespace UniversalEditor
private bool mvarVisible = true;
public bool Visible { get { return mvarVisible; } set { mvarVisible = value; } }
public string EmptyTemplatePrefix { get; set; } = null;
private static Dictionary<Guid, ObjectModelReference> _referencesByGUID = new Dictionary<Guid, ObjectModelReference>();
private static Dictionary<string, ObjectModelReference> _referencesByTypeName = new Dictionary<string, ObjectModelReference>();

View File

@ -547,66 +547,8 @@ namespace UniversalEditor.DataFormats.UEPackage
template.ID = new Guid(attID.Value);
}
MarkupTagElement tagInformation = (tagTemplate.Elements["Information"] as MarkupTagElement);
LoadTemplateCommonInformation(template, tagTemplate);
#region Information
{
if (tagInformation != null)
{
if (tagInformation.Elements["Title"] != null)
{
template.Title = tagInformation.Elements["Title"].Value;
}
if (tagInformation.Elements["Description"] != null)
{
template.Description = tagInformation.Elements["Description"].Value;
}
if (tagInformation.Elements["Prefix"] != null)
{
template.Prefix = tagInformation.Elements["Prefix"].Value;
}
MarkupTagElement tagPath = (tagInformation.Elements["Path"] as MarkupTagElement);
if (tagPath != null)
{
List<string> pathParts = new List<string>();
foreach (MarkupElement elPart in tagPath.Elements)
{
MarkupTagElement tagPart = (elPart as MarkupTagElement);
if (tagPart == null) continue;
if (tagPart.FullName != "Part") continue;
pathParts.Add(tagPart.Value);
}
template.Path = pathParts.ToArray();
}
MarkupTagElement tagIconPath = (tagInformation.Elements["IconPath"] as MarkupTagElement);
if (tagIconPath != null)
{
MarkupAttribute attFileName = tagIconPath.Attributes["FileName"];
if (attFileName != null)
{
string ImageFileName = attFileName.Value;
template.LargeIconImageFileName = ImageFileName;
template.SmallIconImageFileName = ImageFileName;
}
MarkupAttribute attLargeFileName = tagIconPath.Attributes["LargeFileName"];
if (attLargeFileName != null)
{
string ImageFileName = attLargeFileName.Value;
template.LargeIconImageFileName = ImageFileName;
}
MarkupAttribute attSmallFileName = tagIconPath.Attributes["SmallFileName"];
if (attSmallFileName != null)
{
string ImageFileName = attSmallFileName.Value;
template.SmallIconImageFileName = ImageFileName;
}
}
}
}
#endregion
#region Variables
{
MarkupTagElement tagVariables = (tagTemplate.Elements["Variables"] as MarkupTagElement);
@ -748,72 +690,8 @@ namespace UniversalEditor.DataFormats.UEPackage
}
}
#region Information
MarkupTagElement tagInformation = (tagTemplate.Elements["Information"] as MarkupTagElement);
if (tagInformation != null)
{
MarkupTagElement tagTitle = (tagInformation.Elements["Title"] as MarkupTagElement);
if (tagTitle != null) template.Title = tagTitle.Value;
LoadTemplateCommonInformation(template, tagTemplate);
MarkupTagElement tagDescription = (tagInformation.Elements["Description"] as MarkupTagElement);
if (tagDescription != null) template.Description = tagDescription.Value;
if (tagInformation.Elements["ProjectNamePrefix"] != null)
{
template.Prefix = tagInformation.Elements["ProjectNamePrefix"].Value;
}
MarkupTagElement tagPath = (tagInformation.Elements["Path"] as MarkupTagElement);
if (tagPath != null)
{
List<string> pathParts = new List<string>();
foreach (MarkupElement elPart in tagPath.Elements)
{
MarkupTagElement tagPart = (elPart as MarkupTagElement);
if (tagPart == null) continue;
if (tagPart.FullName != "Part") continue;
pathParts.Add(tagPart.Value);
}
template.Path = pathParts.ToArray();
}
MarkupTagElement tagIconPath = (tagInformation.Elements["IconPath"] as MarkupTagElement);
if (tagIconPath != null)
{
#region All Icons
{
MarkupAttribute attFileName = tagIconPath.Attributes["FileName"];
if (attFileName != null)
{
string FileName = attFileName.Value;
if (System.IO.File.Exists(FileName)) template.LargeIconImageFileName = FileName;
if (System.IO.File.Exists(FileName)) template.SmallIconImageFileName = FileName;
}
}
#endregion
#region Large Icon
{
MarkupAttribute attLargeFileName = tagIconPath.Attributes["LargeFileName"];
if (attLargeFileName != null)
{
string FileName = attLargeFileName.Value;
if (System.IO.File.Exists(FileName)) template.LargeIconImageFileName = FileName;
}
}
#endregion
#region Small Icon
{
MarkupAttribute attSmallFileName = tagIconPath.Attributes["SmallFileName"];
if (attSmallFileName != null)
{
string FileName = attSmallFileName.Value;
if (System.IO.File.Exists(FileName)) template.SmallIconImageFileName = FileName;
}
}
#endregion
}
}
#endregion
#region FileSystem
{
MarkupTagElement tagFileSystem = (tagTemplate.Elements["FileSystem"] as MarkupTagElement);
@ -1147,6 +1025,74 @@ namespace UniversalEditor.DataFormats.UEPackage
#endregion
}
private void LoadTemplateCommonInformation(Template template, MarkupTagElement tagTemplate)
{
MarkupTagElement tagInformation = (tagTemplate.Elements["Information"] as MarkupTagElement);
if (tagInformation != null)
{
MarkupTagElement tagTitle = (tagInformation.Elements["Title"] as MarkupTagElement);
if (tagTitle != null) template.Title = tagTitle.Value;
MarkupTagElement tagDescription = (tagInformation.Elements["Description"] as MarkupTagElement);
if (tagDescription != null) template.Description = tagDescription.Value;
if (tagInformation.Elements["Prefix"] != null)
{
template.Prefix = tagInformation.Elements["Prefix"].Value;
}
MarkupTagElement tagPath = (tagInformation.Elements["Path"] as MarkupTagElement);
if (tagPath != null)
{
List<string> pathParts = new List<string>();
foreach (MarkupElement elPart in tagPath.Elements)
{
MarkupTagElement tagPart = (elPart as MarkupTagElement);
if (tagPart == null) continue;
if (tagPart.FullName != "Part") continue;
pathParts.Add(tagPart.Value);
}
template.Path = pathParts.ToArray();
}
MarkupTagElement tagIconPath = (tagInformation.Elements["IconPath"] as MarkupTagElement);
if (tagIconPath != null)
{
#region All Icons
{
MarkupAttribute attFileName = tagIconPath.Attributes["FileName"];
if (attFileName != null)
{
string FileName = attFileName.Value;
if (System.IO.File.Exists(FileName)) template.LargeIconImageFileName = FileName;
if (System.IO.File.Exists(FileName)) template.SmallIconImageFileName = FileName;
}
}
#endregion
#region Large Icon
{
MarkupAttribute attLargeFileName = tagIconPath.Attributes["LargeFileName"];
if (attLargeFileName != null)
{
string FileName = attLargeFileName.Value;
if (System.IO.File.Exists(FileName)) template.LargeIconImageFileName = FileName;
}
}
#endregion
#region Small Icon
{
MarkupAttribute attSmallFileName = tagIconPath.Attributes["SmallFileName"];
if (attSmallFileName != null)
{
string FileName = attSmallFileName.Value;
if (System.IO.File.Exists(FileName)) template.SmallIconImageFileName = FileName;
}
}
#endregion
}
}
}
private CustomDataFormatStructure CreateStructure(MarkupTagElement tag, Dictionary<string, object> localVariables)
{
MarkupAttribute attID = tag.Attributes["ID"];

View File

@ -69,6 +69,18 @@ namespace UniversalEditor
private Guid mvarID = Guid.Empty;
public Guid ID { get { return mvarID; } set { mvarID = value; } }
private string[] mvarPath = null;
/// <summary>
///
/// </summary>
public string[] Path { get { return mvarPath; } set { mvarPath = value; } }
/// <summary>
/// Gets or sets the template file name prefix.
/// </summary>
/// <value>The template file name prefix.</value>
public string Prefix { get; set; } = String.Empty;
private string mvarTitle = String.Empty;
/// <summary>
/// The title of the document template.
@ -132,12 +144,6 @@ namespace UniversalEditor
/// </summary>
public MarkupObjectModel TemplateContent { get { return mvarTemplateContent; } }
private string[] mvarPath = null;
/// <summary>
///
/// </summary>
public string[] Path { get { return mvarPath; } set { mvarPath = value; } }
/// <summary>
/// Initializes the template's ObjectModel with the content specified in <see cref="TemplateContent" />.
/// </summary>
@ -224,12 +230,6 @@ namespace UniversalEditor
}
private string[] mvarPath = null;
/// <summary>
///
/// </summary>
public string[] Path { get { return mvarPath; } set { mvarPath = value; } }
public ProjectType.ProjectTypeCollection ProjectTypes { get; } = new ProjectType.ProjectTypeCollection();
private ProjectFileSystem mvarFileSystem = new ProjectFileSystem();

View File

@ -16,6 +16,8 @@
<AssemblyOriginatorKeyFile>..\..\UniversalEditor.snk</AssemblyOriginatorKeyFile>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -248,15 +248,24 @@ namespace UniversalEditor.UserInterface.Dialogs
row.SetExtraData<List<DocumentTemplate>>("dts", dts);
}
DocumentTemplate dtEmpty = new DocumentTemplate();
dtEmpty.ObjectModelReference = omr;
dtEmpty.Title = String.Format("Blank {0} Document", path[path.Length - 1]);
DocumentTemplate dtEmpty = CreateEmptyDocumentTemplate(omr);
dts.Add(dtEmpty);
}
InitializeObjectModelTreeViewRow(tm, row, omr, index + 1);
}
private DocumentTemplate CreateEmptyDocumentTemplate(ObjectModelReference omr)
{
string[] path = omr.Path;
DocumentTemplate dtEmpty = new DocumentTemplate();
dtEmpty.ObjectModelReference = omr;
dtEmpty.Title = String.Format("Blank {0} Document", path[path.Length - 1]);
dtEmpty.Prefix = omr.EmptyTemplatePrefix ?? String.Format("Empty{0}Document", path[path.Length - 1]);
return dtEmpty;
}
[EventHandler(nameof(cmdOK), "Click")]
private void cmdOK_Click(object sender, EventArgs e)
{
@ -353,12 +362,12 @@ namespace UniversalEditor.UserInterface.Dialogs
/// </summary>
/// <returns>A <see cref="TreeModelRow" /> which has zero child rows, or null if no such <see cref="TreeModelRow" /> exists.</returns>
/// <param name="row">Row.</param>
private TreeModelRow ExpandSingleChildRows(TreeModelRow row)
private TreeModelRow ExpandSingleChildRows(ListViewControl tv, TreeModelRow row)
{
if (row.Rows.Count == 1)
{
row.Expanded = true;
return ExpandSingleChildRows(row.Rows[0]);
tv.SetExpanded(row, true);
return ExpandSingleChildRows(tv, row.Rows[0]);
}
else if (row.Rows.Count == 0)
{
@ -394,7 +403,7 @@ namespace UniversalEditor.UserInterface.Dialogs
if (tmObjectModel.Rows.Count == 1)
{
TreeModelRow row = ExpandSingleChildRows(tmObjectModel.Rows[0]);
TreeModelRow row = ExpandSingleChildRows(tvObjectModel, tmObjectModel.Rows[0]);
if (row != null)
{
tvObjectModel.SelectedRows.Clear();
@ -511,7 +520,7 @@ namespace UniversalEditor.UserInterface.Dialogs
RefreshProjectTemplates(tvObjectModel.SelectedRows[0]);
}
if (tmTemplate.Rows.Count == 1)
if (tmTemplate.Rows.Count > 0)
{
tvTemplate.SelectedRows.Add(tmTemplate.Rows[0]);
}
@ -549,7 +558,6 @@ namespace UniversalEditor.UserInterface.Dialogs
if (pt == null) return;
if (!txtFileName.IsChangedByUser)
{
string prefix = pt.Prefix;
if (String.IsNullOrEmpty(prefix))
{

View File

@ -342,7 +342,7 @@ namespace UniversalEditor.UserInterface
}
else if (eo is ChoiceSetting)
{
ChoiceSetting.ChoiceSettingValue choice = (ChoiceSetting.ChoiceSettingValue) (eo as ChoiceSetting).GetValue();
ChoiceSetting.ChoiceSettingValue choice = (ChoiceSetting.ChoiceSettingValue)(eo as ChoiceSetting).GetValue();
if (choice != null)
{
Type[] interfaces = pi.PropertyType.GetInterfaces();
@ -509,16 +509,22 @@ namespace UniversalEditor.UserInterface
MarkupAttribute attTypeName = tag.Attributes["TypeName"];
MarkupAttribute attID = tag.Attributes["ID"];
MarkupAttribute attVisible = tag.Attributes["Visible"];
MarkupAttribute attEmptyTemplatePrefix = tag.Attributes["EmptyTemplatePrefix"];
ObjectModelReference omr = null;
if (attTypeName != null)
{
ObjectModelReference omr = UniversalEditor.Common.Reflection.GetAvailableObjectModelByTypeName(attTypeName.Value);
if (attVisible != null) omr.Visible = (attVisible.Value == "true");
omr = UniversalEditor.Common.Reflection.GetAvailableObjectModelByTypeName(attTypeName.Value);
}
else
{
ObjectModelReference omr = UniversalEditor.Common.Reflection.GetAvailableObjectModelByID(new Guid(attID.Value));
omr = UniversalEditor.Common.Reflection.GetAvailableObjectModelByID(new Guid(attID.Value));
}
if (omr != null)
{
if (attVisible != null) omr.Visible = (attVisible.Value == "true");
if (attEmptyTemplatePrefix != null) omr.EmptyTemplatePrefix = attEmptyTemplatePrefix.Value;
}
}
}

View File

@ -281,8 +281,8 @@ namespace UniversalEditor.UserInterface
DockingWindow di = dckContainer.Items[page] as DockingWindow;
if (di == null) return;
di.Title = GetDocumentTitle(page.Document);
page.Document.IsChanged = true;
di.Title = GetDocumentTitle(page.Document);
}
/*
private void page_Navigate(object sender, NavigateEventArgs e)

View File

@ -79,7 +79,7 @@ namespace UniversalEditor.Editors.FileSystem
string fileTitle = filename; // filePath[filePath.Length - 1];
bool containsInvalidFileNames = invalidFileNames.Length > 0 && fileTitle.EqualsAny(invalidFileNames);
bool containsInvalidChars = String.IsNullOrEmpty(invalidPathChars) || fileTitle.ContainsAny(invalidPathChars.ToCharArray());
bool containsInvalidChars = !String.IsNullOrEmpty(invalidPathChars) && fileTitle.ContainsAny(invalidPathChars.ToCharArray());
return !(containsInvalidFileNames || containsInvalidChars);
}
@ -119,7 +119,7 @@ namespace UniversalEditor.Editors.FileSystem
{
// nautilus does the equivalent of 'CurrentFolder = ...' except opens in multiple tabs
// which... we don't really have the ability to do multiple tabs for the same document at the moment
tv.SelectedRows[i].Expanded = true;
tv.SetExpanded(tv.SelectedRows[i], true);
}
else
{

View File

@ -83,7 +83,7 @@ namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Icarus
if (selectedCommand != null && selectedCommand.IsContainer)
{
RecursiveAddCommand(omcmd, tv.SelectedRows[0]);
tv.SelectedRows[0].Expanded = true;
tv.SetExpanded(tv.SelectedRows[0], true);
selectedCommand.Commands.Add(omcmd);
tv.SelectedRows[0].RowColumns[0].Value = GetCommandText(selectedCommand);

View File

@ -10,6 +10,8 @@
<RootNamespace>UniversalEditor</RootNamespace>
<AssemblyName>UniversalEditor.Plugins.Lighting</AssemblyName>
<FileAlignment>512</FileAlignment>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>

View File

@ -27,6 +27,8 @@
<TargetFrameworkProfile />
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ReleaseVersion>4.0.2019.12</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>

View File

@ -25,8 +25,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dependencies", "Dependencie
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBS.Framework.UserInterface", "..\MBS.Framework.UserInterface\Libraries\MBS.Framework.UserInterface\MBS.Framework.UserInterface.csproj", "{29E1C1BB-3EA5-4062-B62F-85EEC703FE07}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBS.Framework.UserInterface.Engines.GTK", "..\MBS.Framework.UserInterface\Engines\GTK\MBS.Framework.UserInterface.Engines.GTK\MBS.Framework.UserInterface.Engines.GTK.csproj", "{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{2ED32D16-6C06-4450-909A-40D32DA67FB4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Web", "Plugins\UniversalEditor.Plugins.Web\UniversalEditor.Plugins.Web.csproj", "{64089452-6A08-47A5-A857-BF418F80D4A3}"
@ -213,6 +211,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Con
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalEditor.Plugins.Microsoft.Multimedia", "Plugins\UniversalEditor.Plugins.Microsoft.Multimedia\UniversalEditor.Plugins.Microsoft.Multimedia.csproj", "{94059860-1F0B-453D-AFAB-EEDBB0AA25BB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MBS.Framework.UserInterface.Engines.GTK3", "..\MBS.Framework.UserInterface\Engines\GTK3\MBS.Framework.UserInterface.Engines.GTK3\MBS.Framework.UserInterface.Engines.GTK3.csproj", "{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -307,10 +307,6 @@ Global
{62CFC025-B8CF-42AA-880A-92F27377FCAF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62CFC025-B8CF-42AA-880A-92F27377FCAF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62CFC025-B8CF-42AA-880A-92F27377FCAF}.Release|Any CPU.Build.0 = Release|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.Build.0 = Release|Any CPU
{64089452-6A08-47A5-A857-BF418F80D4A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64089452-6A08-47A5-A857-BF418F80D4A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64089452-6A08-47A5-A857-BF418F80D4A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -617,6 +613,10 @@ Global
{94059860-1F0B-453D-AFAB-EEDBB0AA25BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94059860-1F0B-453D-AFAB-EEDBB0AA25BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94059860-1F0B-453D-AFAB-EEDBB0AA25BB}.Release|Any CPU.Build.0 = Release|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6F0AB1AF-E1A1-4D19-B19C-05BBB15C94B2} = {05D15661-E684-4EC9-8FBD-C014BA433CC5}
@ -628,7 +628,6 @@ Global
{8622EBC4-8E20-476E-B284-33D472081F5C} = {0399182F-AF56-4E86-B229-EAB38C2EE6AF}
{30467E5C-05BC-4856-AADC-13906EF4CADD} = {0399182F-AF56-4E86-B229-EAB38C2EE6AF}
{29E1C1BB-3EA5-4062-B62F-85EEC703FE07} = {20F315E0-52AE-479F-AF43-3402482C1FC8}
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6} = {20F315E0-52AE-479F-AF43-3402482C1FC8}
{64089452-6A08-47A5-A857-BF418F80D4A3} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
{BE4D0BA3-0888-42A5-9C09-FC308A4509D2} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
{D4D9C9A6-04A4-46AD-8238-2493A455723F} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
@ -718,6 +717,7 @@ Global
{5E639F63-97B0-4B34-8928-29A5A3C661F4} = {05D15661-E684-4EC9-8FBD-C014BA433CC5}
{D4AEC562-0FA7-48C4-9E46-C706AFCFA015} = {7B535D74-5496-4802-B809-89ED88274A91}
{94059860-1F0B-453D-AFAB-EEDBB0AA25BB} = {2ED32D16-6C06-4450-909A-40D32DA67FB4}
{62DC7CF9-C608-49E5-8C39-305B2E3E93F6} = {20F315E0-52AE-479F-AF43-3402482C1FC8}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0

View File

@ -91,7 +91,7 @@ cd $WD
sudo cp MainIcon.png /usr/share/icons/universal-editor.png
# link Production.snk to UniversalEditor.snk
ln -s ../Production.snk $(APPNAME).snk
ln -s ../Production.snk $APPNAME.snk
# start the build
msbuild

10
fxtool
View File

@ -22,16 +22,16 @@
######## DEFINITIONS
APP="MBS.Framework.UserInterface"
USAGE_STATEMENT="Usage: $0 {install|remove} {gtk|wf}"
USAGE_STATEMENT="Usage: $0 {install|remove} {gtk3|wf}"
EC_INVALID_CHOICE=1
######## IMPLEMENTATION
case "$1" in
install)
case "$2" in
gtk)
gtk3)
for ext in dll dll.config pdb xml; do
cp "../$APP/Output/Debug/$APP.Engines.GTK.$ext" "Output/Debug/"
cp "../$APP/Output/Debug/$APP.Engines.GTK3.$ext" "Output/Debug/"
done
;;
wf)
@ -46,9 +46,9 @@ case "$1" in
;;
remove)
case "$2" in
gtk)
gtk3)
for ext in dll dll.config pdb xml; do
rm "Output/Debug/$APP.Engines.GTK.$ext"
rm "Output/Debug/$APP.Engines.GTK3.$ext"
done
;;
wf)

View File

@ -3,7 +3,10 @@
cp MainIcon.png /usr/share/icons/universal-editor.png
cp net.alcetech.UniversalEditor.desktop /usr/share/applications
mkdir /usr/lib/universal-editor
if [ ! -d /usr/lib/universal-editor ]; then
mkdir /usr/lib/universal-editor
fi
cp -r Output/Debug/* /usr/lib/universal-editor
cp universal-editor /usr/lib/universal-editor
@ -11,7 +14,7 @@ cp universal-editor /usr/lib/universal-editor
echo "#!/bin/sh
cd /usr/lib/universal-editor
./universal-editor ${1+\"$@\"}
./universal-editor \${1+\"\$@\"}
" > /usr/bin/universal-editor
chmod a+x /usr/bin/universal-editor

View File

@ -4,7 +4,7 @@ Name=Universal Editor
Comment=Open and edit any document
GenericName=Document Editor
Keywords=Text;Editor
Exec=universal-editor %F
Exec=universal-editor --activation-type Launch %F
Terminal=false
X-MultipleArgs=true
Type=Application

View File

@ -2,5 +2,15 @@
FLAVOR=Debug
APPNAME=UniversalEditor
cd Output/$FLAVOR
mono $APPNAME.exe ${1+"$@"}
if [ -d Output/$FLAVOR ]; then
# running from git repository
cd Output/$FLAVOR
mono $APPNAME.exe ${1+"$@"}
else
# installed to local machine
mono $APPNAME.exe ${1+"$@"}
fi