[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer 3/4] nsis: add deps.txt file in installer



On Tue, Jul 24, 2012 at 02:23:10PM +0200, Marc-André Lureau wrote:
> 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
> ---
>  Makefile.am              |    6 ++++++
>  data/Makefile.am         |   13 +++++++++++++
>  data/virt-viewer.nsis.in |    5 +++++
>  3 files changed, 24 insertions(+)
> 
> diff --git a/Makefile.am b/Makefile.am
> index f307c06..2407b1b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -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
> diff --git a/data/Makefile.am b/data/Makefile.am
> index ea2bb0a..38ffdb2 100644
> --- a/data/Makefile.am
> +++ b/data/Makefile.am
> @@ -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 > $@

If $(host_os) is the prefix of the package names you want to match, rpm -qa
"$(host_os)*" is more efficient iirc.

Looks good otherwise even if the deps.txt part is indeed a bit ugly ;)

Christophe

> +
> +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
> diff --git a/data/virt-viewer.nsis.in b/data/virt-viewer.nsis.in
> index f221a20..98ce83a 100644
> --- a/data/virt-viewer.nsis.in
> +++ b/data/virt-viewer.nsis.in
> @@ -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"
> @@ -315,6 +318,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
>  
> -- 
> 1.7.10.4
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list redhat com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: pgpUmwgdmB7NE.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]