Sound working on Win10 Mudlet from latest source

dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Sound working on Win10 Mudlet from latest source

Post by dicene »

Just went through the arduous task of compiling Mudlet from the Mudlet/Mudlet development branch following the instructions found at http://wiki.mudlet.org/w/Compiling_Mudl ... _Windows_7

I'm guessing it's due to Mudlet using a newer version of QT, but sound triggers and playSoundFile() are both working properly on Win 10 x64.

Some notes about the process:

In the following section, I also had to rename -llua51 to -llua to get the make to complete.
git clone https://github.com/Chris7/Mudlet2.git
cd Mudlet2/src (if using my github repo)
git checkout mudletDev
edit src.pro and add:
to Win32:LIBS:
change:
-lzlib to -lzlib1
-lhunspell to -lhunspell-1.3-0
-lpcre to -lpcre-1
-llibzip to -llibzip-2
add right above -llua51:
-L"C:\\mingw32\\bin" \
Also, Boost 1.45 wasn't working, and from what I read it seemed like that is an incompatibility with C++11. I ended up installing Boost 1.60 over top of 1.45, leaving the old 1.45 files because when I tried 1.60 only, some important files were missing. Sloppy, but that fixed those issues.

The compiled Mudlet seems to be working fine, just have a lua library issue keeping me from switching to using it. When I tried "luarocks install luazip" I ended up with the following error:
C:\LuaRocks>luarocks install luazip
Installing https://luarocks.org/luazip-1.2.4-1.rockspec...
Using https://luarocks.org/luazip-1.2.4-1.rockspec... switching to 'build' mode

Error: Could not find header file for ZZIP
No file zzip.h in c:/external/include
You may have to install ZZIP in your system and/or pass ZZIP_DIR or ZZIP_INCDIR
to the luarocks command.
Example: luarocks install luazip ZZIP_DIR=/usr/local

C:\LuaRocks>
Google has not been any help in fixing that issue, and until I can get a working copy of luazip compiled, I'm presumably going to keep running into this:
[ ERROR ] - Cannot find Lua module zip.
Lua error:[string "require "zip""]:1: module 'zip' not found:
no field package.preload['zip']
no file '.\zip.lua'
no file 'C:\Users\Dicene\Desktop\Mudlet\lua\zip.lua'
no file 'C:\Users\Dicene\Desktop\Mudlet\lua\zip\init.lua'
no file 'C:\Users\Dicene\Desktop\Mudlet\zip.lua'
no file 'C:\Users\Dicene\Desktop\Mudlet\zip\init.lua'
no file '.\zip.dll'
no file 'C:\Users\Dicene\Desktop\Mudlet\zip.dll'
no file 'C:\Users\Dicene\Desktop\Mudlet\loadall.dll'
I even took the zip.dll file out of my current Mudlet 3.0.0-delta install, and I still end up getting an error, albeit a different one:
[ ERROR ] - Cannot find Lua module zip.
Lua error:error loading module 'zip' from file '.\zip.dll':
The specified module could not be found.
Any insight?

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Sound working on Win10 Mudlet from latest source

Post by SlySven »

zzip.h note the DOUBLE 'Z', is a confusing one it is NOT libzip but libzzip! It is available on my GNU/Linux system from the libzzip-0-13 package. The source code is available from Sourceforge here.

BTW will you be building just 32-bit Windows version of Mudlet or the harder to do IMHO (as you will need to build a 64-bit Qt platform instead of using a ready-made Qt supplied one) 64-bit one?

For the record libzzip is only used by the luazip library and that is functionally a single pair of source file (one c source, one C header) from the Keplar project who are involved in Lua... their site no longer has any visible sign of luazip but it is available from the Wayback machine or LuaForge - which contains a link to a Github repository that was generated from the original CVS SVM.

dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Re: Sound working on Win10 Mudlet from latest source

Post by dicene »

Right. I'd figured that out, and have had a series of issues trying to get it working anyway. Still working on it. Will post if I can't figure it out.

Also, the pre-compiled Mudlet I had installed stopped working. I had it been open the entire time I was working on getting the dev version compiled, so I'm not sure WHEN it stopped working. Here's the error I'm getting: Image Image

Looked for possible solutions and ended up copying three files called qminimal.dll, qoffscreen.dll, and qwindows.dll into the directory the Mudlet executable is in, and into a "platforms" folder, and it made no difference unfortunately. =(

Also, also, re: your question, I'm not thinking I've got it in me to do an x64 build. It was exhausting just getting to this point.

Edit: So, just ended up grabbing the dlls from a fresh installation of Mudlet 3.0 delta, and that fixed the lua errors. I'm at a point now where blank profiles load just fine, unfortunately I can't get any of my existing profiles to work at all. Tried some that I haven't made changes to in ages and those aren't working either. I'm getting no error and ProcMon says that Mudlet is opening the errors.log file in my profile folder, but it's not actually writing anything into it. The profile just starts to load, and before anything actually changes on the screen, the mudlet window gets whited out and Windows informs me that Mudlet has to close. Any thoughts on where I should begin to look in narrowing down what is breaking everything so miserably? Considering I can't get the original install to work anymore, I'm sort of committed to fixing the problems with this compiled version so I can get back to the Mud I play.

Edit 2: Alright. Copied 5 different qt dll files from the compiled Mudlet and dropped them into the 3.0.0-delta install directory and that fixed the 3.0.0-delta version. In fact, my sound is even working now on that version. Still can't get the compiled copy to work though, since it's still closing every time I load a profile that isn't empty. Also, I've noticed that even on a clean profile, if I try to download the map, it crashes.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Sound working on Win10 Mudlet from latest source

Post by Nyyrazzilyss »

dicene wrote: Edit 2: Alright. Copied 5 different qt dll files from the compiled Mudlet and dropped them into the 3.0.0-delta install directory and that fixed the 3.0.0-delta version. In fact, my sound is even working now on that version.
Cheer! Would that mean it would be possible to copy a couple files from the Qt install folder into the mudlet install folder, and quickly have sound on delta without doing a full compile? Which dlls were required?

Thanks!

dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Re: Sound working on Win10 Mudlet from latest source

Post by dicene »

Your mileage may vary. I also went through the process of installing QT5.3 or something while working to compile Mudlet, so it's possible that Mudlet is just using that install of QT instead of an internal one or something. Not really too keen on the intricacies of it all. =/

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Sound working on Win10 Mudlet from latest source

Post by Nyyrazzilyss »

Without making to many major changes, any reason why when it comes to linking it looks like I can't find opengl libraries? Compile runs just fine, it's building (linking) the final executable that's erroring for me. Qt 5.6 /Boost 1.6 (didn't install 1.45, I just changed the makefile to point to the correct version)

./release/glwidget.o:glwidget.cpp:(.text+0x13c): undefined reference to `_imp__glEnable@4'
./release/glwidget.o:glwidget.cpp:(.text+0x17a): undefined reference to `_imp__glShadeModel@4'
./release/glwidget.o:glwidget.cpp:(.text+0x19e): undefined reference to `_imp__glBlendFunc@8'
(etc etc)

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Sound working on Win10 Mudlet from latest source

Post by SlySven »

Don't worry about that "errors.log" file - it does get opened but I don't think anything gets written to it, ever! Someone must remember to get around to commenting out/excising the relevant bit of code that is a left-over from previously used error log code that has now gone,

[EDIT 2016/05/04]: The errors.log file IS NOW USED - to record any issues when loading map files - to leave a record of them and the repair/clean up actions taken. New reports are appended to the file and there is now an option (defaulting to off) to show those messages in the main profile console as they are encountered rather than filling the screen with them as a prior code incarnation did - the information will always be logged to this file though so the information will be saved beyond an individual session.

dicene
Posts: 47
Joined: Thu Sep 25, 2014 7:36 am

Re: Sound working on Win10 Mudlet from latest source

Post by dicene »

Nyyrazzilyss: When I was doing the compile, there was some sort of incompatibility between Boost 1.45 and something else, but when I tried to get by with JUST Boost 1.60, all sorts of files were missing that it was looking for. I ended up putting in Boost 1.45 then dropping Boost 6 on top of it to get it working. Not sure if that will help or not.

SlySven: Re: The errors.log thing: If I weren't such a terrible scrub and had a real working knowledge of how to deal with Git, I'd handle it myself. The code appears to all be in Host.cpp, around line 171. I might try and figure out all that stuff when I'm off work. I'm still left with the problem that Mudlet is force-closing without giving me any feedback whatsoever on why. It's doing it while loading any profile that isn't pretty much blank, and while trying to download the map on new profiles. Is there any way for me to get any sort of information from Mudlet on WHY it's crashing, cause I honestly have no clue where to start. I even tried opening Mudlet from a CMD window hoping that it would return some useful info for me when it crashed, but that didn't give me any info whatsoever. =(

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Sound working on Win10 Mudlet from latest source

Post by Nyyrazzilyss »

dicene wrote:Nyyrazzilyss: When I was doing the compile, there was some sort of incompatibility between Boost 1.45 and something else, but when I tried to get by with JUST Boost 1.60, all sorts of files were missing that it was looking for. I ended up putting in Boost 1.45 then dropping Boost 6 on top of it to get it working. Not sure if that will help or not.
Thanks! From your comment earlier in the thread, I removed Qt5.6 and installed 5.3.2 instead. This was still with just boost 1.6 (I hadn't installed 1.45, I just changed the makefile to point to 1.6 instead). With no other changes, it linked successfully! I copied a couple missing dll files into the build directory that were in the wrong location, and it ran successfully also! (Cheer!) - Other then just seeing it run successfully, I haven't gone to far with it yet - I'm sure i'll find other files in the wrong location (lua, etc).

I'm not sure why 5.6 wasn't able to find some of the libraries, i'd added gui to Qt+ but that didn't made a difference. That 5.3.2 works for a usable windows complile is good enough :)

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Sound working on Win10 Mudlet from latest source

Post by Nyyrazzilyss »

Might have been more files then needed, however, I followed the portion of the compile instructions talking about the required dlls/ and the information from your earlier post.
From Qt\5.x.x\mingw...(whatever the version is)\bin:
icudt5x.dll, icuin5x.dll, icuuc5x.dll, Qt5Core.dll, Qt5Gui.dll, Qt5Network.dll, Qt5OpenGL.dll, Qt5Widgets.dll
I copied the above dll files from the windows Qt 5.3.2 install overwriting the identical files in the 3.0-delta install. Mudlet appears to be running with no problems, and sound is also working (That doesn't work with Qt 5.6 btw).

I'll run mudlet like that now, and hopefully nothing unforseen pops up and crashes it. One odd thing was the command bar at the bottom of the screen had a grey border previously, cyan now.

Post Reply