Best place to ask questions - Getting started on compiling

For code related discussions and questions
Stu
Greenhorn
Posts: 12
Joined: 26 Aug 2013, 02:03

Re: Best place to ask questions - Getting started on compili

Post by Stu »

Hmm.. do you know if the fix on the buildbot was to not link openal with dsound/DX when building it in the mingw-cross-env (mxe) or is something done when configuring the main warzone build?

The mxe environment where openal is build does not have a ./configure file (only a make that comes down from the git tree), and openal uses cmake.

I grepped and played around with trying to comment out:
stu@desktop:~/Projects/warzone/warzone2100/mingw-cross-env$ grep -Hinr "dsound" *
....
mxe/tmp-openal/openal-soft-1.15.1/config.h.in:48:#cmakedefine HAVE_DSOUND
....

But no dice .. (although maybe I made a mistake rebuilding?)...
Stu
Greenhorn
Posts: 12
Joined: 26 Aug 2013, 02:03

Re: Best place to ask questions - Getting started on compili

Post by Stu »

Ok! Got past the above.
You need to copy the openal package from your ming cross environment into a temporary area:

/home/stu/Projects/warzone/warzone2100/mingw-cross-env/mxe/pkg/openal-soft-1.15.1.tar.bz2 ->
/home/stu/Projects/warzone/warzone2100/mingw-cross-env/mxe/tmp/openal-soft-1.15.1.tar.bz2

Unzip/Untar

Using the mxe/src/openal.mk file as reference I created a build directory:

stu@desktop:~/Projects/warzone/warzone2100/mingw-cross-env/mxe/tmp/openal-soft-1.15.1/build

Edited the file:

/home/stu/Projects/warzone/warzone2100/mingw-cross-env/mxe/tmp/openal-soft-1.15.1/CMakeLists.txt

to turn dsound off:

OPTION(DSOUND "Check for DirectSound backend" On) -> OPTION(DSOUND "Check for DirectSound backend" OFF)

Remove the offending line from source:

stu@desktop:~/Projects/warzone/warzone2100/mingw-cross-env/mxe/tmp/openal-soft-1.15.1$ grep -Hinr "DirectSoundNotify" *
Alc/backends/dsound.c:66: IDirectSoundNotify *Notifies;
Alc/backends/dsound.c:401: IDirectSoundNotify_Release(data->Notifies);
Alc/backends/dsound.c:427: IDirectSoundNotify_Release(data->Notifies);
Alc/backends/dsound.c:592: hr = IDirectSoundBuffer_QueryInterface(data->Buffer, &IID_IDirectSoundNotify, (LPVOID *)&data->Notifies);
Alc/backends/dsound.c:604: if(IDirectSoundNotify_SetNotificationPositions(data->Notifies, device->NumUpdates, notifies) != DS_OK)
Alc/backends/dsound.c:612: IDirectSoundNotify_Release(data->Notifies);
Alc/helpers.c:43:DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf,0x08, 0x00,0xa0,0xc9,0x25,0xcd,0x16);
Binary file build/CMakeFiles/OpenAL32.dir/Alc/helpers.obj matches
Binary file build/openal-info.exe matches
Binary file build/libOpenAL32.a matches
stu@desktop:~/Projects/warzone/warzone2100/mingw-cross-env/mxe/tmp/openal-soft-1.15.1$ vim Alc/helpers.c

(comment out:
//DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf,0x08, 0x00,0xa0,0xc9,0x25,0xcd,0x16);
)

Build warzone..

Now it gets past assembling the main warzone object, and fails when packaging the installer:

SetOutPath: "$INSTDIR\fonts"
File: "/home/stu/Projects/warzone/warzone2100/mingw-cross-env/mxe\etc\fonts\fonts.conf.wd_disable" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)

The above seems like another buggy part of the build that needs some hacks.
I have the above file it's looking for:
stu@desktop:~/Projects/warzone/warzone2100$ locate fonts.conf.wd_disable
/home/stu/Projects/warzone/warzone2100/pkg/nsis/fonts.conf.wd_disable

But the path it's looking in is not only wrong conceptually (in the wrong place), it has the wrong path separators :) !

I'll keep digging.. but getting closer..
Stu
Greenhorn
Posts: 12
Joined: 26 Aug 2013, 02:03

Re: Best place to ask questions - Getting started on compili

Post by Stu »

My bad (on the fonts).. at some point in playing around with openal & the mxe environment I cleared out the fonts. I updated them again (as per the steps on the site), and it was all OK. NSIS translates path separators for you..

stu@desktop:~/Projects/warzone/warzone2100$ ls pkg/nsis/warzone2100*
pkg/nsis/warzone2100-master.exe pkg/nsis/warzone2100.nsi pkg/nsis/warzone2100.update.nsi
stu@desktop:~/Projects/warzone/warzone2100$

Thanks!!!!!!!!!

Now I just need to move on to the real work :D
Post Reply