Skip to content

Commit 05bf7a7

Browse files
author
ohumeniuk
committed
eform angullar front end: part 1
1 parent 75e5476 commit 05bf7a7

File tree

424 files changed

+111013
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+111013
-259
lines changed

.gitignore

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,48 @@
1-
2-
eFormAPI/packages/
3-
4-
eFormAPI/eFormAPI/bin/
5-
6-
eFormAPI/eFormAPI/obj/
7-
8-
eFormAPI/\.vs/
9-
10-
eFormAPI/eFormApi\.Core/obj/Debug/
11-
12-
eFormAPI/eFromAPI\.Common/obj/Debug/
13-
14-
eFormAPI/eFormApi\.Core/bin/Debug/
15-
16-
eFormAPI/eFormAPI/logs/2017-04-27-full\.log
17-
18-
eFormAPI/eFromAPI\.Common/bin/Debug/
19-
20-
eFormAPI/eFromAPI\.Common/obj/
21-
22-
eFormAPI/eFormAPI/logs/
23-
24-
eFormAPI/eFormAPI\.sln\.DotSettings\.user
25-
26-
eFormAPI/eFormAPI/output/dataFolder/
27-
eform-client/package-lock.json
28-
.idea
29-
eFormAPI/eFromAPI.Common/bin/Release/*
30-
eFormAPI/eFormAPI/Properties/PublishProfiles/
31-
32-
eFormAPI/\.idea/
33-
34-
eFormAPI/eFormAPI\.Common/obj/Debug/
35-
36-
eFormAPI/eFormAPI\.Common/bin/Debug/
37-
38-
eform-client/package-lock\.json
1+
2+
eFormAPI/packages/
3+
4+
eFormAPI/eFormAPI/bin/
5+
6+
eFormAPI/eFormAPI/obj/
7+
8+
eFormAPI/\.vs/
9+
10+
eFormAPI/eFormApi\.Core/obj/Debug/
11+
12+
eFormAPI/eFromAPI\.Common/obj/Debug/
13+
14+
eFormAPI/eFormApi\.Core/bin/Debug/
15+
16+
eFormAPI/eFormAPI/logs/2017-04-27-full\.log
17+
18+
eFormAPI/eFromAPI\.Common/bin/Debug/
19+
20+
eFormAPI/eFromAPI\.Common/obj/
21+
22+
eFormAPI/eFormAPI/logs/
23+
24+
eFormAPI/eFormAPI\.sln\.DotSettings\.user
25+
26+
eFormAPI/eFormAPI/output/dataFolder/
27+
eform-client/package-lock.json
28+
.idea
29+
eFormAPI/eFromAPI.Common/bin/Release/*
30+
eFormAPI/eFormAPI/Properties/PublishProfiles/
31+
32+
eFormAPI/\.idea/
33+
34+
eFormAPI/eFormAPI\.Common/obj/Debug/
35+
36+
eFormAPI/eFormAPI\.Common/bin/Debug/
37+
38+
eform-client/package-lock\.json
39+
eFormAPI/AllowMultipleVersions/obj/
40+
eFormAPI/AlowMultipleVersionsBundle/bin/
41+
eFormAPI/AlowMultipleVersionsBundle/obj/
42+
eFormAPI/Bundle/bin/
43+
eFormAPI/Bundle/obj/
44+
eFormAPI/CustomActions/obj/
45+
eFormAPI/eFormAPI.Common/obj/
46+
eFormAPI/eFormAPI.Common/bin/
47+
eFormAPI/MainInstaller/obj/
48+
eFormAPI/MainInstaller/bin/
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{2B167169-F122-4F1F-9881-0DC8C07585B8}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>AllowMultipleVersions</RootNamespace>
11+
<AssemblyName>AllowMultipleVersions</AssemblyName>
12+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>..\Installer\BuildedCustomActions\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>..\Installer\BuildedCustomActions\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
37+
<SpecificVersion>False</SpecificVersion>
38+
<HintPath>..\wix\3.11\Microsoft.Deployment.WindowsInstaller.dll</HintPath>
39+
</Reference>
40+
<Reference Include="System" />
41+
<Reference Include="System.Core" />
42+
<Reference Include="System.Xml.Linq" />
43+
<Reference Include="System.Data.DataSetExtensions" />
44+
<Reference Include="Microsoft.CSharp" />
45+
<Reference Include="System.Data" />
46+
<Reference Include="System.Net.Http" />
47+
<Reference Include="System.Xml" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<Compile Include="Program.cs" />
51+
<Compile Include="Properties\AssemblyInfo.cs" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<None Include="App.config" />
55+
</ItemGroup>
56+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
58+
Other similar extension points exist, see Microsoft.Common.targets.
59+
<Target Name="BeforeBuild">
60+
</Target>
61+
<Target Name="AfterBuild">
62+
</Target>
63+
-->
64+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5+
</startup>
6+
</configuration>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Linq;
3+
using Microsoft.Deployment.WindowsInstaller;
4+
5+
namespace AllowMultipleVersions
6+
{
7+
class Program
8+
{
9+
static int Main(string[] args)
10+
{
11+
try
12+
{
13+
using (var database = new Database(args.First(), DatabaseOpenMode.Direct))
14+
{
15+
database.Execute("DELETE FROM InstallExecuteSequence WHERE Action ='RegisterProduct'");
16+
database.Commit();
17+
}
18+
return 0;
19+
}
20+
catch (Exception ex)
21+
{
22+
Console.WriteLine("Error occured during operation");
23+
Console.WriteLine(ex.Message);
24+
return -1;
25+
}
26+
}
27+
}
28+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("AllowMultipleVersions")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("AllowMultipleVersions")]
13+
[assembly: AssemblyCopyright("Copyright © 2017")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("2b167169-f122-4f1f-9881-0dc8c07585b8")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{FF3054DF-B9E9-49A9-9BCE-384C2E657262}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>AlowMultipleVersionsBundle</RootNamespace>
10+
<AssemblyName>Eform Angular Frontend</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<PropertyGroup>
35+
<ApplicationIcon>installer.ico</ApplicationIcon>
36+
</PropertyGroup>
37+
<ItemGroup>
38+
<Reference Include="System" />
39+
<Reference Include="System.Core" />
40+
<Reference Include="System.Xml.Linq" />
41+
<Reference Include="System.Data.DataSetExtensions" />
42+
<Reference Include="Microsoft.CSharp" />
43+
<Reference Include="System.Data" />
44+
<Reference Include="System.Net.Http" />
45+
<Reference Include="System.Xml" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Compile Include="Program.cs" />
49+
<Compile Include="Properties\AssemblyInfo.cs" />
50+
<Compile Include="Resources.Designer.cs">
51+
<AutoGen>True</AutoGen>
52+
<DesignTime>True</DesignTime>
53+
<DependentUpon>Resources.resx</DependentUpon>
54+
</Compile>
55+
</ItemGroup>
56+
<ItemGroup>
57+
<None Include="App.config" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<EmbeddedResource Include="Resources.resx">
61+
<Generator>ResXFileCodeGenerator</Generator>
62+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
63+
</EmbeddedResource>
64+
</ItemGroup>
65+
<ItemGroup>
66+
<None Include="Resources\Eform Angular Frontend.exe" />
67+
</ItemGroup>
68+
<ItemGroup>
69+
<Content Include="installer.ico" />
70+
</ItemGroup>
71+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
72+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Security;
6+
using Microsoft.Win32;
7+
8+
namespace AlowMultipleVersionsBundle
9+
{
10+
class Program
11+
{
12+
static void Main(string[] args)
13+
{
14+
try
15+
{
16+
var unistall =
17+
Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall",
18+
true);
19+
20+
var product = unistall.GetSubKeyNames().FirstOrDefault(t =>
21+
unistall.OpenSubKey(t).GetValue("BundleProviderKey")?.ToString() ==
22+
"6EEA199E-0A6C-416A-8969-A48ACB0B1130");
23+
if (product != null)
24+
unistall.OpenSubKey(product, true).SetValue("Installed", 0);
25+
26+
SetupIIS();
27+
28+
string path = Path.Combine(Path.GetTempPath(), "Eform Angular Frontend.exe");
29+
File.WriteAllBytes(path, Resources.Eform_Angular_Frontend);
30+
Process.Start(path);
31+
}
32+
catch (SecurityException e)
33+
{
34+
Console.WriteLine("Please run installer package as administrator");
35+
}
36+
37+
}
38+
39+
static void SetupIIS()
40+
{
41+
var featureNames = new[]
42+
{
43+
"IIS-ApplicationDevelopment",
44+
"IIS-CommonHttpFeatures",
45+
"IIS-DefaultDocument",
46+
"IIS-ISAPIExtensions",
47+
"IIS-ISAPIFilter",
48+
"IIS-ManagementConsole",
49+
"IIS-NetFxExtensibility",
50+
"IIS-RequestFiltering",
51+
"IIS-Security",
52+
"IIS-StaticContent",
53+
"IIS-WebServer",
54+
"IIS-WebServerRole",
55+
};
56+
bool is64bit = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"));
57+
var dism = is64bit ? @"C:\WINDOWS\SYSNATIVE\DISM.EXE" : "dism";
58+
59+
RunProcess(
60+
dism,
61+
$"/NoRestart /Online /Enable-Feature {string.Join(" ", featureNames.Select(name => $"/FeatureName:{name}"))}");
62+
}
63+
64+
static void RunProcess(string fileName, string arguments)
65+
{
66+
using (var process = Process.Start(new ProcessStartInfo
67+
{
68+
FileName = fileName,
69+
Arguments = arguments,
70+
UseShellExecute = false
71+
}))
72+
{
73+
process.WaitForExit();
74+
}
75+
}
76+
}
77+
}

0 commit comments

Comments
 (0)