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

Commit c3e6853

Browse files
committed
Fixed Lumia
1 parent 28ef155 commit c3e6853

File tree

7 files changed

+13
-35
lines changed

7 files changed

+13
-35
lines changed

Source/Deployer.Lumia.NetFx/ContainerConfigurator.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Deployer.Filesystem.FullFx;
88
using Deployer.FileSystem;
99
using Deployer.Lumia.NetFx.PhoneInfo;
10+
using Deployer.Raspberry;
1011
using Deployer.Services;
1112
using Deployer.Tasks;
1213
using Grace.DependencyInjection;
@@ -50,15 +51,16 @@ where type.GetTypeInfo().ImplementedInterfaces.Contains(typeof(IDeploymentTask))
5051
block.ExportInstance(taskTypes).As<IEnumerable<Type>>();
5152
block.Export<ScriptRunner>().As<IScriptRunner>();
5253
block.Export<InstanceBuilder>().As<IInstanceBuilder>();
53-
54+
block.ExportFactory((IPhone p) => new DeviceProvider { Device = p }).As<IDeviceProvider>();
55+
5456
block.Export<FileSystemOperations>().As<IFileSystemOperations>();
5557
block.Export<BcdInvokerFactory>().As<IBcdInvokerFactory>();
5658
block.Export<WindowsDeployer>().As<IWindowsDeployer>();
5759
block.Export<GitHubDownloader>().As<IGitHubDownloader>();
5860

5961
WithRealPhone(block);
6062

61-
block.ExportFactory(() => AzureDevOpsClient.Create(new Uri("https://dev.azure.com"))).As<IAzureDevOpsBuildClient>();
63+
block.ExportFactory(() => AzureDevOpsClient.Create(new Uri("https://dev.azure.com"))).As<IAzureDevOpsBuildClient>();
6264

6365
return block;
6466
}

Source/Deployer.Lumia/LumiaDisklayoutPreparer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ public LumiaDisklayoutPreparer(IWindowsOptionsProvider optionsProvider, IEnumer
2929

3030
public async Task Prepare(Disk disk)
3131
{
32+
Log.Information("Preparing partitions for Windows deployment...");
33+
3234
await phone.RemoveExistingWindowsPartitions();
3335
var options = optionsProvider.Options;
3436
await AllocateSpace(options.SizeReservedForWindows);
3537
await CreatePartitions();
38+
39+
Log.Information("Partition layout ready");
3640
}
3741

3842
private async Task AllocateSpace(ByteSize requiredSize)
File renamed without changes.

Source/Deployer/IDeviceProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace Deployer.Raspberry
1+
namespace Deployer
22
{
33
public interface IDeviceProvider
44
{

Source/Deployer/Tasks/DeployWindows.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ namespace Deployer.Tasks
66
[TaskDescription("Deploying Windows")]
77
public class DeployWindows : IDeploymentTask
88
{
9-
private readonly IDevice device;
9+
private readonly IDeviceProvider deviceProvider;
1010
private readonly IDisklayoutPreparer preparer;
1111
private readonly IWindowsDeployer windowsDeployer;
1212

13-
public DeployWindows(IDevice device, IDisklayoutPreparer preparer, IWindowsDeployer windowsDeployer)
13+
public DeployWindows(IDeviceProvider deviceProvider, IDisklayoutPreparer preparer, IWindowsDeployer windowsDeployer)
1414
{
15-
this.device = device;
15+
this.deviceProvider = deviceProvider;
1616
this.preparer = preparer;
1717
this.windowsDeployer = windowsDeployer;
1818
}
1919

2020
public async Task Execute()
2121
{
22-
await preparer.Prepare(await device.GetDeviceDisk());
22+
await preparer.Prepare(await deviceProvider.Device.GetDeviceDisk());
2323
await windowsDeployer.Deploy();
2424
}
2525
}

Source/Deployer/Tasks/DeployWindows2.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

Source/Deployer/WindowsDeployer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Threading.Tasks;
33
using Deployer.FileSystem;
4-
using Deployer.Raspberry;
54
using Deployer.Services;
65
using Serilog;
76

0 commit comments

Comments
 (0)