-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Windows MKXP #35
Comments
found the smallest test program one could write to trigger this output,
compiling with g++ test.cpp -Iruby-2.1.0/ -Iruby-2.1.0/x64-mingw32/ results in the above error |
Could you try compiling with |
ok, will give it a shot and report back. Note, reversing the #incldue directives fixes the issue in the test.cpp program, but its probably too minimal for application in mkxp itself. |
Nope, same error as before... this is rather annoying, windows, y u no posix!? |
I don't suppose you have access to a windows machine to test with? this is really irksome :/ |
This is yours yes? https://www.ruby-forum.com/topic/4939821 Also this could be related: Also this could be related: http://sourceforge.net/p/mingw/bugs/1625/ (also this) |
Yes, that is mine, and I've seen both of those pages, lol. |
Hmm... I've reported it to mingw-w64 and they're gonna convert |
Yep, the patch fixes the gmtime_r issue but raises a new one. |
What new issue? |
rand(), but including |
Now the current issue is: |
Oh, you're statically linking. Yeah, the problem is very likely my limited pkgconfig file for SDL_sound which doesn't pass on the correct linker flags in case of static linking. You could compile SDL_sound with only WAV support as a temporary workaround for now, or compile it into a dll instead. |
Alternatively, since all this needs is a |
yeah. I don't really want to link static, but I can't seem to get sdl_sound's hg version with the patch to compile into a shared library; its driving me crazy, lol. |
Success! well, to a degree... It compiles and 'runs', but though I do hear the music and it does accept options from mkxp.conf and opens a window, the window is nothing but solid black... |
On another note, setting |
I was worried that the gmtime_r issue came up again, but it seems you edited the gist and now the errors are gone? Anyway, I have a slight idea about the first three errors. Can you apply this patch and try again? |
Yeah, the gmtime_r issue was there again, but that was because I hadn't patched win32.h for ruby on the 32 bit side. |
Nope, exact same output. I would like to mention that appending If possible, I'd like to work on actually getting a playable game, though. I'll mention that mkxp.conf settings do get applied.
|
Hm. It looks like glew.h correctly defines Yes, it looks like everything is working, but for some reason the result of the OpenGL rendering isn't being swapped to the screen. In mkxp.conf, have you turned |
Assuming the proper syntax is |
Can you try to compile and run this test program: https://gist.github.com/Ancurio/001987a2e0b172a036b0 (only depends on sdl2) |
hrm... being a pita on me. |
setting main to |
My bad, I have updated the gist with an improved version that should compile on windows now. Can you try again?
Yes, this is because on windows your main function isn't the actual main function =) SDL2 wraps around this and renames your main function, so the types have to match exactly. C++ only allows one signature, while C let's me do silly things like |
There we go. |
Does it switch to blue after a while? Also try resizing the window. |
Sorry, didn't wait for it to change, lol. and yes, as I type this its shifting through purple into blue, and I can resize it down to just a bit larger than the window manager keys. (Just tested resizing with mkxp as well, I can resize it as much as I need, including the alt+enter fullscreen mode) |
Actually I just noticed something. I think its an issue with event polling/passing. Even if the display isn't updating, you'd think that I could at least hear myself move the cursor up/down on the title screen of a default RMXP project, but nope. To further support this idea, that little SDL2 application you had me compile, I could close that either via ctrl+c in my console or by hitting the standard x button in the corner; I couldn't close the mkxp window with the window manager button, which makes me think the window destroy event never got passed along. |
@ntzrmtthihu777, I want to try something on Windows, can you please kindly make a new Windows build from the mkxp-abs repo? |
Sure, you just need a binary, right?
…On Fri, May 12, 2017 at 3:02 PM, Ali Rastegar ***@***.***> wrote:
@ntzrmtthihu777 <https://github.com/ntzrmtthihu777>, I want to try
something on Windows, can you please kindly make a new Windows build from
the mkxp-abs repo?
https://github.com/Ancurio/mkxp-abs
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACofxVppfEOxUwYAP9foajug5MyviA8Zks5r5Lq9gaJpZM4CCJ0d>
.
--
If you're looking towards the Son, all your shadows are behind you.
|
Thanks! |
Sure, no problem. I can't make a dynamic loaded mkxp with my current setup
(openal only builds shared or static, not both)
so it will be one static binary. Is there any major differences between it
and the mainline mkxp repo?
…On Fri, May 12, 2017 at 3:10 PM, Ali Rastegar ***@***.***> wrote:
Thanks!
If the binary has the libs in a static form then yes, but if the libs are
dynamically loaded I would be grateful if you include them too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACofxRNVqMSWIVoFPsaPqHqfVMJC819Gks5r5LyogaJpZM4CCJ0d>
.
--
If you're looking towards the Son, all your shadows are behind you.
|
Static will be great actually. |
Ah, cool. I'm currently at work away from my box, so it will be a bit
before I can do so. Do I need anything extra for steamshim
compilation, or is all that's needed in your repo?
…On Fri, May 12, 2017 at 3:47 PM, Ali Rastegar ***@***.***> wrote:
Static will be great actually.
Hmm, steamshim support should be one of the most noticeable differences.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACofxeaTPak3RrkkIwhC1izrTD66XcYgks5r5MVvgaJpZM4CCJ0d>
.
--
If you're looking towards the Son, all your shadows are behind you.
|
Thanks, I really appreciate it. |
@openmac 32/64 bit? |
Either of 32 or 64 bit is fine, I want to test it a while before figuring out how to make my own builds. |
@openmac no, seems like my arch chroot is busted for mingw-w64. pulling head on both repos results in the same error. I apologize for the delay, but I'm gonna go ahead and setup gentoo's crossdev and use that, which could take a while, but its becoming too much of a pain to maintain two distros. |
Sorry for all the trouble, there is absolutely no rush. |
@Ancurio yo, been working on tweaking cmake to be able to build for windows (not specifically on windows, mind you. I don't have the willpower to sort out that mess) and I was wondering if you had any particular preference as to how its done. Considering its relatively easier to produce a fat, static linked mkxp.exe for windows rather than managing that whole side-by-side assemblies thing mentioned above, I'd basically have to replace Barring that approach, I could look into making something like Suggestions? Ideas? |
@ntzrmtthihu777 I don't have a preference; if the OSX path in CMakeLists.txt copies over the libs to form the bundle, you can do the same for windows. A fat statically linked mkxp.exe is fine too, but in that case everything should be linked (except maybe fluidsynth). |
@Ancurio actually I had a question regarding the whole fluidsynth/fluidlite
thing; think it would be too much of a problem to add in some #ifdef's to
easily allow someone to build against either instead.
…On Tue, May 23, 2017 at 1:01 PM, Jonas Kulla ***@***.***> wrote:
@ntzrmtthihu777 <https://github.com/ntzrmtthihu777> I don't have a
preference; if the OSX path in CMakeLists.txt copies over the libs to form
the bundle, you can do the same for windows. A fat statically linked
mkxp.exe is fine too, but in that case everything should be linked (except
maybe fluidsynth).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACofxZP8OxDa3dhf8x3nIbE6SgvZuuUZks5r8x7lgaJpZM4CCJ0d>
.
--
If you're looking towards the Son, all your shadows are behind you.
|
@ntzrmtthihu777 They have identical APIs. |
@Ancurio yes, identical apis, but not identical header/pkgconfig files.
…On Wed, May 24, 2017 at 12:30 AM, Jonas Kulla ***@***.***> wrote:
@ntzrmtthihu777 <https://github.com/ntzrmtthihu777> They have identical
APIs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACofxSFyGqxh5lzr-V2uE4KkIoW6Rx9Mks5r88B2gaJpZM4CCJ0d>
.
--
If you're looking towards the Son, all your shadows are behind you.
|
I've managed to get cmake to build it, but there are some adjustments that I think are a bit unfortunate and very hackish that are needed. for whatever reason I need to |
@ntzrmtthihu777 Regarding fluidsynth/fluidlite; this only concerns the build setting where you hard-link (instead of dlsym'ing) against the library, which is off by default. I feel ambivalent about this, because the normal fluidsynth dev packages you can download from every repository, whereas I'm not so sure how well fluidlite has been taken up by packagers. But then again, lots of other things don't make sense in mkxp either. Feel free to send a PR that switches the respective pkg-config names to target fluidlite. |
Agreeable in general, for sure, but if one is going to use fluidlite instead of fluidsynth, it makes more sense to do a hard-link, otherwise you need vorbis/others in the same dir as fluidlite.dll (and the side-dir, if you use that side-by-side assemblies technique discussed way back in the thread). On another note, with regards to the whole winmain issue with a cmake build, how would you feel about an ifdef'd undef main for windows? Yeah, its an ugly hack, but, you do get all the niceness of using cmake to build instead of an ugly script/makefile that got threw together, and its 'good enough' for now... Also, I'm working on packaging fluidlite for gentoo at least, and possibly arch. |
@Ancurio I've figured a bit more out. I think my SDL2 install is busted on the windows side, however, so more work needs to be done there. But, I've discovered a bit of a hack that at least lets mkxp compile and link via cmake cross-compilation. Basically, running
with linklibs.rsp containing the following
Copying that file, editing the first bit to say I've tried various methods of shoe-horning that directory into the link command in a more integrated fashion, such as the EXTERNAL_LIB_DIR variable you set up, to no avail. If we were able to get that to work somehow, I feel confident that this would work properly. |
@Ancurio so, I've worked out a build using meson that works for both linux and mingw-w64 cross-compile (have not tested running it yet, setting up a windows vm) but it does compile and link without error. I know you're a bit averse to the idea of adding new build systems, but this works very well, is very fast at building, and is relatively small (176 lines for meson.build, 5 lines for meson_options.txt, 15 lines each for x86_64 and i686 mingw-w64 cross-files) compared to the cmake build (443 lines). What do you think? I've not yet a way to test builds on OSX, but meson apparently does handle/have instructions for it. |
@Ancurio good news! I figured out the error I was having (I don't think I discussed it with you, basically my toolchain was build with pie enabled and apparently that's a a bit fucky on mingw-w64, so even the simplest hello.exe wouldn't work unless it was compiled with -static), got a working meson.build setup for mkxp (tested in linux and mingw-w64, both amd64 build) which for windows uses the above listed side-by-side assemblies technique, putting the needed dlls into a runtime subdir of the game folder. |
@ntzrmtthihu777 Can you open a new issue for this? This one is bursting at the seams already. |
…Solution Additional Solution for Portals Puzzle:
Add the ability to set Input::text_input using Input::set_text_input(str)
been fiddling with building mkxp on windows, after catching a stray uint and trying again, it seems the main issue regarding building on windows is a
gmtime_r
conflict that occurs upon inclusion of ruby'swin32.h
The exact error generated can be found in this gist:
https://gist.github.com/ntzrmtthihu777/e81aaa9cd95277bf9991#file-gistfile1-txt
Note: compiled with clang/clang++ for more verbose error output.
The text was updated successfully, but these errors were encountered: