Skip to content
This repository was archived by the owner on Jan 8, 2022. It is now read-only.

Commit 5870676

Browse files
committed
Terrible
1 parent b579e32 commit 5870676

File tree

130 files changed

+3521
-172
lines changed

Some content is hidden

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

130 files changed

+3521
-172
lines changed
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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.Linq;
3+
4+
namespace Deployment.Console
5+
{
6+
public class ConsoleDisplayUpdater : IDisposable
7+
{
8+
private readonly IDisposable progressUpdater;
9+
10+
public ConsoleDisplayUpdater(IObservable<double> progress)
11+
{
12+
progressUpdater = progress.Subscribe(DisplayProgress);
13+
}
14+
15+
public int Width { get; set; } = 50;
16+
17+
private void DisplayProgress(double progress)
18+
{
19+
if (double.IsNaN(progress))
20+
{
21+
return;
22+
}
23+
24+
var progressBarLenght = progress * Width;
25+
System.Console.CursorLeft = 0;
26+
System.Console.Write("[");
27+
var bar = new string(Enumerable.Range(1, (int) progressBarLenght).Select(_ => '=').ToArray());
28+
29+
System.Console.Write(bar);
30+
31+
var label = $@"{progress:P0}";
32+
System.Console.CursorLeft = (Width -label.Length) / 2;
33+
System.Console.Write(label);
34+
System.Console.CursorLeft = Width;
35+
System.Console.Write("]");
36+
}
37+
38+
public void Dispose()
39+
{
40+
progressUpdater?.Dispose();
41+
}
42+
}
43+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Threading.Tasks;
2+
using Deployer.Tasks;
3+
4+
namespace Deployment.Console
5+
{
6+
internal class ConsoleMarkdownDisplayer : IMarkdownDisplayer
7+
{
8+
public Task Display(string title, string message)
9+
{
10+
System.Console.WriteLine(message);
11+
return Task.CompletedTask;
12+
}
13+
}
14+
}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
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>{B29156BB-B183-4B55-BB04-7B9B926EC926}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<RootNamespace>Deployment.Console</RootNamespace>
10+
<AssemblyName>WoaDeployer</AssemblyName>
11+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
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>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<LangVersion>7.1</LangVersion>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
<LangVersion>7.1</LangVersion>
36+
</PropertyGroup>
37+
<PropertyGroup>
38+
<ApplicationManifest>app.manifest</ApplicationManifest>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="System" />
42+
<Reference Include="System.Core" />
43+
<Reference Include="System.Xml.Linq" />
44+
<Reference Include="System.Data.DataSetExtensions" />
45+
<Reference Include="Microsoft.CSharp" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Net.Http" />
48+
<Reference Include="System.Xml" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<Compile Include="..\Deployer.Lumia.NetFx\Properties\SharedAssemblyInfo.cs">
52+
<Link>Properties\SharedAssemblyInfo.cs</Link>
53+
</Compile>
54+
<Compile Include="ConsoleDisplayUpdater.cs" />
55+
<Compile Include="ConsoleMarkdownDisplayer.cs" />
56+
<Compile Include="Options\DisableDualBootCmdOptions.cs" />
57+
<Compile Include="Options\EnableDualBootCmdOptions.cs" />
58+
<Compile Include="Options\InstallGpuCmdOptions.cs" />
59+
<Compile Include="Options\NonWindowsDeploymentCmdOptions.cs" />
60+
<Compile Include="Resources.Designer.cs">
61+
<AutoGen>True</AutoGen>
62+
<DesignTime>True</DesignTime>
63+
<DependentUpon>Resources.resx</DependentUpon>
64+
</Compile>
65+
<Compile Include="Options\WindowsDeploymentCmdOptions.cs" />
66+
<Compile Include="Program.cs" />
67+
<Compile Include="Properties\AssemblyInfo.cs" />
68+
</ItemGroup>
69+
<ItemGroup>
70+
<None Include="..\Deployer.Lumia\Core\Boot\bootaa64.efi">
71+
<Link>Core\Boot\bootaa64.efi</Link>
72+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
73+
</None>
74+
<None Include="..\Deployer.Lumia\Core\Developer Menu\developermenu.efi">
75+
<Link>Core\Developer Menu\developermenu.efi</Link>
76+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
77+
</None>
78+
<None Include="..\Deployer.Lumia\Core\Developer Menu\ui\boot.ums.connected.bmpx">
79+
<Link>Core\Developer Menu\ui\boot.ums.connected.bmpx</Link>
80+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
81+
</None>
82+
<None Include="..\Deployer.Lumia\Core\Developer Menu\ui\boot.ums.disconnected.bmpx">
83+
<Link>Core\Developer Menu\ui\boot.ums.disconnected.bmpx</Link>
84+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
85+
</None>
86+
<None Include="..\Deployer.Lumia\Core\Developer Menu\ui\boot.ums.waiting.bmpx">
87+
<Link>Core\Developer Menu\ui\boot.ums.waiting.bmpx</Link>
88+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
89+
</None>
90+
<None Include="..\Deployer.Lumia\Core\Good UEFI\950 XL\UEFI.elf">
91+
<Link>Core\Good UEFI\950 XL\UEFI.elf</Link>
92+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
93+
</None>
94+
<None Include="..\Deployer.Lumia\Core\Good UEFI\950\UEFI.elf">
95+
<Link>Core\Good UEFI\950\UEFI.elf</Link>
96+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
97+
</None>
98+
<None Include="App.config" />
99+
</ItemGroup>
100+
<ItemGroup>
101+
<PackageReference Include="CommandLineParser">
102+
<Version>2.4.3</Version>
103+
</PackageReference>
104+
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies">
105+
<Version>1.1.0</Version>
106+
</PackageReference>
107+
<PackageReference Include="Serilog.Sinks.Console">
108+
<Version>3.1.1</Version>
109+
</PackageReference>
110+
<PackageReference Include="Serilog.Sinks.RollingFile">
111+
<Version>3.3.0</Version>
112+
</PackageReference>
113+
<PackageReference Include="System.Reactive">
114+
<Version>4.1.2</Version>
115+
</PackageReference>
116+
</ItemGroup>
117+
<ItemGroup>
118+
<None Include="app.manifest" />
119+
</ItemGroup>
120+
<ItemGroup>
121+
<ProjectReference Include="..\Deployer.Lumia.NetFx\Deployer.Lumia.NetFx.csproj">
122+
<Project>{2ABBF26A-2C87-4657-861E-08EC55DEAD77}</Project>
123+
<Name>Deployer.Lumia.NetFx</Name>
124+
</ProjectReference>
125+
<ProjectReference Include="..\Deployer.Lumia\Deployer.Lumia.csproj">
126+
<Project>{20501832-13f5-4673-9d86-9e7e0c562027}</Project>
127+
<Name>Deployer.Lumia</Name>
128+
</ProjectReference>
129+
<ProjectReference Include="..\Deployer.NetFx\Deployer.NetFx.csproj">
130+
<Project>{fbedaf0e-e2ed-4005-8d83-f980fa67feb2}</Project>
131+
<Name>Deployer.NetFx</Name>
132+
</ProjectReference>
133+
<ProjectReference Include="..\Deployer\Deployer.csproj">
134+
<Project>{b0709401-1148-43b4-a06c-79173393dd98}</Project>
135+
<Name>Deployer</Name>
136+
</ProjectReference>
137+
</ItemGroup>
138+
<ItemGroup>
139+
<EmbeddedResource Include="Resources.resx">
140+
<Generator>ResXFileCodeGenerator</Generator>
141+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
142+
</EmbeddedResource>
143+
</ItemGroup>
144+
<ItemGroup>
145+
<None Include="..\Deployer.Lumia\Scripts\950.txt">
146+
<Link>Scripts\950.txt</Link>
147+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
148+
</None>
149+
<None Include="..\Deployer.Lumia\Scripts\950xl.txt">
150+
<Link>Scripts\950xl.txt</Link>
151+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
152+
</None>
153+
<None Include="..\Deployer.Lumia\Scripts\update-uefi-950xl.txt">
154+
<Link>Scripts\update-uefi-950xl.txt</Link>
155+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
156+
</None>
157+
</ItemGroup>
158+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
159+
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using CommandLine;
2+
3+
namespace Deployment.Console.Options
4+
{
5+
[Verb("disable-dualboot", HelpText = "Disables Dual Boot")]
6+
public class DisableDualBootCmdOptions
7+
{
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using CommandLine;
2+
3+
namespace Deployment.Console.Options
4+
{
5+
[Verb("enable-dualboot", HelpText = "Enabled Dual Boot")]
6+
public class EnableDualBootCmdOptions
7+
{
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using CommandLine;
2+
3+
namespace Deployment.Console.Options
4+
{
5+
[Verb("install-gpu", HelpText = "Installs the GPU drivers")]
6+
public class InstallGpuCmdOptions
7+
{
8+
}
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using CommandLine;
2+
3+
namespace Deployment.Console.Options
4+
{
5+
[Verb("execute", HelpText = "Executes a script that doesn't deploy Windows")]
6+
public class NonWindowsDeploymentCmdOptions
7+
{
8+
[Option("script", Required = true, HelpText = "Script to execute")]
9+
public string Script { get; set; }
10+
}
11+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using CommandLine;
2+
3+
namespace Deployment.Console.Options
4+
{
5+
[Verb("deploy", HelpText = "Executes a Windows deployment script")]
6+
public class WindowsDeploymentCmdOptions
7+
{
8+
[Option("wim", Required = true, HelpText = "Windows Image (.wim) to deploy")]
9+
public string WimImage { get; set; }
10+
11+
[Option("index", Default = 1, HelpText = "Index of the image to deploy")]
12+
public int Index { get; set; }
13+
14+
[Option("windows-size", Default = 18, HelpText = "Size reserved for Windows partitions in GB")]
15+
public double ReservedSizeForWindowsInGb { get; set; }
16+
17+
[Option("compact", Default = false, HelpText = "Enable Compact deployment. Slower, but saves phone disk space")]
18+
public bool UseCompact { get; set; }
19+
}
20+
}

0 commit comments

Comments
 (0)