(Rename sources for RPC servers)
[moonshot-ui.git] / Makefile.am
index 4df40bb..ec0fc4b 100644 (file)
@@ -21,13 +21,16 @@ 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
-AM_CFLAGS += -mwindows
+src_moonshot_CFLAGS = -mwindows
 AM_VALAFLAGS += --define=OS_WIN32
 endif
 
@@ -42,9 +45,8 @@ AM_VALAFLAGS += \
 noinst_HEADERS = src/moonshot-msrpc.h
 
 src_moonshot_SOURCES += \
-        src/moonshot-msrpc-server.vala \
+        src/moonshot-server-msrpc.vala \
         src/moonshot-msrpc_s.c \
-        src/moonshot-msrpc-vala.c \
         src/moonshot-msrpc.vapi
 
 bin_PROGRAMS += src/msrpc-client
@@ -52,7 +54,6 @@ bin_PROGRAMS += src/msrpc-client
 src_msrpc_client_SOURCES = \
         src/msrpc-client.vala \
         src/moonshot-msrpc_c.c \
-        src/moonshot-msrpc-vala.c \
         src/moonshot-msrpc.vapi
 
 src_msrpc_client_LDADD = \
@@ -67,15 +68,24 @@ src/moonshot-msrpc.h: src/moonshot-msrpc.idl src/moonshot-msrpc.acf
 
 src/moonshot-msrpc_s.c: src/moonshot-msrpc.h
 
-else
+endif
+
+if IPC_DBUS
 
-# 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
+src_moonshot_SOURCES += src/moonshot-server-dbus.vala
 
 bin_PROGRAMS += src/dbus-client
 
@@ -85,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