Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: cygwin audio
Home

[Freeciv-Dev] Re: cygwin audio

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: cygwin audio
From: swamp-dog@xxxxxxxxxxxx (Guy Harrison)
Date: Mon, 24 Jun 2002 14:41:57 GMT

On Sun, 23 Jun 2002 20:19:55 +0200, Andreas Kemnade
<akemnade@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>Guy Harrison writes:
>
> > Finally some good news: sdl works! Furthermore there are 'configure'
> > options to reduce size substantially. There may be more.
> > 
> > SDL-1.2.4:
> > --disable-video --disable-joystick --disable-cdrom --disable-static
> > 
> > SDL_mixer-1.2.4:
> > --disable-music-cmd --disable-music-mod --disable-music-midi
> > --disable-music-ogg --disable-music-mp3 --disable-static
> > 
> > Only one bug. It can be investigated later when it's verified that
> > SDL.dll and SDL_mixer.dll are stable. For now I make the assumption it
> > will affect MINGW also and it's circumvented (atm) thus...
> > 
> > <audio_sdl.c>
> > static void stop()
> > {
> > /*~~~*/
> > #if defined(__CYGWIN__) || defined(__MINGW32__)
> >     Mix_HaltMusic();
> >     Mix_FreeMusic(mus);
> >     mus=NULL;
> > #else
> > /*~~~*/
> >   /* fade out over 2 sec */
> >   Mix_FadeOutMusic(2000);   <- effectively "NOP" !
> > #endif
> > }
> > </audio_sdl.c>
> > 
> > ...without that change, the startup (looped) sound plays forever behind
> > all the sound effects and drives you nuts. ;-)
>
>Don't use defined(__MINGW32__). Use WIN32_NATIVE. That make life
>easier for people, who want to make their config.h manually for use
>with non-gcc win32 compilers  (and the freeciv style guide wants that)..

Thanks for reminding me. I forgot! ;-)

> > I can't build the MINGW target. No Win32 GTK for a start. Methinks it's
> > time to try it.
>
>I was able to cross compile the stuff on my linux system now. But the same
>fails on a solaris system where I have often successfully 
>cross compiled freeciv, too. It tries to use some M$-tools which are
>not present.Are there
>some strange requirements?

Can you give me a hint where sdl is failing please?

For a guess, take a look at 'sdl-config' because it gets MINGW specific
options options put into it. I have to change it for CygWin/X but you
shouldn't have to.

Thinking about it further, there's a WinMain()->main() wrapper in there.
Manually remove "-Dmain=SDL_main" and "-lSDLmain" for now. We'll figure
out how to do it properly later.

>If there are such requirements, we have to
>put them into ftp://ftp.freeciv.org/freeciv/requirements.
>
>I have not tested building freeciv with SDL yet.

Once I figured out my flavour of sdl-config the build process was
painless.

>Win32 Gtk client:
>I haven't ever tried to build a gtk/X11 client for windows.

Difficult & time consuming. I don't want to ever do it again! :-)

>A gtk client without X11 needs ugly patching (look at the patch for
>1.12.0) for that. The patch does not apply to current cvs. 
>Where are the problems with mingw32 builds? Please tell me where you
>have problems when building it, so I can improve the documentation of
>the build process.

No need for concern. It was the existence of "-mno-cygwin" within my
original sdl-config that triggered an accidental ming32 build. I just
let it carry on out of curiosity and it failed on one of the "dialog"
sourcefiles, almost certainly the first time it came across my GTK/X
headers.

> > I envisage SDL.dll and SDL_mixer.dll being installed into the MINGW
> > civclient.exe folder so that windows will find "ours" first: the
> > end-user may have full versions installed. Indeed they may desire to use
> > their full versions (dunno why - at own risk etc) in which case they
> > simply delete "our" versions.
>
>I would vote for one distribution with sdl/sdl_mixer(installed into
>the freeciv folder) and stdsounds
>(ready to have sound) and one without stdsounds and without sdl/sdl_mixer.
>So windows users don't need to worry about getting sound files. And
>the users, who don't want sound, simply download the version without
>the sound stuff.

Agreed. I can write the dynamic loading code later, should we want it.


-- 
swamp-dog@xxxxxxxxxxxx


[Prev in Thread] Current Thread [Next in Thread]