tux4kids / tuxmath

Other
41 stars 22 forks source link

spreading tuxmath in Africa, need help to compile windows version. #12

Open ptitnuagebko opened 4 years ago

ptitnuagebko commented 4 years ago

Hi to the Tuxmath team,

I'm working on a project, named "Afrikalan", aiming to spread free educational software in Mali, Africa. More than 70 libraries (mostly school libraries, but also public libraries) have been equipped with raspberry pi based educational computers. (our project website is: http://www.afrikalan.org)

Tuxmath is part of the embedded software and is really appreciated by children. You can see it in action here: https://download.tuxfamily.org/afrikalan/videos/en_utilisation_web.mp4

We try to adapt the softwares on our computers to match the reality of the places we give it. I had to make some minor change in the tuxmath code:

The fact is that librarians in Mali are not used to help the children selecting an activity matching their educational needs. This can end up with 7th grade children playing with "sums 1 to 5", for example.

The change i made is allowing the game to have many /usr/local/share/tuxmath/missions/lessons folder, then linking to then in main_menu.xml, so that when a child start the program, it will let him choose his grade, and then it will offer him/her the activities matching his grade. We made this work with education professionals in Mali to make it match with the school program of Mali.

The thing compile and works perfectly under Linux (so we can use it on our raspberry pis). But we also like to distribute the windows version: many schools already have windows computers and ask us to install tuxmath on it, and i would like to offer them the modified version, matching the malian school program.

I spent many days trying to compile Tuxmath on windows, with no luck so far...

I made différents tries with Debian and/or unbuntu: -i tried the "official" compiling was with buildw32/setup_mingw-cross-env.sh , but the script fails downloading dependencies that are not on the remote server anymore (404 errors) -I tried installing the mingw-w64 package for the distro (Debian or Unbuntu), but failed with missing SDL in the mingw-w64 chain -I installed MXE following instruction from https://mxe.cc, and started to cross compile trought it, but there seem to be some problems with SDL:

[...]
/opt/mxe/usr/i686-w64-mingw32.static/lib/../lib/libSDL_mixer.a(music_modplug.o): In function `modplug_setvolume':
/opt/mxe/tmp-sdl_mixer-i686-w64-mingw32.static/SDL_mixer-1.2.12.build_/../SDL_mixer-1.2.12/music_modplug.c:74: undefined reference to `ModPlug_SetMasterVolume'
/opt/mxe/usr/i686-w64-mingw32.static/lib/../lib/libSDL_mixer.a(music_modplug.o): In function `modplug_jump_to_time':
/opt/mxe/tmp-sdl_mixer-i686-w64-mingw32.static/SDL_mixer-1.2.12.build_/../SDL_mixer-1.2.12/music_modplug.c:236: undefined reference to `ModPlug_Seek'

If you can provide me a working way of compiling tuxmath for windows, it may help a lot of children here :-) I would like to know how could i can setup a solution (what distro, with tuxpaint source files/version, witch toolchain?), for cross-compiling tuxmath working as of 2020 :-)

My contact is: julien.marin@afrikalan.org

I'll also be glad to share the small improvements i made to tuxmath.

deepakagg commented 4 years ago

Hi,

Thanks for reporting the above issue. I will try to compile the window version on my end and send you the updated commands. It would be great if you open a fork or PR of the updated codebase so we can generate a distribution customized for Malian school program.

Thanks

ptitnuagebko commented 4 years ago

Hi, thanks for your fast answer,

I found a workaround for compiling the windows version using a "time-travel trick": I guessed that debian 6 (squeeze) was the up to date version then the compilation procedure was made, So i used deboottrap+chroot to get it working on my machine and voila :-)

I had to struggle with mingw-cross-env because many urls it used to download source files were outdated and needed to be replaced, but finaly i could make it work so everything is fine for me...

Anyway it's still a good thing to make Tuxmath able compile with today's compilers.

Of course I'd like to share the small changes i made to the code. I imagine i have to click the "fork" button, push my changes to the forked repo (on my account), then opening a pull request? (sorry, i'm not used to github)

Julien

deepakagg commented 4 years ago

Yes that's right