Create moonshot.wixlib for use by other wix projects.
authorKevin Wasserman <krwasserman@painless-security.com>
Tue, 3 Mar 2015 20:55:20 +0000 (15:55 -0500)
committerKevin Wasserman <krwasserman@hotmail.com>
Wed, 4 Mar 2015 17:19:39 +0000 (12:19 -0500)
Install moonshot.wixlib and moonshot.msi to libdir and bindir
respectively.

Makefile.am
configure.ac

index 89fd2bb..0df22d8 100644 (file)
@@ -242,14 +242,24 @@ icons:
 ## 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.
+##    the prefix, /usr, and /c/mingw directories.
 
 installer: moonshot.msi
 
-moonshot.msi: windows/app.wxs windows/config.wxi $(bin_PROGRAMS)
+moonshot.wixlib: windows/app.wxs windows/config.wxi $(bin_PROGRAMS)
        "${WIX_CANDLE}" $<
-       "${WIX_LIGHT}" -b ${prefix} -b /usr -b /c/mingw -o moonshot.msi app.wixobj
+       "${WIX_LIT}" -bf -b ${prefix} -b /usr -b /c/mingw -out moonshot.wixlib app.wixobj
+
+moonshot.msi: moonshot.wixlib
+       "${WIX_LIGHT}" -o moonshot.msi moonshot.wixlib
+
+## install moonshot.wixlib in libdir (/usr/local/lib)
+wixlibdir = ${libdir}
+wixlib_DATA = moonshot.wixlib
+
+## install moonshot.msi in bindir (/usr/local/bin)
+installerdir = ${bindir}
+installer_DATA = moonshot.msi
 
 endif
 
index 09e97a3..c7183f8 100644 (file)
@@ -172,13 +172,15 @@ if test "$win32" = "yes"; then
                [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
   AC_PATH_PROG([WIX_LIGHT], [light], no,
                [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
+  AC_PATH_PROG([WIX_LIT], [lit], no,
+               [/c/Program\ Files/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR/c/Program\ Files\ \(x86\)/Windows\ Installer\ XML\ v3.5/bin$PATH_SEPARATOR$PATH])
 
-  if test "$WIX_CANDLE" = "no" || test "$WIX_LIGHT" = "no"; then
+  if test "$WIX_CANDLE" = "no" || test "$WIX_LIGHT" = "no" || test "$WIX_LIT" = "no"; then
      AC_MSG_WARN([
 *** Could not find the Windows Installer XML tools. These are required
-*** for the 'make installer' target. Use the WIX_CANDLE and WIX_LIGHT
-*** environment variables to pass their locations if they are outside
-*** the PATH.])
+*** for the 'make installer' target. Use the WIX_CANDLE, WIX_LIGHT,and
+*** WIX_LIT environment variables to pass their locations if they are
+*** outside the PATH.])
   fi
 fi