* Add -no-undefined so mingw-ld will generate dlls
* Make gis_test static so we don't have double copies if the plugins
when they're loaded.
* Add gdk_threads_enter to opengl_start (to match opengl_end)
* Various debugging messages
-AM_CFLAGS = -Wall --std=gnu99
+AM_CFLAGS = -Wall --std=gnu99
AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
AM_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
AM_LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(SOUP_LIBS)
libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DPKGDATADIR="\"$(datadir)/gis\"" -DPLUGINSDIR="\"$(libdir)/gis\""
libgis_la_LIBADD = $(AM_LDADD)
libgis_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DPKGDATADIR="\"$(datadir)/gis\"" -DPLUGINSDIR="\"$(libdir)/gis\""
libgis_la_LIBADD = $(AM_LDADD)
+libgis_la_LDFLAGS = -no-undefined
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgis.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgis.pc
bin_PROGRAMS = gis_test wms_test
gis_test_SOURCES = gis_test.c gis.h
bin_PROGRAMS = gis_test wms_test
gis_test_SOURCES = gis_test.c gis.h
-gis_test_LDFLAGS = -static
gis_test_LDADD = $(AM_LDADD) libgis.la
wms_test_SOURCES = wms_test.c gis-world.c gis-world.h gis-wms.c gis-wms.h gis-tile.c gis-tile.h
gis_test_LDADD = $(AM_LDADD) libgis.la
wms_test_SOURCES = wms_test.c gis-world.c gis-world.h gis-wms.c gis-wms.h gis-tile.c gis-tile.h
{
g_assert(GIS_IS_OPENGL(self));
{
g_assert(GIS_IS_OPENGL(self));
GdkGLContext *glcontext = gtk_widget_get_gl_context(GTK_WIDGET(self));
GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(GTK_WIDGET(self));
GdkGLContext *glcontext = gtk_widget_get_gl_context(GTK_WIDGET(self));
GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable(GTK_WIDGET(self));
{
g_debug("GisPlugins: load %s", name);
gchar *path = g_strdup_printf("%s/%s.%s", self->dir, name, G_MODULE_SUFFIX);
{
g_debug("GisPlugins: load %s", name);
gchar *path = g_strdup_printf("%s/%s.%s", self->dir, name, G_MODULE_SUFFIX);
+ g_debug("GisPlugins: load - trying %s", path);
if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
g_free(path);
path = g_strdup_printf("%s/%s.%s", PLUGINSDIR, name, G_MODULE_SUFFIX);
}
if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
g_free(path);
path = g_strdup_printf("%s/%s.%s", PLUGINSDIR, name, G_MODULE_SUFFIX);
}
+ g_debug("GisPlugins: load - trying %s", path);
if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
g_warning("Module %s not found", name);
g_free(path);
return NULL;
}
if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
g_warning("Module %s not found", name);
g_free(path);
return NULL;
}
- GModule *module = g_module_open(path, 0);
+ GModule *module = g_module_open(path, G_MODULE_BIND_LAZY);
g_free(path);
if (module == NULL) {
g_warning("Unable to load module %s: %s", name, g_module_error());
g_free(path);
if (module == NULL) {
g_warning("Unable to load module %s: %s", name, g_module_error());
void gis_wms_soup_chunk_cb(SoupMessage *message, SoupBuffer *chunk, gpointer _file)
{
FILE *file = _file;
void gis_wms_soup_chunk_cb(SoupMessage *message, SoupBuffer *chunk, gpointer _file)
{
FILE *file = _file;
- if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
+ if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code)) {
+ g_warning("GisWms: soup_chunk_cb - soup failed with %d", message->status_code);
goffset total = soup_message_headers_get_content_length(message->response_headers);
if (fwrite(chunk->data, chunk->length, 1, file) != 1)
g_warning("GisWms: soup_chunk_cb - eror writing data");
goffset total = soup_message_headers_get_content_length(message->response_headers);
if (fwrite(chunk->data, chunk->length, 1, file) != 1)
g_warning("GisWms: soup_chunk_cb - eror writing data");
/* Download file */
gchar *uri = _make_uri(self, tile);
/* Download file */
gchar *uri = _make_uri(self, tile);
+ g_debug("GisWms: make_local - fetching %s", uri);
SoupMessage *message = soup_message_new("GET", uri);
g_signal_connect(message, "got-chunk", G_CALLBACK(gis_wms_soup_chunk_cb), file);
soup_message_headers_set_range(message->request_headers, ftell(file), -1);
int status = soup_session_send_message(self->soup, message);
SoupMessage *message = soup_message_new("GET", uri);
g_signal_connect(message, "got-chunk", G_CALLBACK(gis_wms_soup_chunk_cb), file);
soup_message_headers_set_range(message->request_headers, ftell(file), -1);
int status = soup_session_send_message(self->soup, message);
+ if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
+ g_warning("GisWms: make_local - soup failed with %d", message->status_code);
g_free(uri);
/* Clean up */
g_free(uri);
/* Clean up */
gdk_threads_leave();
gis_plugins_load(plugins, "bmng", world, view, opengl, prefs);
gdk_threads_leave();
gis_plugins_load(plugins, "bmng", world, view, opengl, prefs);
- gis_plugins_load(plugins, "srtm", world, view, opengl, prefs);
+ //gis_plugins_load(plugins, "srtm", world, view, opengl, prefs);
gis_view_set_site(view, "KLSX");
gis_view_set_site(view, "KLSX");
AM_CFLAGS = -Wall --std=gnu99 -I../
AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
AM_CFLAGS = -Wall --std=gnu99 -I../
AM_CPPFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(SOUP_CFLAGS)
-AM_LDFLAGS = -module -avoid-version
+AM_LDFLAGS = -module -avoid-version -no-undefined
LIBS = $(top_srcdir)/src/libgis.la
pluginsdir = "$(libdir)/gis"
LIBS = $(top_srcdir)/src/libgis.la
pluginsdir = "$(libdir)/gis"
data->self = self;
data->tile = tile;
data->pixbuf = gdk_pixbuf_new_from_file(path, NULL);
data->self = self;
data->tile = tile;
data->pixbuf = gdk_pixbuf_new_from_file(path, NULL);
+ if (!data->pixbuf)
+ g_warning("GisPluginBmng: _load_tile - Error loading pixbuf %s", path);
g_free(path);
g_idle_add_full(G_PRIORITY_LOW, _load_tile_cb, data, NULL);
g_debug("GisPluginBmng: _load_tile end %p", g_thread_self());
g_free(path);
g_idle_add_full(G_PRIORITY_LOW, _load_tile_cb, data, NULL);
g_debug("GisPluginBmng: _load_tile end %p", g_thread_self());