1 (edited by camthesaxman 2017-04-13 20:15:03)

Topic: Building Neverball on Windows using MSYS2

If anyone wants to contribute to Neverball and only has access to a Windows machine, it can be done using MSYS2, which is a Unix-like environment for Windows that allows you to build Windows software using Unix tools. It can be downloaded here: http://www.msys2.org/

After installing, locate "MSYS2 MinGW 32-bit" in the start menu and click on it. It should be under the 'MSYS2 64bit' or 'MSYS2 32bit' folder. It should open up a terminal window. You'll need to first install the necessary packages for building Neverball, so run this command. It should take a while to download and install everything, so be patient.

pacman -Sy git make mingw-w64-i686-gcc mingw-w64-i686-libpng mingw-w64-i686-libjpeg mingw-w64-i686-physfs mingw-w64-i686-libvorbis mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf mingw-w64-i686-SDL2_image

Once that finishes, clone the git repository.

git clone https://github.com/Neverball/neverball.git neverball

Now, enter the neverball directory and build it.

cd neverball
make PLATFORM=mingw ENABLE_FS=stdio

You can now run the game by typing

./neverball.exe

Caveats:
The physicsfs library is buggy and causes mapc to crash when reading jpeg images, so ENABLE_FS=stdio is needed to work around that problem.

2 (edited by p2013125 2017-04-20 12:10:32)

Re: Building Neverball on Windows using MSYS2

I tried your steps but it's not work .The MSYS2 terminal type this:

 Will make a "devel" build of Neverball 1.6.0-53-f45cb051.
make: sdl2-config: Command not found
make: libpng-config: Command not found
make: sdl2-config: Command not found
make: libpng-config: Command not found
cc -Wall -Wshadow -std=c99 -pedantic -O2   -Ishare -DCONFIG_USER=\"Neverball-dev\" -DCONFIG_DATA=\"./data\" -DCONFIG_LOCALE=\"./locale\" -DENABLE_NLS=1 -DNDEBUG  -MM -MP -MF share/lang.d -MT "share/lang.o" share/lang.c
/bin/sh: cc: command not found
make: *** [Makefile:410: share/lang.o] Error 127 

Can you help me troubleshoot the problem?

I am a HONG KONG PERSON,so my english is not so good tongue
Here is my level contributions:
Crazy Force 5-levels level set. Light Force 5-levels level set.

3

Re: Building Neverball on Windows using MSYS2

need to install gcc... something like

pacman -S gcc

That may not be the specific name of the package that pacman will recognize though.


If that doesnt work do,

pacman -Ss gcc

and copy and paste everything that returns here.



(the '-Ss' basically tells pacman to search for everything related to gcc)

4

Re: Building Neverball on Windows using MSYS2

I tried install gcc but it's not work. MSYS2 terminal type this:                                                                                   

Will make a "devel" build of Neverball 1.6.0-53-f45cb051.
make: sdl2-config: Command not found
make: libpng-config: Command not found
make: sdl2-config: Command not found
make: libpng-config: Command not found
cc -Wall -Wshadow -std=c99 -pedantic -O2   -Ishare -DCONFIG_USER=\"Neverball-dev\" -DCONFIG_DATA=\"./data\" -DCONFIG_LOCALE=\"./locale\" -DENABLE_NLS=1 -DNDEBUG  -MM -MP -MF share/lang.d -MT "share/lang.o" share/lang.c
cc -Wall -Wshadow -std=c99 -pedantic -O2   -Ishare -DCONFIG_USER=\"Neverball-dev\" -DCONFIG_DATA=\"./data\" -DCONFIG_LOCALE=\"./locale\" -DENABLE_NLS=1 -DNDEBUG  -o share/lang.o -c share/lang.c
In file included from share/lang.c:22:0:
share/lang.h:22:21: fatal error: libintl.h: No such file or directory
 #include <libintl.h>
                     ^
compilation terminated.
make: *** [Makefile:411: share/lang.o] Error 1 
I am a HONG KONG PERSON,so my english is not so good tongue
Here is my level contributions:
Crazy Force 5-levels level set. Light Force 5-levels level set.

5 (edited by baboon 2017-05-24 20:59:37)

Re: Building Neverball on Windows using MSYS2

p2013125 wrote:

I tried install gcc but it's not work. MSYS2 terminal type this:                                                                                   

Will make a "devel" build of Neverball 1.6.0-53-f45cb051.
make: sdl2-config: Command not found
make: libpng-config: Command not found
make: sdl2-config: Command not found
make: libpng-config: Command not found
cc -Wall -Wshadow -std=c99 -pedantic -O2   -Ishare -DCONFIG_USER=\"Neverball-dev\" -DCONFIG_DATA=\"./data\" -DCONFIG_LOCALE=\"./locale\" -DENABLE_NLS=1 -DNDEBUG  -MM -MP -MF share/lang.d -MT "share/lang.o" share/lang.c
cc -Wall -Wshadow -std=c99 -pedantic -O2   -Ishare -DCONFIG_USER=\"Neverball-dev\" -DCONFIG_DATA=\"./data\" -DCONFIG_LOCALE=\"./locale\" -DENABLE_NLS=1 -DNDEBUG  -o share/lang.o -c share/lang.c
In file included from share/lang.c:22:0:
share/lang.h:22:21: fatal error: libintl.h: No such file or directory
 #include <libintl.h>
                     ^
compilation terminated.
make: *** [Makefile:411: share/lang.o] Error 1 

I get the same error. Note that to even reach this point I had to update the packages using pacman -Syy and pacman -Su.  Is there any library missing?

6

Re: Building Neverball on Windows using MSYS2

You haven't installed SDL2 and libpng as shown in in the first post. You may also need gettext. Search for packages with "pacman -Ss packagename", the top result is usually the package you need.

7 (edited by baboon 2017-05-25 13:56:11)

Re: Building Neverball on Windows using MSYS2

parasti wrote:

You haven't installed SDL2 and libpng as shown in in the first post. You may also need gettext. Search for packages with "pacman -Ss packagename", the top result is usually the package you need.

parasti wrote:

You haven't installed SDL2 and libpng as shown in in the first post. You may also need gettext. Search for packages with "pacman -Ss packagename", the top result is usually the package you need.

No, I have installed exactly the stuff in the first post:

pacman -Sy git make mingw-w64-i686-gcc mingw-w64-i686-libpng mingw-w64-i686-libjpeg mingw-w64-i686-physfs mingw-w64-i686-libvorbis mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf mingw-w64-i686-SDL2_image

Anyway I have reinstalled SDL2 and libpng and still get the same error:

fatal error: libintl.h: No such file or directory