Nsis 3.09 open source build using SCONS

46 views Asked by At

I've downloaded Nsis 3.09 source code and would like to build its binaries. Python,scon,zlib and MSVS are already installed.

https://nsis.sourceforge.io/Docs/AppendixG.html

Those instructions are very old and I'm not sure if it's still valid.

Sconstruct

opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', os.environ.get('MSVS_VERSION'), allowed_values=('6.0', '7.0', '7.1', '8.0', '8.0Exp', '9.0', '9.0Exp', '10.0', '10.0Exp')))

I've visual c++ 2013 installed but when i run scons msvs_Version error is reported. Please see image. Sconsctruct values for msvs_version is as above.

screenshot of error

Please let me know if you could give my any directions as to how to proceed.

Thanks in advance.

Surbhi

I tried using msvs_version but didn't help

scons SKIPUTILS="NSIS Menu" SKIPPLUGINS=all MSVS_VERSION=10.0
1

There are 1 answers

0
Anders On

It is supposed to say Using Microsoft tools configuration (10.0) and not Using Microsoft tools configuration (<Default>) so it is somehow not picking up MSVS_VERSION at all?

I gave up trying to keep up with incompatible changes in Scons long ago and instead I use a backdoor that uses Visual Studio from %path% (you must alter the path to vcvars32.bat so it matches your version):

@echo off
setlocal
REM NSIS source is in C:\bld\trunk
cd /D C:\bld\trunk
REM zlib-win32 in C:\bld\dep\zlib-win32
REM Assuming python and scons are installed and in %path%

call "C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
set ZLIB_W32=C:\bld\dep\zlib-win32
scons MSTOOLKIT=yes MSVC_USE_SCRIPT=None MSVS_VERSION=10.0 VERSION= SKIPUTILS="NSIS Menu" PREFIX="c:\bld\NSIS" install