Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Questions about Wine on Linux
User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sun Aug 30, 2020 12:01 pm

Dear DarkShadow44,

I again did some testing of the "MUI" support enhancement after downloading the latest development version of Wine (5.16) to make sure that there were no knock-on effects within the latest version. I also reviewed one of my condition tests in the "LoadResource" function and determined there was some redundancy in the test. So, I simplified the test for calling the "get_mui" function. I then ran through all of the same unit test scenarios in the unit test document that I have attached to my Github project and the results were identical. I also launched and played all eight games that make up the Wineaero game set and they all functioned quite well. I have committed those changes to file "loader.c" in my Github project if you wish to review.

Regards,

Craig

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Sun Aug 30, 2020 1:12 pm

Hi Craig,

do you also have automatic tests? If you want to, you can take a look at the Wine test suite included in wine source code on how to do that. That will probably be required for inclusion into wine.

Regards,
DarkShadow44

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Mon Aug 31, 2020 12:54 pm

Dear DarkShadow44,

I viewed the Wine conformance testing link which discussed running an end-to-end test of the Wine application along with how to test a specific file. Strangely, the test for the "loader.c" file was in the "kernel32/tests" folder rather than in the "kernelbase/tests" so that confused me a bit. Anyway, I went to the "kernel32/tests" folder and ran the "make" command specifically for the "loader.c" file. I did not get the "loader.ok" file as there were failures. I've copied the verbiage below.

craig@Sandbox:~/Wine5/dlls/kernel32/tests$ make loader.ok
../../../wine-5.16/tools/runtest -q -P wine -T ../../.. -M kernel32.dll -p kernel32_test.exe.so loader && touch loader.ok
0478:fixme:module:LoadPackagedLibrary semi-stub, name L"kernel32.dll", reserved 0.
loader.c:3930: Test failed: ntdll.dll:0: wrong FileHeader.NumberOfSections 2 / 11
loader.c:3932: Test failed: ntdll.dll:0: wrong OptionalHeader.AddressOfEntryPoint 3b540 / 60280
loader.c:3941: Test failed: ntdll.dll:0: wrong OptionalHeader.DataDirectory.VirtualAddress 9511c / 75000
loader.c:3946: Test failed: ntdll.dll:0: wrong OptionalHeader.DataDirectory.Size 9de4 / 13416
loader.c:3941: Test failed: ntdll.dll:1: wrong OptionalHeader.DataDirectory.VirtualAddress 0 / 89000
loader.c:3946: Test failed: ntdll.dll:1: wrong OptionalHeader.DataDirectory.Size 0 / 14
loader.c:3941: Test failed: ntdll.dll:2: wrong OptionalHeader.DataDirectory.VirtualAddress 9ef1c / 8a000
loader.c:3941: Test failed: ntdll.dll:5: wrong OptionalHeader.DataDirectory.VirtualAddress 0 / 8b000
loader.c:3946: Test failed: ntdll.dll:5: wrong OptionalHeader.DataDirectory.Size 0 / 3b3c
loader.c:3952: Test failed: ntdll.dll: wrong section 0
loader.c:3952: Test failed: ntdll.dll: wrong section 1
Makefile:820: recipe for target 'loader.ok' failed
make: *** [loader.ok] Error 11
craig@Sandbox:~/Wine5/dlls/kernel32/tests$

To determine if this failure was a function of my code enhancement, I reverted back to the unmodified version of the "loader.c" program, reran the "make" command to rebuild/reset the Wine application back to an unmodified version, and then reran the above test. I got the same error verbiage. So, I am at a loss as how to provide a test report with my enhancements. This probably illustrates my low level of expertise with testing out Wine enhancements. Any feedback or suggestions would be great. Perhaps someone at Codeweavers needs to review my code and test this. I'm not sure what the next step is.

Regards,

Craig

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Mon Aug 31, 2020 2:02 pm

Hello Craig,

Well, the important thing is, that you don't add new test errors. You'd probably have to write tests with exe/dll combinations that contain resources in a certain order, and check which one of them is loaded (if at all). Does that make sense? Basically, turn your documents into a test program.
Theoretically I could help there, but I don't have much time currently.

Regards,
DarkShadow44

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Mon Aug 31, 2020 5:42 pm

Dear DarkShadow44,

I was able to determine what test was producing the "ntdll" errors. For some reason, the testers set a boolean flag argument differently for the "ntdll.dll" test differently than the other "dll" tests. I don't know why, but when I set the boolean flag to be the same as the other tests, the test passes and I get an "OK" file.
Loader_Test.jpg
Loader_Test.jpg

I do not know what the ramifications are of changing that flag setting as it pertains to the total test occurring for the loader program file, but I guess there is a reason that flag was set differently.

I did notice that the loader test function ran successfully, insofar as it creates temporary files with a set of "PE" sections and successfully tests the files. The sequence of events are the creation of a file with a name of "ldrnnnn.tmp" (where "nnnn" is just a sequential number) in the user's "Temp" folder, testing of the "PE" sections identifying if the tests were successful or not, and then removing the temporary file. To expand this test to check the "MUI" functionality I added, the loader test function would need to have additional code to temporarily create a language specific folder within the user's "Temp" folder, copy the temporary file to the language specific folder, rename the file by adding an ".mui" suffix to the file, and then test out the "get_mui" function enhancement. Following is an image of how that might look. The first image is how the test program currently works when a temporary file is added. The second image in the group displays the creation of the language specific folder, and the third image in the group displays the creation of the multi-language support file.
Create_PE_Mockup.jpg
You probably already know this but the main difference between a standard executable file being represented by the temporary file and a language specific resource file that would be represented by the temporary multi-language file is that the multi-language file would just have ".rsrc" sections and not a ".text" section. But for the purpose of testing, having a temporary file with a ".text" section should not matter.

Conceptually, I can see what would need to be done to expand the loader test, but actual coding is way beyond my skill level as a C coder. Perhaps my enhancement to file "loader.c" can be sent to someone at CodeWeavers for them to evaluate. That's just a thought. For me, I just apply the code change to the current development version of Wine and I am good to go for game playing. I just think others would benefit from this enhancement. Again, thank you for all your input.

Regards,

Craig
Attachments
Loader_OK.jpg

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sun Sep 27, 2020 7:09 pm

All,

Again, with a new release of Wine (5.18), I applied the MUI enhancement to the "loader.c" file and ran the enhancement through various tests. I found that there had been some changes to the memory mapping function (or up to this point, I had just been lucky) that allowed the MUI file to be located in a virtual memory location that was greater than the memory location of the executable file. Therefore, I included additional functionality in the "LoadResource" function to account for this scenario and keep the enhancement robust. After applying the additional test conditions, all of the various programs I tested worked correctly.

The latest revised version of the "loader.c" file has been placed up on my Github project if you wish to review and use. The link to that project is in an earlier post within this issue.

Regards,

Craig

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sat Oct 24, 2020 4:37 pm

All,

I have done a bit of rearrangement of the code enhancements to version 5.20 of program file loader.c so that other than the static variable field additions, all of the additional code and revised code resides within the same general vicinity in the source code file. I've again tested out the enhancements and language specific resources are acquired to make games like Mahjong Titans play properly. The latest version of the enhanced source code is out at my Github project. Enjoy!

Regards,

Craig

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Fri Oct 30, 2020 10:44 am

Dear DarkShadow44,

FYI, with the various refinements I have made to this enhancement within the "loader.c" file, I decided to go ahead and submit the enhancements as a patch. I will see if the folks at Codeweavers feel the enhancement has merit. From what I have found in researching the web for information on how resources from an "mui" file are loaded via the Windows operating system, my enhancement mimics that function, only in a decoupled manner.

Regards,

Craig

nadeloehr
Level 1
Level 1
Posts: 5
Joined: Sat Aug 03, 2019 2:25 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by nadeloehr » Sat Oct 31, 2020 2:54 pm

Hi Craig,

thank you! I got all the games I cared about to run with the code you provided! Hopefully they accept your patch.

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sat Nov 21, 2020 9:13 pm

All,

The source code changes have been applied to version 5.22 of the Wine application and tested. FYI, the patch I submitted at the beginning of the month is still in the queue. I am guessing that it is waiting on the assignment of a code reviewer. I will keep monitoring the progress through the patch process and hopefully the patch will be accepted.

Regards,

Craig

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sat Dec 05, 2020 10:44 am

Dear DarkShadow44,

The patch I submitted just disappeared from the patch list without any notification of either being accepted or rejected. In reviewing the documentation about submitting patches, the documentation indicates that I should have gotten some feedback, but I did not receive any feedback. Since I know that you have some experience in submitting patches, should I resend the patch or await for some feedback? Thanks.

Regards,

Craig.

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Sat Dec 05, 2020 10:47 am

Hi Craig,

I'd resend the patch. It can happen that it flies under the radar sometimes.

Regards,
DarkShadow44

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Tue Jan 19, 2021 7:28 pm

Dear DarkShadow44,

I noticed that the resubmission of my patch fell off the list as well. Possibly, that might have been timing as I saw that as version 6.0 was being finalized there had been a code freeze. So since I found no code changes in the "loader.c" file since my original patch submission, I have submitted my patch one more time. I received a notification in my email for this new submission, and I saw that my patch was sitting in the list.
Wine_Email.jpg
Wine_Test_Status.jpg
I guess the one thing I am curious about is that I have never received any inquiry from the WineHQ coders as to who I am to ensure that I have not had any affiliation or inside knowledge of Windows (which I do not have any affiliation or knowledge). With that, should I:

- expect some correspondence requesting a "biography" from me?

- contact someone at WineHQ offering up a "biography"?

- seek out a sponsor from the Wine development community?

Any guidance in this would be appreciated.

Regards,

Craig

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Wed Jan 20, 2021 12:11 pm

Hello Craig,

as fair as I know, there is no need for such things. I didn't either - It's a system of trust and you're expected to hold up these standards.

Unfortunately, it's not too uncommon for patches to "get lost" sometimes, persistence is key here. What could help, is asking a known contributor if they could offer guidance for getting patches reviewed and upstreamed. You can check out the IRC #winehackers or, if you're feeling more direct, just email a person you consider approachable. Since I'm not too regular of a contributor, I don't feel like I am a good reviewer here, but please keep me updated in case you don't get a response.

What certainly would be useful, would be a bunch of tests to prove your implementation is correct. I understand that it's a lot of work, if you want, I'd be willing to help write these. Especially the part checking when a resource is loaded from MUI should be interesting.

Regards,
Fabian

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Tue Feb 23, 2021 3:20 pm

Dear Darkshadow44,

FYI, I have good news and bad news regarding my patch submission. The good news is that the patch was finally reviewed after my repeated submissions. The bad news is that the patch was rejected. Evidently, this was due to not having any test results. As a reference, if you are curious, following is the link to the feedback I received from Zebediah.

https://www.winehq.org/pipermail/wine-d ... 80064.html

My first thought is to not pursue the patch any further, but then I feel that this enhancement would be beneficial to others as well. My issue is my complete lack of experience in constructing a test frame for this enhancement to prove it out. I used to do unit testing and system testing when I was a programmer/analyst but that was for IBM RPG programs which have no similarities to the C language. If you do have some ideas on how to test this and resubmit I would be willing to listen. I think this "old dog" can still learn some new tricks.

Regards,

Craig

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Tue Feb 23, 2021 4:34 pm

Hello Craig,

on how to do tests it's best if you look at the code itself. There's already a bunch of tests involving kernel32, you need to add your tests into that.
What you should do, IMHO, is create a dll which will be the MUI dll, and during the test put it at different paths and see when the MUI dll is used. Also for different languages I guess.
As for how to add a dll as resource into the test, look into kernel32/tests, namely dummy.spec, dummy.c and actctx.c.
Basically, you need to show
a) When the dll is used in the first place (resource id smaller than ???) ?
b) From where the MUI dll is loaded
c) What is affected by MUI overrides
d) How language affects the loading process
Basically, make a demo that uses MUI to prove your implementation behaves like windows does.

Regards,
Fabian

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Mon Mar 08, 2021 11:40 am

Dear DarkShadow44,

I did a bit of digging into the test source code for testing in the kernelbase and kernel32 dll's, and I basically got the "deer in the headlights" sensation. It looked overwhelming. It appeared that the tester manually constructed a "PE" format file for load testing, which is way above my level of expertise. I have the most basic insight into the "PE" file format and would not know how to build a multi-language resource file for the test.

So in that regard, I believe I will just periodically reapply my enhancement to the "loader.c" file as new releases and keep my Github project current for anyone to review and clone. I will also send a note to the Codeweavers person that did the review of my patch as well and let her know of my project in case her or one of her colleagues wants to review the code and possibly use it or improve upon it down the road. This has been a great journey and continues to be. Thanks again for all of your input.

Regards,

Craig

User avatar
DarkShadow44
Level 8
Level 8
Posts: 1114
Joined: Tue Nov 22, 2016 5:39 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by DarkShadow44 » Mon Mar 08, 2021 3:01 pm

Hello Craig,

it's not that difficult once you get the hang of it, but I understand if you don't want to learn all that.
If I find time, maybe I'll add a bunch of tests - no promises though.

Regards,
Fabian

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Tue Mar 09, 2021 11:37 am

Dear DarkShadow44,

If you want to work up some tests, go for it. As I said, I am quite happy with the journey and learning a bunch about C programming and also some of the internal functions in Wine. And, I have a version of Wine that allows those games to work on my Linux system. As noted in earlier threads, the source code for my enhancement is out on Github, and I intend to keep refreshing the code as newer versions roll out (and maybe my Github project will receive a few more stars :D ). Once again, thank you Fabian for your bits of knowledge. It helped point me in the right direction to come up with a solution.

Regards,

Craig

ChrisM
Newbie
Newbie
Posts: 3
Joined: Sun Apr 12, 2020 1:28 pm

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by ChrisM » Sat Apr 10, 2021 9:08 am

I am really glad to see that I am not the only one who has these problems and that someone is actually looking into them. I have two relatives who want these games but without the menu bar, these are literally unplayable.

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sun Apr 11, 2021 12:41 pm

Dear ChrisM,

If you read through the threads in this issue, you will note that my patch was not accepted. However, I did receive an email from another contributor who has submitted his own set of patches to add resource retrieval from associated language specific resource files. Since he is a past contributor and has had submitted enhancements accepted in the past, I am hoping that his patches are able to make it into the product. In reviewing his approach, his enhancements focus on the "ntdll.dll" file; whereas, my enhancement was to the "kernelbase.dll" file. But basically, his enhancements follow the spirit of what my enhancement does. So I will keep monitoring the progress he has with his set of patches. In the meantime, I have downloaded the latest version of Wine (6.6), applied my enhancements to the "loader.c" file, and rerun the "make" function to build and verify that my enhancement still finds and loads the language specific resources. I've uploaded the latest version of the "loader.c" source code to my GitHub project (the link to the project is in an earlier thread within this issue). You are more than welcome to get a clone of the source code if you are so inclined to make a build of Wine for yourself. Enjoy!

Regards,

Craig

User avatar
cschulst
Level 2
Level 2
Posts: 49
Joined: Wed Apr 15, 2020 1:23 pm
Location: United States

Re: Windows 7 Games (Mahjong, Minesweeper, Spider Solitaire, etc.) do not display menu bar (File, Edit, View)

Post by cschulst » Sat May 08, 2021 8:56 pm

All,

As with the previous updated versions of Wine, I have reapplied my enhancements to the "loader.c" file to version 6.8 and built a custom "DLL" library file (the make process seems to create file kernelbase.dll.so as opposed to file kernelbase.dll). In the previous iterations of the application, I would create an iteration of the library for the 32-bit folder and an iteration for the 64-bit folder and place them in the appropriate locations in folders "opt/wine-devel/lib/wine" and "opt/wine-devel/lib64/wine". For some reason, the latest version of Wine now places the "DLL" files another level down in folders "opt/wine-devel/lib/wine/i386-windows" for the 32-bit "DLL" files and "opt/wine-devel/lib64/wine/x86_64-windows" for the 64-bit "DLL" files. In the past, I just used to rename the packaged "kernelbase.dll" file to "kernelbase.dll.bak" and then place a copy of the appropriate "kernelbase.dll.so" file into the same folder and my enhancement would work. To be brief, when I tried to replicate that method by placing the custom "kernelbase.dll.so" file into the same folder, the enhancements were no longer executed, but they did if I placed the "kernelbase.dll.so" file in the "wine" folder as I had done previously. Following is how the packaged "DLL" file is renamed and where the built custom file was placed for the 32-bit version.
DLL_Library.jpg
Then place the appropriate copy of the "kernelbase.dll.so" file into the "wine" file that sits one folder level above.
Library_Directory.jpg
This needs to be replicated for the 64-bit versions as well.

I hope that is clear enough if any of you are trying out this enhancement.

Regards,

Craig

Post Reply