About Monkey 2 › Forums › Monkey 2 Development › compiling with wine
This topic contains 4 replies, has 3 voices, and was last updated by
codifies
2 years, 4 months ago.
-
AuthorPosts
-
November 20, 2016 at 5:12 pm #5277
works! which is a blessing as I don’t need to suffer windows to build projects
I had tried it with a mojo sample but that didn’t seem to completely work when the resultant exe was run with wine… but that might have been with the previous mx2 version
anyhoo I tried again but this time with an SDL window just using “raw” GLES and not only does the compiled exe work with wine but after emailing it to a friend it seem to work on windows too (you never know) curiously no sdl dll required?
It would be a real luxury if ted2 could make exe’s on Linux too, but its not a terrible chore to run wine with windows version… (there does seem to be a path issue when trying to compile a mod with the mx2cc exe in the Linux version of mx2)
Just thought ppl might find it interesting or might have just assumed it wouldn’t work…
November 21, 2016 at 5:10 am #5285By design it’s impossible to do that, however there are clever workarounds. Wine is such clever workaround. I don’t know if there’s other alternative.
The most standard one is going for the “automated builds” (you would write a Python script to execute shell commands). Once you run various virtual machines and let them do daily builds you might suffer less from manual effort.
November 21, 2016 at 7:28 am #5296Just happy the windows version of ted makes working windows exe’s with wine !
November 28, 2016 at 11:31 am #5473It would be a real luxury if ted2 could make exe’s on Linux too
It should be possible to use the mingw64w cross-compiler, but there could be a few caveats.
- The cross-compiler chosen has to be able to compile the generated C++, so it has to support any C++11 features Mark has implemented. This is tricky on Linux as each distribution and their release will use a version of GCC that they consider to be stable at the time of release. Installing a different one requires a bit of work.
- You will need to ensure that you have compatible Windows versions of any external dynamic link library built and setup in the search path.
- Both mx2cc and Ted2 will need to be modified. mx2cc will have to be tricked as it were, into believing that it was compiling in a Windows environment. Ted would just need a few addition menu items to pass a cross-compile switch to mx2cc.
- You will need WINE installed to test out cross compiled application, but the WINE configuration files will need to be manually tweaked to stop issues where key run-time dynamic link libraries cannot be found.
As an example check out https://github.com/dawlane/dawlane-monkeyx-custom
Note that you will have to build the MonkeyX stuff from scratch.
December 2, 2016 at 10:37 pm #5552@dawlane, nah you just compile using wine and the mingw compiler included with the windows version of mx2 – simples…
in fact if I can be bothered I could probably nail together a Makefile that could do it
[/crayon]Monkey1[crayon-5cba84406af5f923415142 inline="true" ]make windows SRC=AAAgame.monkey2[/crayon]Monkey1[crayon-5cba84406af65645153809 inline="true" ]make linux SRC=AAAgame.monkey2and so on…
-
AuthorPosts
You must be logged in to reply to this topic.