Using glib in a cross-platform game
- From: Victor Aurélio Santos <victoraur santos gmail com>
- To: gtk-list gnome org
- Subject: Using glib in a cross-platform game
- Date: Wed, 27 Mar 2019 22:53:56 -0300
I'm working in a cross-platform game and got in a point that i have to
create a configuration file, that should be written in right place for
each platform.
This game previous uses SDL 1.2, I do a lot of working and port it to
SDL 2. In SDL2 there's `SDL_GetPrefPath` that looks good at least
until i see it's output (Linux):
/home/victor/.local/share/{game_name}/
I was expecting something like this (Linux):
/home/victor/.config/{game_name}/
So i started a search for a lightweight, well-known, cross-platform
friend library that can do the work and got almost nothing.
In my search i got two ways not lightweight, that should do the job:
- boost::filesystem
- Qt
and seeing Qt, I can't forget Gtk/Gdk/Gio/Glib.
Glib can do this work and more! e.g. i'm using `cxxopts` to parse
command line options (i can replace with glib), i do a lot of string
manipulation that glib can simplify.
my real questions is: does glib worth the new dependency in my game?
does glib is cross-platform friend?
Thanks in anyway and sorry for my english.
--
Victor Aurélio Santos
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]