Tor Lillqvist wrote:
Dan McMahill writes:
> On windows, it is easy for the user to pick a different place to
> install so I need to set those variables.
> So my question is how do gtk apps ported to windows typically deal with
> something like that?
Typically they assume that all the appl
On 11/6/05, Tor Lillqvist <[EMAIL PROTECTED]> wrote:
> > Another solution for applications is to look at argv[0]. On
> > Windows this is always (I think) the full path to the .exe.
>
> Looking at argv[0] is really not recommended on Windows. If memory
> serves me right, if the path to the applicati
> Another solution for applications is to look at argv[0]. On
> Windows this is always (I think) the full path to the .exe.
Looking at argv[0] is really not recommended on Windows. If memory
serves me right, if the path to the application has spaces in it, it
might even be that depending on the ph
David Necas (Yeti) wrote:
>
>Or have a look at g_win32_get_package_installation_directory().
>Calling it with NULL arguments is usually sufficient. *Not*
>storing the directory in registry has the advantage the app
>can be moved around freely without breaking it (of course,
>if it's not prevented
On 11/5/05, David Necas (Yeti) <[EMAIL PROTECTED]> wrote:
> On Sat, Nov 05, 2005 at 03:40:40PM +0100, Goran Rakić wrote:
> >
> > Put this first:
> >
> > ... (some win32 registry code) ...
>
> Or have a look at g_win32_get_package_installation_directory().
Very neat. Another solution for applicatio
On 05.11.2005., at 16.09, David Necas (Yeti) wrote:
g_win32_get_package_installation_directory
I did not know for this function. It is nice to have it around.
Goran Rakic
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mai
On Sat, Nov 05, 2005 at 03:40:40PM +0100, Goran Rakić wrote:
>
> Put this first:
>
> ... (some win32 registry code) ...
Or have a look at g_win32_get_package_installation_directory().
Calling it with NULL arguments is usually sufficient. *Not*
storing the directory in registry has the advantage
Put this first:
#ifdef WIN32
# include
# include
#endif
And latter in your code...
#ifdef WIN32
// Fallback value: data in working dir
char dbpath[MAX_PATH]="data";
HKEY hkResult;
DWORD DataType;
DWORD DataCount = MAX_PATH;
// Open registry key
if (RegOpen