public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Hao Wu <hao.a.wu@intel.com>, Andrew Fish <afish@apple.com>
Subject: [PATCH v2 7/9] EmulatorPkg/Win: Add VS2017 project file
Date: Thu, 30 Aug 2018 10:02:11 +0800	[thread overview]
Message-ID: <20180830020213.148968-8-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20180830020213.148968-1-ruiyu.ni@intel.com>

Developer can build the Win Host in VS2017 and launch to debug it.
Platform 'x64' is to build 64bit EmulatorWin.
Platform 'Win32' is to build 32bit EmulatorWin.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Andrew Fish <afish@apple.com>
---
 EmulatorPkg/Win/VS2017/BuildVS.bat         |   3 +
 EmulatorPkg/Win/VS2017/Win.sln             |  25 ++++++
 EmulatorPkg/Win/VS2017/Win.vcxproj         | 120 +++++++++++++++++++++++++++++
 EmulatorPkg/Win/VS2017/Win.vcxproj.filters |  50 ++++++++++++
 EmulatorPkg/Win/VS2017/Win.vcxproj.user    |  13 ++++
 5 files changed, 211 insertions(+)
 create mode 100644 EmulatorPkg/Win/VS2017/BuildVS.bat
 create mode 100644 EmulatorPkg/Win/VS2017/Win.sln
 create mode 100644 EmulatorPkg/Win/VS2017/Win.vcxproj
 create mode 100644 EmulatorPkg/Win/VS2017/Win.vcxproj.filters
 create mode 100644 EmulatorPkg/Win/VS2017/Win.vcxproj.user

diff --git a/EmulatorPkg/Win/VS2017/BuildVS.bat b/EmulatorPkg/Win/VS2017/BuildVS.bat
new file mode 100644
index 0000000000..83aebc77dc
--- /dev/null
+++ b/EmulatorPkg/Win/VS2017/BuildVS.bat
@@ -0,0 +1,3 @@
+cd ../../../
+@call edksetup.bat
+build -p EmulatorPkg\EmulatorPkg.dsc -t VS2017 -D WIN_SEC_BUILD %*
diff --git a/EmulatorPkg/Win/VS2017/Win.sln b/EmulatorPkg/Win/VS2017/Win.sln
new file mode 100644
index 0000000000..397c5d9b8b
--- /dev/null
+++ b/EmulatorPkg/Win/VS2017/Win.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28010.2003
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Win", "Win.vcxproj", "{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Debug|x64.ActiveCfg = Debug|x64
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Debug|x64.Build.0 = Debug|x64
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Debug|x86.ActiveCfg = Debug|Win32
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Debug|x86.Build.0 = Debug|Win32
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Release|x64.ActiveCfg = Release|x64
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Release|x64.Build.0 = Release|x64
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Release|x86.ActiveCfg = Release|Win32
+		{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}.Release|x86.Build.0 = Release|Win32
+	EndGlobalSection
+EndGlobal
diff --git a/EmulatorPkg/Win/VS2017/Win.vcxproj b/EmulatorPkg/Win/VS2017/Win.vcxproj
new file mode 100644
index 0000000000..0f574a8e7f
--- /dev/null
+++ b/EmulatorPkg/Win/VS2017/Win.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <VCProjectVersion>15.0</VCProjectVersion>
+    <ProjectGuid>{B4E1783F-FD72-4214-B0F7-69271BAD5DDF}</ProjectGuid>
+    <Keyword>MakeFileProj</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="Shared">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <NMakeBuildCommandLine>BuildVS.bat -a IA32</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>BuildVS.bat -a IA32 all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>BuildVS.bat -a IA32 clean</NMakeCleanCommandLine>
+    <OutDir>..\..\..\Build\EmulatorIA32\DEBUG_VS2017\</OutDir>
+    <IntDir>..\..\..\Build\EmulatorIA32\DEBUG_VS2017\</IntDir>
+    <IncludePath>..\..\..\MdePkg\Include;..\..\..\MdePkg\Include\Ia32;..\..\..\MdeModulePkg\Include;..\..\..\EmulatorPkg\Include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <NMakeBuildCommandLine>BuildVS.bat -a IA32 -b RELEASE</NMakeBuildCommandLine>
+    <NMakePreprocessorDefinitions>
+    </NMakePreprocessorDefinitions>
+    <NMakeReBuildCommandLine>BuildVS.bat -a IA32 -b RELEASE all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>BuildVS.bat -a IA32 -b RELEASE clean</NMakeCleanCommandLine>
+    <OutDir>..\..\..\Build\EmulatorIA32\DEBUG_VS2017\</OutDir>
+    <IntDir>..\..\..\Build\EmulatorIA32\DEBUG_VS2017\</IntDir>
+    <IncludePath>..\..\..\MdePkg\Include;..\..\..\MdePkg\Include\Ia32;..\..\..\MdeModulePkg\Include;..\..\..\EmulatorPkg\Include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <NMakeBuildCommandLine>BuildVS.bat -a X64</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>BuildVS.bat -a X64 all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>BuildVS.bat -a X64 clean</NMakeCleanCommandLine>
+    <OutDir>..\..\..\Build\EmulatorX64\DEBUG_VS2017\</OutDir>
+    <IntDir>..\..\..\Build\EmulatorX64\DEBUG_VS2017\</IntDir>
+    <IncludePath>..\..\..\MdePkg\Include;..\..\..\MdePkg\Include\X64;..\..\..\MdeModulePkg\Include;..\..\..\EmulatorPkg\Include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <NMakeBuildCommandLine>BuildVS.bat -a X64 -b RELEASE</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine>BuildVS.bat -a X64 -b RELEASE all</NMakeReBuildCommandLine>
+    <NMakeCleanCommandLine>BuildVS.bat -a X64 -b RELEASE clean</NMakeCleanCommandLine>
+    <OutDir>..\..\Build\EmulatorX64\DEBUG_VS2017\</OutDir>
+    <IntDir>..\..\Build\EmulatorX64\DEBUG_VS2017\</IntDir>
+    <IncludePath>..\..\..\MdePkg\Include;..\..\..\MdePkg\Include\X64;..\..\..\MdeModulePkg\Include;..\..\..\EmulatorPkg\Include;$(IncludePath)</IncludePath>
+  </PropertyGroup>
+  <ItemGroup>
+    <ClCompile Include="..\Host\WinBlockIo.c" />
+    <ClCompile Include="..\Host\WinFileSystem.c" />
+    <ClCompile Include="..\Host\WinGopInput.c" />
+    <ClCompile Include="..\Host\WinGopScreen.c" />
+    <ClCompile Include="..\Host\WinHost.c" />
+    <ClCompile Include="..\Host\WinMemoryAllocationLib.c" />
+    <ClCompile Include="..\Host\WinThunk.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\Host\WinGop.h" />
+    <ClInclude Include="..\Host\WinHost.h" />
+    <ClInclude Include="..\Host\WinInclude.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\Host\WinHost.inf" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
diff --git a/EmulatorPkg/Win/VS2017/Win.vcxproj.filters b/EmulatorPkg/Win/VS2017/Win.vcxproj.filters
new file mode 100644
index 0000000000..3e176597ba
--- /dev/null
+++ b/EmulatorPkg/Win/VS2017/Win.vcxproj.filters
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="host\WinBlockIo.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinFileSystem.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinGopInput.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinGopScreen.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinHost.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinMemoryAllocationLib.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="host\WinThunk.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="host\WinGop.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="host\WinHost.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="host\WinInclude.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Host\WinHost.inf" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/EmulatorPkg/Win/VS2017/Win.vcxproj.user b/EmulatorPkg/Win/VS2017/Win.vcxproj.user
new file mode 100644
index 0000000000..7ccf83f132
--- /dev/null
+++ b/EmulatorPkg/Win/VS2017/Win.vcxproj.user
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LocalDebuggerCommand>WinHost.exe</LocalDebuggerCommand>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+    <LocalDebuggerWorkingDirectory>$(ProjectDir)..\..\..\Build\EmulatorIA32\DEBUG_VS2017\IA32\</LocalDebuggerWorkingDirectory>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <LocalDebuggerCommand>WinHost.exe</LocalDebuggerCommand>
+    <LocalDebuggerWorkingDirectory>$(ProjectDir)..\..\..\Build\EmulatorX64\DEBUG_VS2017\X64\</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
-- 
2.16.1.windows.1



  parent reply	other threads:[~2018-08-30  2:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  2:02 [PATCH v2 0/9] Quality improvement for EmulatorPkg Win Host Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 1/9] EmulatorPkg/EmuGopDxe: Fix TxtInEx.SetState SCT conformance failure Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 2/9] EmulatorPkg/EmuGopDxe: Clear screen to black in GOP.SetMode Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 3/9] EmulatorPkg/Win: Use FrameBufferBltLib for BLT operation Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 4/9] EmulatorPkg/Win: ReadKeyStrokeEx() always returns correct KeyState Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 5/9] EmulatorPkg/Win: Enable 64bit (SEC, PEI, DXE all run at 64bit) Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 6/9] EmulatorPkg/AutoScanPei: Report the correct CPU address size Ruiyu Ni
2018-08-30  2:02 ` Ruiyu Ni [this message]
2018-08-30  2:02 ` [PATCH v2 8/9] EmulatorPkg: Use MdeModulePkg/Bds module Ruiyu Ni
2018-08-30  2:02 ` [PATCH v2 9/9] EmulatorPkg: IoThunk->Close() is called too early, may causing hang Ruiyu Ni
2018-08-30  5:22 ` [PATCH v2 0/9] Quality improvement for EmulatorPkg Win Host Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180830020213.148968-8-ruiyu.ni@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox