open-watcom / open-watcom-v2

Open Watcom V2.0 - Source code repository, Wiki, Latest Binary build, Archived builds including all installers for download.
Other
980 stars 159 forks source link

Microsoft Resource Format (wrc.exe -zm flag) is broken #865

Open danielmarschall opened 2 years ago

danielmarschall commented 2 years ago

Hello,

I found out that if the wrc.exe -ad option is replaced with -zm, the resulting RES file is broken. It crashes the tool "ResourceHacker", and the resulting DLL file is broken too.

The command line is: wrc ..\win_res.rc -bt=nt -zku8 -dWIN32 -d_WIN32 -d__NT__ -dWIN_ENV=1 -dINSIDE_PHOTOSHOP=1 -dMSWindows=1 -i=d:\SVN\FilterFoundry\trunk\;C:\WATCOM\h;C:\WATCOM\h\nt;..\photoshop_sdk\pluginsdk\photoshopapi\Photoshop;..\photoshop_sdk\pluginsdk\photoshopapi\Pica_sp;.\ -q -ad -r -fo=win_res.res

Note: The project to be built is https://github.com/danielmarschall/filter_foundry/tree/master/wpj

Environment: Windows 10 x64 . OpenWatcom Build "14 May 2022"

Here are the test files: Broken Resource.zip

danielmarschall commented 2 years ago

(Don't be confused that the DLL files contain additional "TPLT" resources. They are added in the post-build process and are not relevant to the bug.)