[Roadster] MySQL Patch (And Config File)

Knight Walker kwalker at kobran.org
Thu Aug 31 13:01:17 PDT 2006


Greetings all,

I believed I had threatened this list with a patch for Roadster that
allows it to be compiled as a regular MySQL client program (i.e. talks
to a MySQL server rather than the embedded one), and while no one has
asked for the patch directly, I've seen several people trying to get
Roadster talking to an external MySQL server, so I am sending this patch
to the list.

It does basically two things:  First, it checks for a .roadster
directory in the user's home directory, then for a "config" file in
there (e.g. ~/.roadster/config) and reads from that file.  It expects to
see things in this format:

-----[.roadster/config]-----
# This is a comment.

[Database]
Type = mysql
Server = mysqlserver.local
Username = roadster
Password = password
Database = roadster
-----[end]-----

It uses the normal GTK g_key_file* routines, and loads into a
roadster_settings global structure (Which I hope will be useful for
future Roadster settings if necessary).

The Type key above can be one of the following: 'mysql' to use an
external MySQL server or 'embedded' to use the embedded server.  If Type
is 'embedded', then the other keys are meaningless, but if it is set to
'mysql' then Server is the MySQL server to communicate with, Username is
the username to use, Password is the password, and Database is the
database Roadster data is contained in.

Currently my patch does not save the ~/.roadster/config file so the file
has to be created and edited by hand, but if you use the above as a
guide, it should work.

-KW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: roadster_mysql.patch
Type: text/x-patch
Size: 9266 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/roadster/attachments/20060831/d386f33f/roadster_mysql.bin


More information about the roadster mailing list