[vlc-devel] win32 and NSIS problems

Geoffroy Couprie geo.couprie at gmail.com
Wed Mar 10 11:02:55 CET 2010


Hello,

On Wed, Mar 10, 2010 at 10:03 AM, gozer at progrock.com <gozer at progrock.com> wrote:
> Hi,
>
> I'm still using cygwin for generating my work versions of vlc-1.1.0
> (based on the git files) and I have seen some new problems:
>
> - (I'm using NSIS 2.46) the new 'package-win-common' makefile target,
> now copies the UAC NSIS plugin files (UAC.nsh + UAC.dll) from
> extras/package/win32 to the install directory. 10 lines below a global
> rebase is done on all DLLs in this directory (thus including the copy of
> UAC.dll): in this case the UAC.dll is not working anymore during the
> call to makensis !
>

Thank you for spotting the rebase problem!

> - The global nsis script is now using UAC for some magic (!) and now
> (after correcting the step above) vlc is requesting admin rights for
> installing. Is it really normal ? I think it's a major problem because
> up to now anyone could easily install VLC (even if you don't have admin
> rights!). Do you have some explanations ?

The UAC plugin is used to change rights during installation (mainly to
be able to launch VLC as user, not as admin). How could you write
files to c:\Program Files\ or change registry keys in HKCR or HKLM if
you didn't have admin rights?

I can change the NSIS script to allow installation even if you don't
have admin rights. Anyway, on Vista and 7, Windows recognized
automatically the installer and requested admin rights before
executing, so I don't really see the point (and on XP, all the users
run ad Administrator, right? :p).

>
> Anyway the current Makefile and even vlc-win32.nsis file contain errors:
> - Makefile.am should be change to copy the UAC file after the rebase +
> put them somewhere else (not below the root of the installation)
> - vlc-win32.nsis should be changed to have plugin and includepath
> pointing to this directory (which will also speed up the NSIS process
> because now NSIS is not trying to use the vlc dlls anymore!)
>
>
> New Makefile is now:
>
> 1909 # Rebase all those DLLs to speed up loading (need cygwin rebase)
> 1910         if rebase -b 0x42 /dev/null >/dev/null 2>&1; then \
> 1911                 find $(win32_destdir) -type f -name '*.dll' -print
> | rebase -b 0x70000000 -T -; \
> 1912         fi
> 1913
> 1914 # Copy the UAC NSIS plugin
> 1915         mkdir -p "$(win32_destdir)/NSIS"
> 1916         cp "$(srcdir)/extras/package/win32/UAC.nsh"
> "$(win32_destdir)/NSIS/"
> 1917         cp "$(srcdir)/extras/package/win32/UAC.dll"
> "$(win32_destdir)/NSIS/"
> 1918
>
> New vlc.win32.nsi.in:
>
> --- a/extras/package/win32/vlc.win32.nsi.in
> +++ b/extras/package/win32/vlc.win32.nsi.in
> @@ -49,8 +49,8 @@ InstType $Name_InstTypeMinimum
>  InstType $Name_InstTypeFull
>
>  RequestExecutionLevel user
> -!addincludedir .
> -!addplugindir .
> +!addincludedir NSIS
> +!addplugindir NSIS
>  !include UAC.nsh
>


I'll apply that patch this evening.

Best regards,

Geoffroy



More information about the vlc-devel mailing list