Permalink
Browse files

Added Mono project configurations

  • Loading branch information...
ritchiecarroll committed Nov 13, 2016
1 parent 6677c87 commit 17aacf435c7e3c3ecebb41ffbb7fa35afa9022bd
Showing with 879 additions and 94 deletions.
  1. +27 −1 README.md
  2. +35 −13 Source/Applications/openHistorian/openHistorian/Program.cs
  3. +18 −0 Source/Applications/openHistorian/openHistorian/openHistorian.csproj
  4. +19 −1 Source/Applications/openHistorian/openHistorianConsole/openHistorianConsole.csproj
  5. +343 −0 Source/Applications/openHistorian/openHistorianShell/App.config
  6. +47 −0 Source/Applications/openHistorian/openHistorianShell/Program.cs
  7. +36 −0 Source/Applications/openHistorian/openHistorianShell/Properties/AssemblyInfo.cs
  8. +104 −0 Source/Applications/openHistorian/openHistorianShell/openHistorianShell.csproj
  9. BIN Source/Applications/openHistorian/openHistorianShell/openHistorianShell.ico
  10. +10 −0 Source/Libraries/Adapters/openHistorian.Adapters/openHistorian.Adapters.csproj
  11. +22 −0 Source/Libraries/GSF.SortedTreeStore/GSF.SortedTreeStore.csproj
  12. +73 −31 Source/Libraries/GSF.SortedTreeStore/WinApi.cs
  13. +9 −0 Source/Libraries/NPlot/NPlot45.csproj
  14. +11 −0 Source/Libraries/openHistorian.Core/openHistorian.Core.csproj
  15. +10 −0 Source/Libraries/openVisN.Framework/openVisN.Framework.csproj
  16. +9 −0 Source/Libraries/openVisN.WinForms/openVisN.WinForms.csproj
  17. +10 −0 Source/Tools/ArchiveTools/ArchiveTools.csproj
  18. +9 −0 Source/Tools/ComparisonUtility/ComparisonUtility.csproj
  19. +9 −0 Source/Tools/DataExtractionUtility/DataExtractionUtility.csproj
  20. +2 −2 Source/Tools/HistorianView/HistorianView.csproj
  21. +10 −1 Source/Tools/MigrationUtility/MigrationUtility.csproj
  22. +9 −0 Source/Tools/frameworkVisN/frameworkVisN.csproj
  23. +9 −0 Source/Tools/openVisN/openVisN.csproj
  24. +3 −0 Source/buildmono.sh
  25. +45 −45 Source/openHistorian.sln
View
@@ -38,7 +38,33 @@ Three utilities are currently available to assist in using the openHistorian 2.
* View old discussion board topics [here](http://openhistorian.codeplex.com/discussions).
# Deployment
-Instructions for deploying openHistorian can be found on the [wiki](../../wiki)
+
+For detailed instructions on deploying the openHistorian, see the [installation guide](../../wiki/Installation-Guide)
+
+1. Make sure your system meets all the [requirements](#requirements) below.
+* Choose a [download](#downloads) below.
+* Unzip, if necessary.
+* Run openHistorianSetup.msi.
+* Follow the wizard.
+* Enjoy.
+
+## Requirements
+
+* .NET 4.6 or higher.
+* 64-bit Windows 7 or newer.
+* HTML 5 capable browser.
+* Database management system such as:
+ * SQL Server (Express version is fine)
+ * MySQL
+ * Oracle
+ * PostgreSQL
+ * SQLite\* (included, no extra install required)
+
+\* Not recommended for large deployments.
+
+## Downloads
+* Download a stable release [here](https://github.com/GridProtectionAlliance/openHistorian/releases).
+* Download the nightly build [here](http://www.gridprotectionalliance.org/nightlybuilds/openHistorian/Beta/openHistorian.Installs.zip).
# Contributing
If you would like to contribute please:
@@ -23,10 +23,12 @@
using System;
using System.Diagnostics;
+using System.IO;
using System.ServiceProcess;
using System.Threading;
using System.Windows.Forms;
using GSF.Console;
+using GSF.IO;
using GSF.Threading;
namespace openHistorian
@@ -58,12 +60,6 @@ static void Main()
Arguments args = new Arguments(Environment.CommandLine, true);
- if (args.Count > 1)
- {
- MessageBox.Show("Too many arguments. If specified, argument must be one of: -RunAsService, -RunAsApplication or -RunAsConsole.");
- Environment.Exit(1);
- }
-
if (args.Count == 0)
{
#if DEBUG
@@ -100,17 +96,43 @@ static void Main()
}
else
{
- string hostedServiceSessionName = Host.ServiceName + "Shell.exe";
- Process hostedServiceSession = Process.Start(hostedServiceSessionName);
+ string shellHostedServiceName = Host.ServiceName + "Shell.exe";
+ string shellHostedServiceFileName = FilePath.GetAbsolutePath(shellHostedServiceName);
+ string shellHostedServiceConfigFileName = FilePath.GetAbsolutePath(shellHostedServiceName + ".config");
+ string serviceConfigFileName = FilePath.GetAbsolutePath(Host.ServiceName + ".exe.config");
- if ((object)hostedServiceSession != null)
+ try
{
- hostedServiceSession.WaitForExit();
- Environment.Exit(hostedServiceSession.ExitCode);
+ File.Copy(serviceConfigFileName, shellHostedServiceConfigFileName, true);
+#if MONO
+ Process hostedServiceSession = Process.Start("mono", shellHostedServiceFileName);
+#else
+ Process hostedServiceSession = Process.Start(shellHostedServiceFileName);
+#endif
+ if ((object)hostedServiceSession != null)
+ {
+ hostedServiceSession.WaitForExit();
+
+ try
+ {
+ File.Copy(shellHostedServiceConfigFileName, serviceConfigFileName, true);
+ }
+ catch
+ {
+ // Do not report exception if config file could not be updated
+ }
+
+ Environment.Exit(hostedServiceSession.ExitCode);
+ }
+ else
+ {
+ MessageBox.Show($"Failed to start \"{Host.ServiceName}\" as a shell hosted service.");
+ Environment.Exit(1);
+ }
}
- else
+ catch (Exception ex)
{
- MessageBox.Show($"Failed to start \"{hostedServiceSessionName}\" with a hosted service.");
+ MessageBox.Show($"Failed to start \"{Host.ServiceName}\" as a shell hosted service: {ex.Message}");
Environment.Exit(1);
}
}
@@ -95,6 +95,24 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
+ <OutputPath>..\..\..\..\Build\Output\Mono\Applications\openHistorian\</OutputPath>
+ <DefineConstants>TRACE;MONO</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|x86'">
+ <OutputPath>bin\x86\Mono\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="GSF.Communication">
<HintPath>..\..\..\Dependencies\GSF\GSF.Communication.dll</HintPath>
@@ -85,6 +85,24 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
+ <OutputPath>..\..\..\..\Build\Output\Mono\Applications\openHistorian\</OutputPath>
+ <DefineConstants>TRACE;MONO</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|x86'">
+ <OutputPath>bin\x86\Mono\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="GSF.Communication">
<HintPath>..\..\..\Dependencies\GSF\GSF.Communication.dll</HintPath>
@@ -141,7 +159,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
- <CallTarget Targets="SignBuild"/>
+ <CallTarget Targets="SignBuild" />
</Target>
<Target Name="SignBuild" Condition="'$(SIGNTOOL)' != ''">
<Exec Command="$(SIGNTOOL) $(TargetPath)" />
Oops, something went wrong.

0 comments on commit 17aacf4

Please sign in to comment.