From: nhmall Date: Tue, 31 Jan 2023 07:22:25 +0000 (-0500) Subject: Only embed wav resources if soundlib defined X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6012ab65878bbf9775d545fac61aedb72200e82;p=nethack Only embed wav resources if soundlib defined --- diff --git a/sys/windows/Makefile.nmake b/sys/windows/Makefile.nmake index 368e08cdf..5e8836d93 100644 --- a/sys/windows/Makefile.nmake +++ b/sys/windows/Makefile.nmake @@ -49,7 +49,7 @@ GAMEDIR = ..\binary # Default game build directory # # windsound uses built-in Microsoft API's, no 3rd party download is required. -#SOUND_LIBRARIES = windsound +SOUND_LIBRARIES = windsound # #------------------------------------------------------------------------------ @@ -797,6 +797,8 @@ SOUNDLIBDEFS = $(SOUNDLIBDEFS) -DUSER_SOUNDS !IF "$(NEED_SEAUTOMAP)" == "Y" SOUNDLIBDEFS = $(SOUNDLIBDEFS) -DSND_SOUNDEFFECTS_AUTOMAP !ENDIF +WAV = $(WAVS) +RCFLAGS = $(RCFLAGS) -dRCWAV !ENDIF #HAVE_SOUNDLIB #========================================== @@ -1448,17 +1450,16 @@ $(INCL)\nhlua.h: tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -$(OGUI)NetHackW.res: $(SRC)\tiles.bmp $(MSWIN)\NetHackW.rc \ - $(MSWIN)\mnsel.bmp \ - $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \ +$(OGUI)NetHackW.res: $(SRC)\tiles.bmp $(MSWIN)\NetHackW.rc $(MSWIN)\NetHack.ico \ + $(MSWIN)\mnsel.bmp $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \ $(MSWIN)\petmark.bmp $(MSWIN)\pilemark.bmp $(MSWIN)\NetHack.ico \ - $(MSWIN)\rip.bmp $(MSWIN)\splash.bmp $(WAVS) + $(MSWIN)\rip.bmp $(MSWIN)\splash.bmp $(WAV) @echo Building resource file $@ from $** - $(rc) -nologo -r -fo$@ -i$(MSWIN) -i$(SndWavDir) -dNDEBUG $(MSWIN)\NetHackW.rc + $(rc) -nologo -r -fo$@ -i$(MSWIN) -i$(SndWavDir) -dNDEBUG $(RCFLAGS) $(MSWIN)\NetHackW.rc -$(OTTY)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico $(WAVS) +$(OTTY)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico $(WAV) @echo Building resource file $@ from $** - $(rc) -nologo -r -fo$@ -i$(MSWSYS) -i$(SndWavDir) -dNDEBUG $(MSWSYS)\console.rc + $(rc) -nologo -r -fo$@ -i$(MSWSYS) -i$(SndWavDir) -dNDEBUG $(RCFLAGS) $(MSWSYS)\console.rc # # Secondary Targets. diff --git a/sys/windows/console.rc b/sys/windows/console.rc index 49996af8f..16eaae9c0 100644 --- a/sys/windows/console.rc +++ b/sys/windows/console.rc @@ -43,6 +43,8 @@ BEGIN VALUE "Translation", 0x409, 1200 END END + +#ifdef RCWAV se_squeak_A WAVE "se_squeak_A.wav" se_squeak_B WAVE "se_squeak_B.wav" se_squeak_B_flat WAVE "se_squeak_B_flat.wav" @@ -103,5 +105,6 @@ sound_Wooden_Harp_D WAVE "sound_Wooden_Harp_D.wav" sound_Wooden_Harp_E WAVE "sound_Wooden_Harp_E.wav" sound_Wooden_Harp_F WAVE "sound_Wooden_Harp_F.wav" sound_Wooden_Harp_G WAVE "sound_Wooden_Harp_G.wav" +#endif /*console.rc*/" diff --git a/win/win32/NetHackW.rc b/win/win32/NetHackW.rc index 79892fea4..61ef051f3 100644 --- a/win/win32/NetHackW.rc +++ b/win/win32/NetHackW.rc @@ -391,6 +391,7 @@ BEGIN IDS_APP_TITLE_SHORT "NetHack for Windows" END +#ifdef RCWAV se_squeak_A WAVE "se_squeak_A.wav" se_squeak_B WAVE "se_squeak_B.wav" se_squeak_B_flat WAVE "se_squeak_B_flat.wav" @@ -451,7 +452,7 @@ sound_Wooden_Harp_D WAVE "sound_Wooden_Harp_D.wav" sound_Wooden_Harp_E WAVE "sound_Wooden_Harp_E.wav" sound_Wooden_Harp_F WAVE "sound_Wooden_Harp_F.wav" sound_Wooden_Harp_G WAVE "sound_Wooden_Harp_G.wav" - +#endif #endif // English (United States) resources /////////////////////////////////////////////////////////////////////////////