*.bz2
*.gz
+*.exe
*~
+gtk/
+build/
/arg-nonnull.h
/c++defs.h
/warn-on-use.h
test: all
(cd src && make test)
+build: all
+ export DESTDIR="`pwd`/build"; \
+ make -C ../aweather-win32 install; \
+ make -C ../libgis-win32 install; \
+ make -C ../rsl-win32 install;
+
+installers: $(PACKAGE)-$(VERSION).exe $(PACKAGE)-$(VERSION)-gtk.exe
+
+$(PACKAGE)-$(VERSION).exe: build
+ makensis -DVERSION=$(VERSION) aweather.nsi
+
+$(PACKAGE)-$(VERSION)-gtk.exe: build
+ makensis -DVERSION=$(VERSION) -DUSE_GTK aweather.nsi
+
release: all dist
@echo -en "\nRelease $(PACKAGE)-$(VERSION) (y/n): "
@read ans && [ "$$ans" != "y" ] && exit 1 || exit 0
#!/bin/sh
-gnulib-tool --no-vc-files --import strptime
-
libtoolize
aclocal -I m4
autoconf
--- /dev/null
+!define MULTIUSER_EXECUTIONLEVEL Highest
+!define MULTIUSER_MUI
+!define MULTIUSER_INSTALLMODE_COMMANDLINE
+!define MULTIUSER_INSTALLMODE_INSTDIR AWeather
+!include "MultiUser.nsh"
+!include "MUI2.nsh"
+
+Function .onInit
+ !insertmacro MULTIUSER_INIT
+FunctionEnd
+
+Function un.onInit
+ !insertmacro MULTIUSER_UNINIT
+FunctionEnd
+
+name "AWeather"
+!ifndef VERSION
+ !define VERSION LATEST
+!endif
+!ifdef USE_GTK
+ outFile "aweather-${VERSION}-gtk.exe"
+!else
+ outFile "aweather-${VERSION}.exe"
+!endif
+installDir AWeather
+Icon "data/aweather.ico"
+
+!define MUI_ABORTWARNING
+
+!insertmacro MUI_PAGE_LICENSE "COPYING"
+!insertmacro MULTIUSER_PAGE_INSTALLMODE
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+!insertmacro MUI_LANGUAGE "English"
+
+section "AWeather (required)" SecAWeather
+ SectionIn RO
+
+ setOutPath $INSTDIR
+ file /r build/*
+ !ifdef USE_GTK
+ file /r gtk/*
+ !endif
+
+ StrCmp $MultiUser.InstallMode "AllUsers" 0 +4
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather" "DisplayName" "AWeather"
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather" "UninstallString" "$INSTDIR\uninstaller.exe"
+ Goto +3
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather" "DisplayName" "AWeather"
+ WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather" "UninstallString" "$INSTDIR\uninstaller.exe"
+
+ FileOpen $0 $INSTDIR\instmode.dat w
+ FileWrite $0 $MultiUser.InstallMode
+ FileClose $0
+
+ writeUninstaller $INSTDIR\uninstaller.exe
+sectionEnd
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+!insertmacro MUI_DESCRIPTION_TEXT ${SecAWeather} "AWeather core files."
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+Section "Desktop Icons"
+ setOutPath $INSTDIR\bin
+ CreateShortCut "$DESKTOP\AWeather.exe.lnk" "$INSTDIR\bin\aweather.exe" "" "$INSTDIR\bin\aweather.exe" 0
+SectionEnd
+
+Section "Start Menu Shortcuts"
+ setOutPath $INSTDIR\bin
+ CreateDirectory "$SMPROGRAMS\AWeather"
+ CreateShortCut "$SMPROGRAMS\AWeather\Uninstall AWeather.lnk" "$INSTDIR\uninstaller.exe" "" "$INSTDIR\uninstaller.exe" 0
+ CreateShortCut "$SMPROGRAMS\AWeather\AWeather.lnk" "$INSTDIR\bin\aweather.exe" "" "$INSTDIR\bin\aweather.exe" 0
+SectionEnd
+
+section "Uninstall"
+ FileOpen $0 $INSTDIR\instmode.dat r
+ FileRead $0 $1
+ FileClose $0
+
+ StrCmp $1 "AllUsers" 0 +4
+ SetShellVarContext all
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather"
+ Goto +3
+ SetShellVarContext current
+ DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AWeather"
+
+ delete $DESKTOP\AWeather.exe.lnk
+
+ rmdir /r $SMPROGRAMS\AWeather
+ rmdir /r $INSTDIR
+sectionEnd
# Check for required programs
AC_PROG_CC
gl_EARLY
+LT_PROG_RC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
gl_INIT
AM_CONDITIONAL(HAVE_RSL, test "$RSL_LIBS" != "")
AC_SUBST(RSL_LIBS)
+# Test for Windows vs. Unix
+case "${host}" in
+ *mingw32*) WIN32="yes" ;;
+ *) WIN32="no" ;;
+esac
+if test "$WIN32" = yes; then
+ ac_default_prefix="/"
+fi
+AM_CONDITIONAL([WIN32], test "$WIN32" = "yes")
+
# Output
AC_CONFIG_FILES([
Makefile
lib/Makefile
src/Makefile
+ src/resource.rc
src/plugins/Makefile
data/Makefile
data/main.ui
*.png
+*.ico
aweather
main.ui
configdir = $(datadir)/aweather/
dist_config_DATA = defaults.ini
+if WIN32
+noinst_DATA = aweather.ico
+else
desktopdir = $(datadir)/applications
dist_desktop_DATA = aweather.desktop
pixmapdir = $(datadir)/pixmaps
dist_pixmap_DATA = aweather.png
+endif
.svg.png:
- rsvg $< $@
+ rsvg -w 48 -h 48 $< $@
+.png.ico:
+ icotool -c $< -o $@
maintainer-clean-local:
rm -f Makefile.in
#!/bin/bash
-dir=$(dirname $(readlink -f $0))
-PKG_CONFIG_PATH="../libgis-win32/src/" \
-./autogen.sh \
- "--host=i686-pc-mingw32" \
- "--datadir=Z:$dir/data/" \
- "--libdir=Z:$dir/src/plugins/" \
- CFLAGS="-g -Werror -Wno-unused $CFLAGS"
+gnulib-tool --no-vc-files --import strptime
+
+GIS="/scratch/libgis-win32/src"
+export PKG_CONFIG_PATH="$GIS"
+export LIBS="-L$GIS"
+export CPPFLAGS="-I$GIS"
+export CFLAGS="-g -Werror -Wno-unused -O3"
+./autogen.sh --host=i686-pc-mingw32
--- /dev/null
+AC_DEFUN([gl_EARLY], [])
+AC_DEFUN([gl_INIT], [])
+syscmd([mkdir -p lib/])
+syscmd([touch lib/Makefile.am])
*.o
*.so
*.prof
+*.rc
.deps
.libs
gmon.*
SUBDIRS = plugins
-AM_CFLAGS = -Wall --std=gnu99
+AM_CFLAGS = -Wall --std=gnu99 $(GIS_CFLAGS)
+AM_LDFLAGS = -Wl,--export-dynamic
bin_PROGRAMS = aweather wsr88ddec
aweather_SOURCES = main.c \
aweather-gui.c aweather-gui.h \
aweather-location.c aweather-location.h
aweather_CPPFLAGS = \
- -DPKGDATADIR="\"$(pkgdatadir)\"" \
- -DPLUGINSDIR="\"$(pkglibdir)\""
-aweather_CFLAGS = $(GIS_CFLAGS) $(AM_CFLAGS)
+ -DPKGDATADIR="\"$(dots)$(pkgdatadir)\"" \
+ -DPLUGINSDIR="\"$(dots)$(pkglibdir)\""
aweather_LDADD = $(GIS_LIBS)
wsr88ddec = wsr88ddec.c
-wsr88ddec_CFLAGS = $(GLIB_CFLAGS) $(AM_CFLAGS)
wsr88ddec_LDADD = $(GLIB_LIBS) -lbz2
+if WIN32
+AM_LDFLAGS += -mwindows
+aweather_SOURCES += resource.rc
+dots = ..
+endif
+
+.rc.o: ../data/aweather.ico
+ $(RC) -o $@ $<
+
CLEANFILES = gmon.out valgrind.out
MAINTAINERCLEANFILES = Makefile.in
/*************
* Callbacks *
*************/
-gboolean on_gui_key_press(GtkWidget *widget, GdkEventKey *event, AWeatherGui *self)
+G_MODULE_EXPORT gboolean on_gui_key_press(GtkWidget *widget, GdkEventKey *event, AWeatherGui *self)
{
g_debug("AWeatherGui: on_gui_key_press - key=%x, state=%x",
event->keyval, event->state);
return FALSE;
}
-void on_quit(GtkMenuItem *menu, AWeatherGui *self)
+G_MODULE_EXPORT void on_quit(GtkMenuItem *menu, AWeatherGui *self)
{
gtk_widget_destroy(GTK_WIDGET(self));
}
-void on_zoomin(GtkAction *action, AWeatherGui *self)
+G_MODULE_EXPORT void on_zoomin(GtkAction *action, AWeatherGui *self)
{
gis_viewer_zoom(self->viewer, 3./4);
}
-void on_zoomout(GtkAction *action, AWeatherGui *self)
+G_MODULE_EXPORT void on_zoomout(GtkAction *action, AWeatherGui *self)
{
gis_viewer_zoom(self->viewer, 4./3);
}
-void on_refresh(GtkAction *action, AWeatherGui *self)
+G_MODULE_EXPORT void on_refresh(GtkAction *action, AWeatherGui *self)
{
gis_viewer_refresh(self->viewer);
}
-void on_plugin_toggled(GtkCellRendererToggle *cell, gchar *path_str, AWeatherGui *self)
+G_MODULE_EXPORT void on_plugin_toggled(GtkCellRendererToggle *cell, gchar *path_str, AWeatherGui *self)
{
GtkWidget *tview = aweather_gui_get_widget(self, "prefs_plugins_view");
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tview));
g_free(name);
}
-void on_time_changed(AWeatherGui *self)
+G_MODULE_EXPORT void on_time_changed(AWeatherGui *self)
{
g_debug("AWeatherGui: on_time_changed");
struct tm tm = {};
}
/* Prefs callbacks */
-void on_offline(GtkToggleAction *action, AWeatherGui *self)
+G_MODULE_EXPORT void on_offline(GtkToggleAction *action, AWeatherGui *self)
{
gboolean value = gtk_toggle_action_get_active(action);
g_debug("AWeatherGui: on_offline - offline=%d", value);
gis_viewer_set_offline(self->viewer, value);
}
-void on_initial_site_changed(GtkComboBox *combo, AWeatherGui *self)
+G_MODULE_EXPORT void on_initial_site_changed(GtkComboBox *combo, AWeatherGui *self)
{
gchar *code;
GtkTreeIter iter;
g_free(code);
}
-void on_nexrad_url_changed(GtkEntry *entry, AWeatherGui *self)
+G_MODULE_EXPORT void on_nexrad_url_changed(GtkEntry *entry, AWeatherGui *self)
{
const gchar *text = gtk_entry_get_text(entry);
g_debug("AWeatherGui: on_nexrad_url_changed - url=%s", text);
gis_prefs_set_string(self->prefs, "aweather/nexrad_url", text);
}
-int on_log_level_changed(GtkSpinButton *spinner, AWeatherGui *self)
+G_MODULE_EXPORT int on_log_level_changed(GtkSpinButton *spinner, AWeatherGui *self)
{
gint value = gtk_spin_button_get_value_as_int(spinner);
g_debug("AWeatherGui: on_log_level_changed - %p, level=%d", self, value);
GtkWidget *paned = aweather_gui_get_widget(self, "main_paned");
gtk_widget_destroy(gtk_paned_get_child1(GTK_PANED(paned)));
gtk_paned_pack1(GTK_PANED(paned), GTK_WIDGET(self->viewer), TRUE, FALSE);
+ gtk_widget_set_size_request(GTK_WIDGET(self->viewer), 600, 400);
gtk_widget_show_all(GTK_WIDGET(self));
/* Plugins */
AM_CFLAGS = -Wall --std=gnu99 $(GIS_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib
AM_LDFLAGS = -module -avoid-version -no-undefined
-LIBS = $(GIS_LIBS)
pluginsdir = $(pkglibdir)
level2.c level2.h \
../aweather-colormap.c \
../aweather-location.c
-radar_la_LIBADD = $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
-radar_la_LDFLAGS = $(AM_LDFLAGS) $(RSL_LIBS)
+radar_la_LIBADD = $(RSL_LIBS) $(GIS_LIBS) \
+ $(addprefix $(top_srcdir)/lib/,$(gl_LTLIBOBJS))
endif
test:
site->pconfig = pconfig;
/* Add marker */
- g_idle_add(_site_add_marker, site);
+ g_idle_add_full(G_PRIORITY_LOW, _site_add_marker, site, NULL);
+
/* Connect signals */
site->location_id = g_signal_connect(viewer, "location-changed",
self->sites = g_hash_table_new_full(g_str_hash, g_str_equal,
NULL, (GDestroyNotify)radar_site_free);
self->config = gtk_notebook_new();
- gtk_notebook_set_tab_pos(GTK_NOTEBOOK(self->config), GTK_POS_LEFT);
+ gtk_notebook_set_tab_pos(GTK_NOTEBOOK(self->config), GTK_POS_TOP);
}
static void gis_plugin_radar_dispose(GObject *gobject)
{
--- /dev/null
+#define AWEATHER_ICON 104\r
--- /dev/null
+#include <winver.h>\r
+#include "resource.h"\r
+\r
+VS_VERSION_INFO VERSIONINFO\r
+ FILEVERSION 1,0,0,1\r
+ PRODUCTVERSION 1,0,0,1\r
+ FILEFLAGSMASK 0\r
+ FILEFLAGS 0\r
+ FILEOS VOS__WINDOWS32\r
+ FILETYPE VFT_APP\r
+ FILESUBTYPE VFT2_UNKNOWN\r
+ BEGIN\r
+ BLOCK "StringFileInfo"\r
+ BEGIN\r
+ BLOCK "040904B0"\r
+ BEGIN\r
+ VALUE "CompanyName", "Andy Spencer"\r
+ VALUE "FileDescription", "AWeather"\r
+ VALUE "FileVersion", "@VERSION@"\r
+ VALUE "InternalName", "@PACKAGE@"\r
+ VALUE "LegalCopyright", "Copyright (C) 2008-2010 Andy Spencer"\r
+ VALUE "OriginalFilename", "@ORIGINAL_FILENAME@"\r
+ VALUE "ProductName", "AWeather"\r
+ VALUE "ProductVersion", "@VERSION@"\r
+ END\r
+ END\r
+ BLOCK "VarFileInfo"\r
+ BEGIN\r
+ VALUE "Translation", 0x409, 1200\r
+ END\r
+ END\r
+\r
+AWEATHER_ICON ICON "../data/aweather.ico"\r