Re: Writing portable code



Hi,

look here: http://library.gnome.org/devel/glibmm/stable/group__MiscUtils.html#ga9412ea70c7fea058c03211dac318f8e6 This functions return a string usable with Gio::File or Gio::Dir (file:///c/Documents and Settings/USERNAME/)

Moreover Gio::File can handle Windows-file-names, so you can read environment-variables containing the directories you need.

With regards,

Michi

Hi folks,


Please, I'd like to know some tips to write portable gtkmm code that would compile and run in Linux, Windows, MacOS etc.

My first question is: what is an easy way to determine the user configuration directory, like ~/.config or C:\Documents and Settings\Username\Application Data\? Does Gtkmm, Glib or anything have any support to determine this kind of information, like system details, directory separator, etc.?


Thanks,


Esdras



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]