Config: Convert game title to valid UTF-8 (if it isn't already)

Removes the need to manually convert the Game.ini to UTF-8 every
time with eg. Japanese games. Also, setting the window title on
OSX with invalid UTF-8 crashes.

This functionality and the dependency on libiconv and libguess
are optional and can be enabled with `CONFIG+=INI_ENCODING`.
If turned off and invalid UTF-8 is encountered, the game title
is treated as being empty (ie. the folder name is used instead).
This commit is contained in:
Jonas Kulla 2014-08-20 05:20:07 +02:00
parent 622845a404
commit 10bfcb57b7
5 changed files with 171 additions and 0 deletions

View file

@ -88,6 +88,10 @@ unix {
PKGCONFIG += fluidsynth
}
INI_ENCODING {
PKGCONFIG += libguess
}
# Deal with boost paths...
isEmpty(BOOST_I) {
BOOST_I = $$(BOOST_I)
@ -248,6 +252,10 @@ MIDI {
DEFINES += MIDI
}
INI_ENCODING {
DEFINES += INI_ENCODING
}
defineReplace(xxdOutput) {
return($$basename(1).xxd)
}