Load fluidsynth entrypoints dynamically (and make them optional)
This removes the static dependency on fluidsynth being present at buildtime (even headers aren't needed anymore). Even though midi is a default format for the RPG XP/VX series, it has fallen more and more out of use, with VX Ace completely abandoning it from the RTP and making ogg vorbis the de facto standard. Midi support is kept for legacy reasons, but isn't encouraged. On top of all this, fluidsynth together with glib is a heavy dependency that often times won't even be used. Making it optional at build time is an attempt to unify and keep build config fragmentation low. In RGSS3, fluidsynth / midi is not initialized at all by default, but rather on demand when either a midi track is played back or Audio.setup_midi is called.
This commit is contained in:
parent
673a25f811
commit
757a1d5e39
13 changed files with 223 additions and 120 deletions
|
@ -60,7 +60,6 @@ This binding only exists for testing purposes and does nothing (the engine quits
|
|||
* SDL_sound (latest hg, apply provided patches!)
|
||||
* vorbisfile
|
||||
* pixman
|
||||
* fluidsynth (if midi enabled)
|
||||
* zlib (only ruby bindings)
|
||||
* OpenGL header (alternatively GLES2 with `DEFINES+=GLES2_HEADER`)
|
||||
* libiconv (on Windows, optional with INI_ENCODING)
|
||||
|
@ -72,7 +71,7 @@ qmake will use pkg-config to locate the respective include/library paths. If you
|
|||
|
||||
The exception is boost, which is weird in that it still hasn't managed to pull off pkg-config support (seriously?). *If you installed boost in a non-standard prefix*, you will need to pass its include path via `BOOST_I` and library path via `BOOST_L`, either as direct arguments to qmake (`qmake BOOST_I="/usr/include" ...`) or via environment variables. You can specify a library suffix (eg. "-mt") via `BOOST_LIB_SUFFIX` if needed.
|
||||
|
||||
Midi support is enabled by default; you can disable it via `qmake CONFIG+=DISABLE_MIDI`, in which case the fluidsynth dependency is dropped. When building fluidsynth yourself, you can disable almost all options (audio drivers etc.) as they are not used. Note that upstream fluidsynth has support for sharing soundfont data between synthesizers (mkxp uses multiple synths), so if your memory usage is very high, you might want to try compiling fluidsynth from git master.
|
||||
Midi support is enabled by default and requires fluidsynth to be present at runtime (not needed for building); if mkxp can't find it at runtime, midi playback is disabled. It looks for `libfluidsynth.so.1` on Linux, `libfluidsynth.dylib.1` on OSX and `fluidsynth.dll` on Windows, so make sure to have one of these in your link path. If you still need fluidsynth to be hard linked at buildtime, use `CONFIG+=SHARED_FLUID`. When building fluidsynth yourself, you can disable almost all options (audio drivers etc.) as they are not used. Note that upstream fluidsynth has support for sharing soundfont data between synthesizers (mkxp uses multiple synths), so if your memory usage is very high, you might want to try compiling fluidsynth from git master.
|
||||
|
||||
By default, mkxp switches into the directory where its binary is contained and then starts reading the configuration and resolving relative paths. In case this is undesired (eg. when the binary is to be installed to a system global, read-only location), it can be turned off by adding `DEFINES+=WORKDIR_CURRENT` to qmake's arguments.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue