Handle concurrent identity requests correctly
[moonshot-ui.git] / Makefile.am
index 82e7a3e..7ff1792 100644 (file)
@@ -4,6 +4,8 @@ SUBDIRS = po
 
 bin_PROGRAMS = src/moonshot
 
+AM_CFLAGS =
+
 AM_CPPFLAGS = \
        -include config.h \
        -DLOCALEDIR=\""$(localedir)"\" \
@@ -19,11 +21,19 @@ src_moonshot_SOURCES = \
         src/moonshot-idcard-widget.vala \
         src/moonshot-custom-vbox.vala \
         src/moonshot-identities-manager.vala \
-        src/moonshot-window.vala
+        src/moonshot-identity-request.vala \
+        src/moonshot-window.vala \
+        src/moonshot-password-dialog.vala \
+        src/moonshot-utils.vala
 
 src_moonshot_LDADD = \
         $(moonshot_LIBS)
 
+if OS_WIN32
+src_moonshot_CFLAGS = -mwindows
+AM_VALAFLAGS += --define=OS_WIN32
+endif
+
 if IPC_MSRPC
 
 AM_CPPFLAGS += -Isrc
@@ -39,6 +49,16 @@ src_moonshot_SOURCES += \
         src/moonshot-msrpc_s.c \
         src/moonshot-msrpc.vapi
 
+bin_PROGRAMS += src/msrpc-client
+
+src_msrpc_client_SOURCES = \
+        src/msrpc-client.vala \
+        src/moonshot-msrpc_c.c \
+        src/moonshot-msrpc.vapi
+
+src_msrpc_client_LDADD = \
+        $(moonshot_LIBS)
+
 BUILT_SOURCES = src/moonshot-msrpc.h src/moonshot-msrpc_s.c src/moonshot-msrpc_c.c
 
 DISTCLEANFILES = ${BUILT_SOURCES}
@@ -52,8 +72,17 @@ else
 
 # IPC_DBUS
 
+# DBus service file
+dbusservicedir = $(datadir)/dbus-1/services
+dbusservice_in_files = org.janet.Moonshot.service.in
+dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
+
+# Rule to make the service file with bindir expanded
+$(dbusservice_DATA): $(dbusservice_in_files) Makefile
+       @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
+
 AM_VALAFLAGS += \
-       --pkg dbus-glib-1
+       --pkg dbus-glib-1 \
        --define=IPC_DBUS
 
 src_moonshot_SOURCES += src/moonshot-dbus-server.vala
@@ -66,4 +95,38 @@ src_dbus_client_SOURCES = \
 src_dbus_client_LDADD = \
         $(moonshot_LIBS)
 
+CLEANFILES = $(dbusservice_DATA)
+EXTRA_DIST = $(dbusservice_in_files)
+
+endif
+
+
+if OS_WIN32
+
+## A couple of Windows-specific targets:
+
+## 1. Icons. You must have gnome-icon-theme and gnome-icon-theme-symbolic installed
+##    in c:/build prefix; and ImageMagick installed in c:/tools/ImageMagick. This
+##    pulls in the icons required by moonshot and converts svg's to png's (we have
+##    no svg support built in to Windows Gtk+ right now).
+
+icons:
+       mkdir -p share/icons
+       cp c:/build/share/icons/gnome/48x48/status/avatar-default.png share/icons
+       "${IMAGEMAGICK_CONVERT}" -background none c:/build/share/icons/gnome/scalable/actions/edit-clear-symbolic.svg -size 13x13 share/icons/edit-clear-symbolic.png
+       "${IMAGEMAGICK_CONVERT}" -background none c:/build/share/icons/gnome/scalable/actions/edit-find-symbolic.svg -size 13x13 share/icons/edit-find-symbolic.png
+
+
+## 2. Installer. You must have the Windows Installer XML toolkit version 3.5
+##    installed in its default path. Note that this requires at least .NET
+##    runtime with service packs 1 and 2. The installer picks up files from
+##    the build prefix and mingw dir; you must change these if you have them
+##    in different locations I'm afraid.
+
+installer: moonshot.msi
+
+moonshot.msi: windows/app.wxs
+       "${WIX_CANDLE}" $<
+       "${WIX_LIGHT}" -b c:/build -b c:/tools/mingw -o moonshot.msi app.wixobj
+
 endif