]> granicus.if.org Git - nethack/commitdiff
Improvements to Visual Studio 2015 build.
authorBart House <bhouse@ntdev.microsoft.com>
Fri, 1 Sep 2017 04:29:12 +0000 (21:29 -0700)
committerPasi Kallinen <paxed@alt.org>
Fri, 1 Sep 2017 09:14:10 +0000 (12:14 +0300)
win/win32/.gitignore
win/win32/nethack.rc
win/win32/nhresource.h [new file with mode: 0644]
win/win32/vs2015/NetHack.sln
win/win32/vs2015/NetHack.vcxproj
win/win32/vs2015/build.bat
win/win32/vs2015/nh340key.vcxproj
win/win32/vs2015/nhdefkey.vcxproj
win/win32/vs2015/nhraykey.vcxproj

index e4eff42d6d2449d9285c4e84f4cf698caf569a1a..3f210da5d2c94635eb420e49b81f184a4722c818 100644 (file)
@@ -6,3 +6,4 @@ record
 *.user
 *.opendb
 *.log
+*.aps
index 0877532d2f6e543b312cbed807a654ed6e46aa48..72ce4e0dfa86d00ec9de0e5e2f8cdb0fb8370b3d 100644 (file)
@@ -1,6 +1,48 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
 //
-#include "resource.h"
+#include "nhresource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+    "nhresource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+    "#include ""winres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -9,6 +51,57 @@
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDI_NETHACKW            ICON    DISCARDABLE     "NETHACK.ICO"
+IDI_ICON1               ICON                    "nethack.ico"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 3,6,1,0
+ PRODUCTVERSION 3,6,1,0
+ FILEFLAGSMASK 0x1fL
+#ifdef _DEBUG
+ FILEFLAGS 0x9L
+#else
+ FILEFLAGS 0x8L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "FileDescription", "NetHack for Windows - TTY Interface"
+            VALUE "FileVersion", "3.6.1"
+            VALUE "InternalName", "NetHack"
+            VALUE "LegalCopyright", "Copyright (C) 1985 - 2017.  By Stichting Mathematisch Centrum and M. Stephenson.  See license for details."
+            VALUE "OriginalFilename", "NetHack.exe"
+            VALUE "ProductName", "NetHack"
+            VALUE "ProductVersion", "3.6.1"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
 
 
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
diff --git a/win/win32/nhresource.h b/win/win32/nhresource.h
new file mode 100644 (file)
index 0000000..119608c
--- /dev/null
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by NetHack.rc
+//
+#define IDI_ICON1                       101
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
index 63617e5f01bee38ead543c47311e4c82765adbea..2c2e78230e2f12318932fb1abc89a5fd4cec8a0b 100755 (executable)
@@ -160,10 +160,12 @@ Global
                {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|x64.Build.0 = Release|x64\r
                {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.Build.0 = Debug|Win32\r
-               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.ActiveCfg = Debug|Win32\r
+               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.ActiveCfg = Debug|x64
+               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.Build.0 = Debug|x64
                {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.ActiveCfg = Release|Win32\r
                {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.Build.0 = Release|Win32\r
-               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.ActiveCfg = Release|Win32\r
+               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.ActiveCfg = Release|x64
+               {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.Build.0 = Release|x64
                {6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.Build.0 = Debug|Win32\r
                {6813477F-64B6-4B97-B230-438D0D233385}.Debug|x64.ActiveCfg = Debug|x64\r
index 306f74ae765d6e2fc115ef03c36d1738edeceabc..3c0ce99116b938be1a199fdda71f44c4c4ac44a3 100755 (executable)
   <Import Project="common.props" />
   <Import Project="dirs.props" />
   <Import Project="files.props" />
-
   <PropertyGroup>
     <OutDir>$(BinDir)</OutDir>
   </PropertyGroup>
-  
   <ItemDefinitionGroup>
     <ClCompile>\r
       <AdditionalOptions>/Gs /Oi- %(AdditionalOptions)</AdditionalOptions>
     <ClInclude Include="$(IncDir)wintype.h" />
     <ClInclude Include="$(IncDir)you.h" />
     <ClInclude Include="$(IncDir)youprop.h" />
+    <ClInclude Include="$(WinWin32Dir)nhresource.h" />
   </ItemGroup>\r
   <ItemGroup>
-    <ResourceCompile Include="$(WinWin32Dir)winhack.rc" />
+    <ResourceCompile Include="$(WinWin32Dir)NetHack.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="$(WinWin32Dir)nethack.ico" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <Target Name="AfterBuild">
index 512b4f22d921918aa725453dc1bd6d4bb0bc14fc..c2798cf1ba4d9727115668a1600468b44d3fb1a1 100644 (file)
@@ -1,4 +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
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=Win32
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=x64
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=Win32
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
index 7b5c06a4f598af153aa23a5f34d9e37908bcf104..8b20686628ed5fd83c36d19ee7832c9860def880 100644 (file)
       <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
-       <!--
-      <ModuleDefinitionFile>nh340key.def</ModuleDefinitionFile>
-         -->
       <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <Link>
+      <ModuleDefinitionFile>nh340key.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="$(SysWinntDir)nh340key.c" />
   </ItemGroup>
index 3b0c0f675e40da10a5991b0ae8b1d33ca8acbaef..84fdf2fd3e90dbe60941d31d8bc813db38f3f3d6 100755 (executable)
@@ -21,9 +21,6 @@
       <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>\r
     <Link>\r
-       <!--
-      <ModuleDefinitionFile>nhdefkey.def</ModuleDefinitionFile>
-         -->
       <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
     </Link>\r
   </ItemDefinitionGroup>\r
index f2e7890b647926c0c1f01a8f35803cd2966ebcbb..0017f4a4903c417b2da362c0f10fe629f0833da2 100644 (file)
       <AdditionalIncludeDirectories>$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
-       <!--
-      <ModuleDefinitionFile>nhraykey.def</ModuleDefinitionFile>
-         -->
       <ImportLibrary>$(ToolsDir)$(TargetName).lib</ImportLibrary>
     </Link>
   </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+    <Link>
+      <ModuleDefinitionFile>nhraykey.def</ModuleDefinitionFile>
+    </Link>
+  </ItemDefinitionGroup>
   <ItemGroup>
     <ClCompile Include="$(SysWinntDir)nhraykey.c" />
   </ItemGroup>