gchar **
a_get_viking_data_path()
{
+#ifdef WINDOWS
+ // Try to use from the install directory - normally the working directory of Viking is where ever it's install location is
+ const gchar *xdg_data_dirs = "./data";
+ //const gchar *xdg_data_dirs = g_strdup ( "%s/%s/data", g_getenv("ProgramFiles"), PACKAGE );
+#else
const gchar *xdg_data_dirs = g_getenv("XDG_DATA_DIRS");
+#endif
if (xdg_data_dirs == NULL)
{
/* Default value specified in
xdg_data_dirs = "/usr/local/share/:/usr/share/";
}
gchar **data_path = g_strsplit(xdg_data_dirs, ":", 0);
+#ifndef WINDOWS
/* Append the viking dir */
gchar **path;
for (path = data_path ; *path != NULL ; path++)
*path = g_build_filename(dir, PACKAGE, NULL);
g_free(dir);
}
+#endif
return data_path;
}
:: ATM this relies on being generated by an external system\r
%MYCOPY% ..\help\C\viking.pdf %DESTINATION%\r
\r
+echo Copying Extension Configuration Data\r
+mkdir %DESTINATION%\data\r
+%MYCOPY% ..\data\*.xml %DESTINATION%\data\r
\r
echo Copying Libraries\r
set MINGW=C:\MinGW\r