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).
Issue reported by chappg: succubi could produce "it's on the house"
(quoted verbal message) when hero is deaf. The mail daemon could
produce a variety of verbal message when hero is deaf.
The succubus/incubus one is easy to fix. The mail daemon ones are
untested and a couple haven't been given non-verbal alternatives.
Fixes#1458
If hallucinating hero bribes a demon lord, report its true identity for
livelog/#chronicle. Unlike with the similar change for genocide, this
does give away information if the player checks #chronicle.
Again, the report via the web contact form was misclassified as spam.
This fixes the impossible from yn_function() for ^A after Z. One
call to yn_function stored the spell letter for do-again and then
another call was unintentionally using that when getting a y/n
response for askchain() while using menustyle:Traditional [when
spell was identify and eligible objects needed confirmation about
whether to be ID'd].
Fixing that seemed to break #pray so the paranoid_confirm routine
has been changed to not rely on canned input, even for queries where
the player hasn't specified that confirmation be required.
Behavior of ^A might be different in unexpected ways, but it wasn't
working correctly before.
Several window ports that support perm_invent were
using a call back to the core display_inventory()
function.
While calling from the window port back to core functions
is arguably not ideal in the first place, it was recently
brought to light that code NetHack-3.7 code changes to
display_inventory() actually caused it to stop repopulating
the perm_invent window as intended under certain circumstances.
For now, provide an alternative function, repopulate_perminvent(),
that hopefullshould still work the way it did previously.
There will likely be some additional changes after this to
further improve things, at some point.
For now though, this
Resolves#1454
Uncursed genocide while hallucinating deliberately reports hero's
role to the player as the affected target, but it was also showing
that for livelog and #chronicle.
Making the true target be visible for #chronicle gives away a little
information but that should be inconsequential in this siutation
since the player specifies the target.
Not sure why this report got misclassified as spam.
The existing messages made sense for brief dips into water, but
didn't make sense when using an oilskin sack for an extended
period underwater (and also assumed that the player was able to
see the sack). This commit changes the message to make sense
(and to be less spamy) if the hero enters water and remains there,
and prevents oilskin sacks self-IDing if the hero is blind and
thus can't see the water.
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.
It makes sense that a vegetable would do less damage than a hard
object would, as they're generally fairly soft, so it seems like a
likely thing for players to try if they're *intentionally* trying
to hit for zero damage (which could be useful in certain niche
cases, e.g. to wake up a sleeping monster without damaging it).