nsis: add deps.txt file in installer

This helps track package version that were used during the
build of Windows installer. It's not ideal, but make up the
lack of package management on windows
This commit is contained in:
Marc-André Lureau 2012-06-05 21:30:18 +02:00
parent e5895ce49f
commit 08db836b13
3 changed files with 24 additions and 0 deletions

View File

@ -57,4 +57,10 @@ gen-ChangeLog:
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
fi
if OS_WIN32
.PHONY: nsis
nsis:
make -C $(builddir)/data virt-viewer-$(VERSION).exe
endif
-include $(top_srcdir)/git.mk

View File

@ -5,4 +5,17 @@ EXTRA_DIST = \
virt-viewer.nsis.in \
$(NULL)
if OS_WIN32
deps.txt:
$(AM_V_GEN)rpm -qa | grep $(host_os) | sort | unix2dos > $@
virt-viewer-$(VERSION).exe: virt-viewer.nsis deps.txt
$(AM_V_GEN)DESTDIR=`mktemp -d` && \
make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
rm -rf $$DESTDIR
CLEANFILES = deps.txt virt-viewer-$(VERSION).exe
endif
-include $(top_srcdir)/git.mk

View File

@ -49,6 +49,9 @@ Section "VirtViewer"
SectionIn RO
WriteRegStr HKCU "Software\virt-viewer" "" $INSTDIR
SetOutPath "$INSTDIR"
File "deps.txt"
SetOutPath "$INSTDIR\bin"
File "@prefix@/bin/gst-discoverer-0.10.exe"
File "@prefix@/bin/gst-feedback.exe"
@ -321,6 +324,8 @@ Section "Uninstall"
Delete /rebootok "$INSTDIR\bin\libatk-1.0-0.dll"
RMDir "$INSTDIR\bin"
RMDir "$INSTDIR\lib"
Delete /rebootok "$INSTDIR\deps.txt"
RMDir "$INSTDIR"
SectionEnd