]> git.sesse.net Git - vlc/blobdiff - extras/package/win32/msi.mak
msi: pass the target architecture as parameter to candle
[vlc] / extras / package / win32 / msi.mak
index 4cfaf1d2aa7c56d98d3705444a480527e67d2e86..31d141fa501bfb6ba66fec79c425e232673b22d3 100644 (file)
@@ -1,26 +1,36 @@
-WIXPATH=`winepath -u 'C:\\Program Files\\Windows Installer XML v3.5\\bin'`
+if HAVE_WIN32
+BUILT_SOURCES_distclean += \
+       extras/package/win32/msi/config.wxi
+endif
+
+WIXPATH=`winepath -u 'C:\\Program Files (x86)\\Windows Installer XML v3.5\\bin'`
 HEAT=wine "$(WIXPATH)/heat.exe"
 CANDLE=wine "$(WIXPATH)/candle.exe"
 LIGHT=wine "$(WIXPATH)/light.exe"
-VLCDIR=`winepath -w '$(win32_destdir)'`
+VLCDIR=`winepath -s \`winepath -w '$(win32_destdir)'\``
 MSIDIR=$(abs_srcdir)/extras/package/win32/msi
 W_MSIDIR=`winepath -w '$(MSIDIR)'`
 MSIBUILDDIR=$(abs_top_builddir)/extras/package/win32/msi
 W_MSIBUILDDIR=`winepath -w '$(MSIBUILDDIR)'`
+MSIOUTFILE=vlc-$(VERSION).msi
+WINE_C=`winepath c:`
 
-packagemsi: heat candle light
+package-msi: heat candle light
 
-heat:
+heat: package-win-strip
        $(HEAT) dir $(VLCDIR)/plugins -cg CompPluginsGroup -gg -scom -sreg -sfrag -srd -dr PLUGINSDIR -out $(W_MSIBUILDDIR)/Plugins.fragment.wxs
        $(HEAT) dir $(VLCDIR)/locale -cg CompLocaleGroup -gg -scom -sreg -sfrag -srd -dr LOCALEDIR -out $(W_MSIBUILDDIR)/Locale.fragment.wxs
        $(HEAT) dir $(VLCDIR)/lua -cg CompLuaGroup -gg -scom -sreg -sfrag -srd -dr LUADIR -out $(W_MSIBUILDDIR)/Lua.fragment.wxs
        $(HEAT) dir $(VLCDIR)/skins -cg CompSkinsGroup -gg -scom -sreg -sfrag -srd -dr SKINSDIR -out $(W_MSIBUILDDIR)/Skins.fragment.wxs
 
 candle:
-       $(am__cd) $(MSIBUILDDIR) && $(CANDLE) -ext WiXUtilExtension $(W_MSIDIR)\\product.wxs $(W_MSIDIR)\\axvlc.wxs $(W_MSIDIR)\\extensions.wxs $(W_MSIBUILDDIR)\\*.fragment.wxs
+       $(am__cd) $(MSIBUILDDIR) && $(CANDLE) -arch $(WINDOWS_ARCH) -ext WiXUtilExtension $(W_MSIDIR)\\product.wxs $(W_MSIDIR)\\axvlc.wxs $(W_MSIDIR)\\extensions.wxs $(W_MSIBUILDDIR)\\*.fragment.wxs
 
 light:
-       $(LIGHT) -sval -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -b $(W_MSIDIR) -b $(VLCDIR)/plugins -b $(VLCDIR)/locale -b $(VLCDIR)/lua -b $(VLCDIR)/skins $(W_MSIBUILDDIR)\\product.wixobj $(W_MSIBUILDDIR)\\axvlc.wixobj $(W_MSIBUILDDIR)\\extensions.wixobj $(W_MSIBUILDDIR)\\*.fragment.wixobj -o vlc-$(VERSION).msi
+       test ! -d "$(WINE_C)/v" -o ! -f "$(WINE_C)/v"
+       ln -sf "$(win32_destdir)" "$(WINE_C)"/v
+       $(LIGHT) -sval -ext WixUIExtension -ext WixUtilExtension -cultures:en-us -b $(W_MSIDIR) -b C:/v/plugins -b C:/v/locale -b C:/v/lua -b C:/v/skins $(W_MSIBUILDDIR)\\product.wixobj $(W_MSIBUILDDIR)\\axvlc.wixobj $(W_MSIBUILDDIR)\\extensions.wixobj $(W_MSIBUILDDIR)\\*.fragment.wixobj -o $(MSIOUTFILE)
+       chmod 644 $(MSIOUTFILE)
 
 cleanmsi:
        -rm -f $(MSIBUILDDIR)/*.wixobj
@@ -28,4 +38,6 @@ cleanmsi:
        -rm -f $(MSIBUILDDIR)/*.fragment.wxs
 
 distcleanmsi: cleanmsi
-       -rm -f vlc-installer.msi
+       -rm -f $(MSIOUTFILE)
+
+.PHONY: heat candle light cleanmsi distcleanmsi package-msi