]> granicus.if.org Git - nethack/commitdiff
Improvements to Visual Studio 2015 build.
authorBart House <bhouse@ntdev.microsoft.com>
Thu, 31 Aug 2017 02:30:52 +0000 (19:30 -0700)
committerPasi Kallinen <paxed@alt.org>
Fri, 1 Sep 2017 09:14:04 +0000 (12:14 +0300)
sys/winnt/Install.nt
win/win32/.gitignore
win/win32/vs2015/NetHack.sln
win/win32/vs2015/build.bat [new file with mode: 0644]
win/win32/vs2015/nh340key.def [new file with mode: 0644]
win/win32/vs2015/nh340key.vcxproj [new file with mode: 0644]
win/win32/vs2015/nhdefkey.vcxproj
win/win32/vs2015/nhraykey.def [new file with mode: 0644]
win/win32/vs2015/nhraykey.vcxproj [new file with mode: 0644]
win/win32/vs2015/notes.txt

index c6e5643b770f5423ac00d8f3f0feae5f3a9a7f0f..12484b05b27d3f315b56aad8b8b4adb483822e60 100644 (file)
@@ -68,6 +68,10 @@ From within the IDE:
        2. from build menu, select build solution.
        3. type F5 to start debugging.
 
+You can build all the projects for all platforms and configurations
+using a Visual Studio MSBuild command prompt.  Open the MSBuild command
+prompt, change directory to win\win32\vs2015 and run "build.bat".
+
 /-----------------------------------\
 | FIRST STEP - MOVING THINGS AROUND |
 \-----------------------------------/
index 670e92b59800ca1218b03873a88447efe6e9ea3b..e4eff42d6d2449d9285c4e84f4cf698caf569a1a 100644 (file)
@@ -5,4 +5,4 @@
 record
 *.user
 *.opendb
-
+*.log
index c2cf16ff58c8acf1c96f60e7c59bc2332da42157..63617e5f01bee38ead543c47311e4c82765adbea 100755 (executable)
@@ -68,6 +68,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nhdefkey", "nhdefkey.vcxpro
                {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945}\r
        EndProjectSection\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nh340key", "nh340key.vcxproj", "{BE04E242-A1E9-4593-B95B-057F37330B76}"
+       ProjectSection(ProjectDependencies) = postProject
+               {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nhraykey", "nhraykey.vcxproj", "{2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}"
+       ProjectSection(ProjectDependencies) = postProject
+               {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945}
+       EndProjectSection
+EndProject
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -162,6 +172,22 @@ Global
                {6813477F-64B6-4B97-B230-438D0D233385}.Release|Win32.Build.0 = Release|Win32\r
                {6813477F-64B6-4B97-B230-438D0D233385}.Release|x64.ActiveCfg = Release|x64\r
                {6813477F-64B6-4B97-B230-438D0D233385}.Release|x64.Build.0 = Release|x64\r
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Debug|Win32.ActiveCfg = Debug|Win32
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Debug|Win32.Build.0 = Debug|Win32
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Debug|x64.ActiveCfg = Debug|x64
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Debug|x64.Build.0 = Debug|x64
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Release|Win32.ActiveCfg = Release|Win32
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Release|Win32.Build.0 = Release|Win32
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Release|x64.ActiveCfg = Release|x64
+               {BE04E242-A1E9-4593-B95B-057F37330B76}.Release|x64.Build.0 = Release|x64
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Debug|Win32.ActiveCfg = Debug|Win32
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Debug|Win32.Build.0 = Debug|Win32
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Debug|x64.ActiveCfg = Debug|x64
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Debug|x64.Build.0 = Debug|x64
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Release|Win32.ActiveCfg = Release|Win32
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Release|Win32.Build.0 = Release|Win32
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Release|x64.ActiveCfg = Release|x64
+               {2E1F4BB3-3BD7-43AD-8E64-D3B8A2F5D7B2}.Release|x64.Build.0 = Release|x64
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
diff --git a/win/win32/vs2015/build.bat b/win/win32/vs2015/build.bat
new file mode 100644 (file)
index 0000000..512b4f2
--- /dev/null
@@ -0,0 +1,4 @@
+msbuild NetHack.sln /t:Build /p:Configuration=Debug;Platform=Win32
+msbuild NetHack.sln /t:Build /p:Configuration=Debug;Platform=x64
+msbuild NetHack.sln /t:Build /p:Configuration=Release;Platform=Win32
+msbuild NetHack.sln /t:Build /p:Configuration=Release;Platform=x64
diff --git a/win/win32/vs2015/nh340key.def b/win/win32/vs2015/nh340key.def
new file mode 100644 (file)
index 0000000..f484a53
--- /dev/null
@@ -0,0 +1,8 @@
+LIBRARY nh340key
+EXPORTS
+ProcessKeystroke
+NHkbhit
+CheckInput
+SourceWhere
+SourceAuthor
+KeyHandlerName
diff --git a/win/win32/vs2015/nh340key.vcxproj b/win/win32/vs2015/nh340key.vcxproj
new file mode 100644 (file)
index 0000000..7b5c06a
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="config.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{be04e242-a1e9-4593-b95b-057f37330b76}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>nh340key</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <Import Project="default_dll.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <Import Project="dll.props" />
+  <Import Project="common.props" />
+  <Import Project="dirs.props" />
+  <Import Project="files.props" />
+  <PropertyGroup>
+    <OutDir>$(BinDir)</OutDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+       <!--
+      <ModuleDefinitionFile>nh340key.def</ModuleDefinitionFile>
+         -->
+      <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="$(SysWinntDir)nh340key.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="$(IncDir)hack.h" />
+    <ClInclude Include="$(IncDir)ntconf.h" />
+    <ClInclude Include="$(IncDir)wintty.h" />
+    <ClInclude Include="$(SysWinntDir)win32api.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project>
\ No newline at end of file
index f77c26ad33a04de2b948d3b72585bd0d6f5bd669..3b0c0f675e40da10a5991b0ae8b1d33ca8acbaef 100755 (executable)
       <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>\r
     <Link>\r
+       <!--
       <ModuleDefinitionFile>nhdefkey.def</ModuleDefinitionFile>
+         -->
       <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
     </Link>\r
   </ItemDefinitionGroup>\r
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <Link>
+      <ModuleDefinitionFile>nhdefkey.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup>\r
     <ClCompile Include="$(SysWinntDir)nhdefkey.c" />
   </ItemGroup>\r
diff --git a/win/win32/vs2015/nhraykey.def b/win/win32/vs2015/nhraykey.def
new file mode 100644 (file)
index 0000000..5432a1a
--- /dev/null
@@ -0,0 +1,8 @@
+LIBRARY nhraykey
+EXPORTS
+ProcessKeystroke
+NHkbhit
+CheckInput
+SourceWhere
+SourceAuthor
+KeyHandlerName
diff --git a/win/win32/vs2015/nhraykey.vcxproj b/win/win32/vs2015/nhraykey.vcxproj
new file mode 100644 (file)
index 0000000..f2e7890
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="config.props" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2e1f4bb3-3bd7-43ad-8e64-d3b8a2f5d7b2}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>nhraykey</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <Import Project="default_dll.props" />
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <Import Project="dll.props" />
+  <Import Project="common.props" />
+  <Import Project="dirs.props" />
+  <Import Project="files.props" />
+  <PropertyGroup>
+    <OutDir>$(BinDir)</OutDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+    <ClCompile>
+      <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+       <!--
+      <ModuleDefinitionFile>nhraykey.def</ModuleDefinitionFile>
+         -->
+      <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="$(SysWinntDir)nhraykey.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="$(IncDir)hack.h" />
+    <ClInclude Include="$(IncDir)ntconf.h" />
+    <ClInclude Include="$(IncDir)wintty.h" />
+    <ClInclude Include="$(SysWinntDir)win32api.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project>
\ No newline at end of file
index cdcba3334879ec02dc18cab01ded704d67583b32..5a7d93371f90f1ca4030679f60e518223cca126f 100644 (file)
@@ -1,12 +1,6 @@
 Changes made to vs2015 build
 
 To Do
-1. Build other key handler DLLs.
-2. Ensure Release build does not have unexpected files after clean build.
-
-Changes
-1. Removed the use of /FS.
-2. Allow multi-processor compilation.
 
 Questions