-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detect platform target (x86, x64) automatically
- Loading branch information
1 parent
8390ff4
commit 3d2b99c
Showing
14 changed files
with
106 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
{ | ||
public enum ProcessorArchitectureSetting | ||
{ | ||
AutoDetect, | ||
UseSystem, | ||
X86, | ||
X64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Deveroom.VisualStudio/Connectors/OutProcSpecFlowConnectorFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Linq; | ||
using Deveroom.VisualStudio.Configuration; | ||
using Deveroom.VisualStudio.ProjectSystem; | ||
using Deveroom.VisualStudio.ProjectSystem.Configuration; | ||
using Deveroom.VisualStudio.ProjectSystem.Settings; | ||
|
||
namespace Deveroom.VisualStudio.Connectors | ||
{ | ||
public static class OutProcSpecFlowConnectorFactory | ||
{ | ||
public static OutProcSpecFlowConnector Create(IProjectScope projectScope) | ||
{ | ||
var ideScope = projectScope.IdeScope; | ||
var projectSettings = projectScope.GetProjectSettings(); | ||
var deveroomConfiguration = projectScope.GetDeveroomConfiguration(); | ||
var processorArchitecture = GetProcessorArchitecture(deveroomConfiguration, projectSettings); | ||
return new OutProcSpecFlowConnector( | ||
deveroomConfiguration, | ||
ideScope.Logger, | ||
projectSettings.TargetFrameworkMoniker, | ||
projectScope.IdeScope.GetExtensionFolder(), | ||
processorArchitecture); | ||
} | ||
|
||
private static ProcessorArchitectureSetting GetProcessorArchitecture(DeveroomConfiguration deveroomConfiguration, ProjectSettings projectSettings) | ||
{ | ||
if (deveroomConfiguration.ProcessorArchitecture != ProcessorArchitectureSetting.AutoDetect) | ||
return deveroomConfiguration.ProcessorArchitecture; | ||
if (projectSettings.PlatformTarget == ProjectPlatformTarget.x86) | ||
return ProcessorArchitectureSetting.X86; | ||
if (projectSettings.PlatformTarget == ProjectPlatformTarget.x64) | ||
return ProcessorArchitectureSetting.X64; | ||
return ProcessorArchitectureSetting.UseSystem; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Deveroom.VisualStudio/ProjectSystem/Settings/ProjectPlatformTarget.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Deveroom.VisualStudio.ProjectSystem.Settings | ||
{ | ||
public enum ProjectPlatformTarget | ||
{ | ||
Unknown, | ||
AnyCpu, | ||
x86, | ||
x64 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters