Commit Graph
2905 Commits
Author SHA1 Message Date
nhmall 2b0c083894 nmake trailing slash fix 2025-11-18 19:04:07 -05:00
nhmall df54c155b2 yet another Visual Studio follow-up
yet another path correction
2025-11-18 18:56:35 -05:00
nhmall 9221247e24 another Visual Studio follow-up
path fix
2025-11-18 18:54:14 -05:00
nhmall 6de1f39c38 follow-up Visual Studio package fix 2025-11-18 18:27:45 -05:00
nhmall a9d11db853 visual studio project tweaks 2025-11-18 13:44:55 -05:00
nhmall b1cffe11f9 Cross-compiling on Windows 11 with Visual Studio
Cross-compiling NetHack with Visual Studio from an x64 platform to an ARM64
target presents some new build challenges.

In the current nethack.sln solution, the build attempts to execute the
several just-built tools during the build of various subprojects.

For example, when cross-compiling on a typical Windows 11 x64 machine
to build a target ARM64 Windows 11 package, the build process tries to
run the following just-built target tools:

(under a Debug build)
    "$(ToolsDir)\Debug\ARM64\uudecode.exe"
    "$(ToolsDir)\Debug\ARM64\makedefs.exe"
    "$(ToolsDir)\Debug\ARM64\tilemap.exe"
    "$(ToolsDir)\Debug\ARM64\tile2bmp.exe"
    "$(ToolsDir)\Debug\ARM64\dlb.exe"

(under a Release build)
    "$(ToolsDir)\Release\ARM64\uudecode.exe"
    "$(ToolsDir)\Release\ARM64\makedefs.exe"
    "$(ToolsDir)\Release\ARM64\tilemap.exe"
    "$(ToolsDir)\Release\ARM64\tile2bmp.exe"
    "$(ToolsDir)\Release\ARM64\dlb.exe"

Those fail to execute successfully on Intel x64 (or x86) since they
are actually ARM64 executables, and the build attempts to execute
them on the host Intel x64 hardware.

The situation is a little different if the cross-compile is carried out
on a Windows 11 ARM64 machine (such as SnapDragon).

On an ARM64 machine, the cross-compile to build a target Intel x64
Windows 11 package, tries to execute the following:

(under a Debug build)
    "$(ToolsDir)\Debug\x64\uudecode.exe"
    "$(ToolsDir)\Debug\x64\makedefs.exe"
    "$(ToolsDir)\Debug\x64\tilemap.exe"
    "$(ToolsDir)\Debug\x64\tile2bmp.exe"
    "$(ToolsDir)\Debug\x64\dlb.exe"

(under a Release build)
    "$(ToolsDir)\Release\x64\uudecode.exe"
    "$(ToolsDir)\Release\x64\makedefs.exe"
    "$(ToolsDir)\Release\x64\tilemap.exe"
    "$(ToolsDir)\Release\x64\tile2bmp.exe"
    "$(ToolsDir)\Release\x64\dlb.exe"

Those actual do succeed in executing on ARM64, because of the
"prism emulation" that is available on Windows 11 ARM64 operating
systems to allow x64 and x86 executables to run.

The following change adds some detection to build environment, leading
to the definition of a "HostTools" macro that leads to the native host
tools for those steps.

There is a catch:

It means that the native build of the interim tools for Windows 11 must
be executed prior to attempting a cross-compile build to a non-native
target. That ensures that the native x64 interim uudecode, makedefs,
tilemap, tile2bmp and dlb tools are available on the disk for use by
a subsequent cross-compile.

This change consistently switches to the use of the host-native
interim tools for uudecode, makedefs, tilemap, tile2bmp and dlb tools.

Technically, this change would not be strictly necessary on an
ARM64-hosted build that was targeting x64 or x86, because of the
available prism-emulation that allows ARM64, x64, and x86 images to
execute, but this maintains consistency of the build process on
either platform. It is also likely that the native host versions execute
more quickly than versions requiring the prism emulation, although
that isn't really a concern for a NetHack build.

The use of native host uudecode, makedefs, tilemap, tile2bmp and
dlb tools is done with the Unix-hosted cross-compiles to other
target platforms as well (on Linux or macOS).
2025-11-18 10:10:32 -05:00
nhmall a6801b004c use lowercase platform name in zip file name 2025-11-17 21:02:45 -05:00
nhmall 8f97b824d5 visual studio build update
address warning disparity between ARM64 and x64
2025-11-17 20:44:08 -05:00
nhmall 7dbc0ac6b8 visual studio Makefile variable 2025-11-16 15:48:05 -05:00
nhmall 043b867da7 yet-another follow-up for NetHackW.vcxproj 2025-11-16 15:31:41 -05:00
nhmall f790458587 follow-up bit for NetHackW.vcxproj
Remove a resource compiler architecture conditional, since it does not vary between
the different architectures. This is simpler.
2025-11-16 15:26:49 -05:00
nhmall 4f59f24485 some vcxproj fixes 2025-11-16 15:16:10 -05:00
nhmall 3885638934 update suppressed warnings in NetHack vcxproj
Also be more consistent on preprocessor #define entries between
Visual Studio builds and command line nmake Makefile builds.
2025-11-16 14:12:14 -05:00
nhmall d7e4f2e2b1 Windows build support for Windows 11 arm64 (snapdragon) 2025-11-14 21:24:24 -05:00
nhmall eb4496c575 vcxproj updates
define HAS_INTTYPES_H alongside HAS_STDINT_H in the visual studio projects
2025-11-13 09:11:49 -05:00
nhmall 2b845066fa update naming for generated Files 2025-11-12 21:14:42 -05:00
nhmall cd98047de4 update tested versions of Visual Studio 2025-11-12 2025-11-12 20:40:01 -05:00
nhmall c12344cd48 build dos in CI but skip faltering Terminus font steps 2025-11-10 12:56:49 -05:00
nhmall 2c747b079e revert some CI test changes 2025-11-10 09:19:47 -05:00
nhmall efbc0d8f8f more troubleshooting Terminus font use in CI environment 2025-11-10 08:52:06 -05:00
nhmall 157fcad161 troubleshoot Terminus font download in CI environment 2025-11-10 08:24:39 -05:00
nhmall 4dfdeb8e92 follow-up in seldom-used places 2025-11-08 14:53:50 -05:00
Michael Allison 58c7d2fb3e macOS QT6 doc tidbit 2025-11-05 13:20:45 -05:00
Hector Denis 4e29db079b Fix QTCXXFLAGS and WINLIB when compiling with WANT_WINT_QT6.
The previous code made incorrect assumptions about Qt6's file hierarchy. Reuse automatic configuration (with pkg-config) for Qt5, and replace '5' by '6'.
Also fix a typo in multiw-2.370.
2025-11-05 18:20:55 +01:00
nhmall efe0b1197d update tested versions of Visual Studio 2025-10-27 2025-10-27 11:55:20 -04:00
nhmall b72d4af837 correct a few minor typos in sys 2025-10-25 10:14:28 -04:00
nhmall 3c8628f549 correct a few typos 2025-10-24 12:27:05 -04:00
nhmall f636749ea2 suppress dozens of new compiler warnings with clang-21
Turn off default -Wdeprecated-octal-literals warning with clang-21

One example of many:

In file included from objects.c:22:
../include/objects.h:137:1: warning: octal literals without a '0o' prefix are deprecated
      [-Wdeprecated-octal-literals]
  137 | PROJECTILE("arrow", NoDes,
      | ^
../include/objects.h:119:48: note: expanded from macro 'PROJECTILE'
  119 |            BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
      |                                                ^
../include/objclass.h:79:18: note: expanded from macro 'PIERCE'
   79 | #define PIERCE   01 /* pointed weapon punctures target */
      |                  ^
In file included from objects.c:22:
../include/objects.h:140:1: warning: octal literals without a '0o' prefix are deprecated
      [-Wdeprecated-octal-literals]
  140 | PROJECTILE("elven arrow", "runed arrow",
      | ^
../include/objects.h:119:48: note: expanded from macro 'PROJECTILE'
  119 |            BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
      |                                                ^
../include/objclass.h:79:18: note: expanded from macro 'PIERCE'
   79 | #define PIERCE   01 /* pointed weapon punctures target */
      |                  ^
In file included from objects.c:22:
../include/objects.h:143:1: warning: octal literals without a '0o' prefix are deprecated
      [-Wdeprecated-octal-literals]
  143 | PROJECTILE("orcish arrow", "crude arrow",
      | ^
../include/objects.h:119:48: note: expanded from macro 'PROJECTILE'
  119 |            BITS(kn, 1, 1, 0, 0, 1, 0, 0, 0, 0, PIERCE, sub, metal), \
      |                                                ^
../include/objclass.h:79:18: note: expanded from macro 'PIERCE'
   79 | #define PIERCE   01 /* pointed weapon punctures target */
      |                  ^
2025-10-22 12:52:10 -04:00
nhmall 9b375ea488 revert a couple of unintended vcxproj changes 2025-10-05 10:18:24 -04:00
nhmall ea4ffba1ce another visual studio follow-up 2025-09-26 09:13:38 -04:00
nhmall 976aca6530 follow-up bit for visual studio 2025-09-26 08:59:49 -04:00
nhmall 32873218cd update tested versions of Visual Studio 2025-09-26 2025-09-26 08:57:31 -04:00
nhmall 9b7b2421ac update tested versions of Visual Studio 2025-09-17 2025-09-17 12:39:32 -04:00
nhmall 349fbe93b1 less verbose compiler command lines during build
If using hints file sys/unix/hints/linux.370 or sys/unix/hints/macOS.370
allow the majority of the boilerplate compile switches to reside in a
compiler response file, instead of on the command line.

Include one of the following on your make command line:

make response=1
  or
make resp=1

It can be combined with other make command line options. See
sys/unix/README-hints for further information about those.

The response files that it uses are:
    CC   (clang or gcc)    src/nethack_cc.rsp
    CXx  (clang++ or g++)  src/nethack_cxx.rsp

Note: I think the reduced clutter should actually become the default,
and the override should be noresponse=1 to NOT use it, but I'm
not sure how others feel, so for now, it requires
    make resp=1
Feedback on whether that should become the default or not
is welcome.

Tested on Linux with gcc-15 and on Linux with clang-20.

I haven't had a chance to test it on macOS yet.
2025-09-07 12:50:54 -04:00
nhmall f110db02fc updates for build on OpenVMS 2025-08-28 11:43:47 -04:00
nhmall ab26a2e851 strip some outdated info from sys/windows/porthelp 2025-08-19 20:37:43 -04:00
nhmall 16c723f0be update tested versions of Visual Studio 2025-08-19 2025-08-19 13:21:56 -04:00
nhmall 6c3e70ad77 remove stray tabs from *.c files and config.h 2025-08-19 08:35:39 -04:00
nhmall 16716c2d3a update tested versions of Visual Studio 2025-08-16 2025-08-16 12:38:58 -04:00
nhmall 70510f1dbc update visual studio sys/windows/vs/cpp.hint 2025-08-06 21:27:54 -04:00
nhmall 5fe7c4d12e update tested versions of Visual Studio 2025-08-06 2025-08-06 21:27:25 -04:00
Michael Allison b0076decae more Xcode follow-up 2025-08-06 14:25:50 -04:00
Michael Allison 2b399d1739 more follow-up (for Xcode) 2025-08-06 14:12:10 -04:00
nhmall 80e11c287d more follow-up (for visual studio) 2025-08-06 13:55:41 -04:00
nhmall 75a2a61653 some Makefile follow-up 2025-08-06 13:51:22 -04:00
nhmall 36dcb92288 MSYS2 package fix: include lua-5.4.6.dll in zip 2025-07-19 18:22:35 -04:00
nhmall f58b7a8269 update tested versions of Visual Studio 2025-07-16 2025-07-16 21:04:04 -04:00
nhkeni 65774372e6 Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7 2025-07-11 15:44:43 -04:00
nhkeni 03415bc595 fix typo 2025-07-11 15:44:23 -04:00
nhmall 6c22e7af45 attempt to ensure the correct curses.h is used on Linux
OpenSUSE Tumbleweed ncurses 6.5 requires the one in
/usr/include/ncursesw/curses.h, if ncursesw is being used.

Otherwise, several needed function prototypes are not there.

Fixes #1427
2025-07-10 22:44:56 -04:00