Archive: Nsis 2.25 - compilation problem


Nsis 2.25 - compilation problem
Hello
New version of Nsis (2.25) have been released. I have a problem with compilation nsis menu.
Could anybody tell me what I have to do to compile nsis 2.25 sources with scons?
I type scons in cmd and I get error:
...
*** error: WXWIN must be set to build NSIS Menu!
scons: *** [build\release\NSIS Menu\NSIS] Error 1
scons: building terminated because of errors.
C:\Program Files\NSIS\src>

WXWIN must be set to build NSIS Menu! -> what is that mean?
What I have to do?
I have installed in my system wxWidgets-2.8.0.
Thanks for any help
regards
-Pawel


OK. I have added system environment variable:
WXWIN E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0

Then I run bat file wxbuild.bat from this folder:
C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx

After this I should compile NSIS with no errors... but I got this error message:


C:\Program Files\NSIS\src>scons
scons: Reading SConscript files ...
Delete("nsis-01-Apr-2007.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration
Checking for memset requirement... (cached) yes
Checking for C library gdi32... (cached) yes
Checking for C library user32... (cached) yes
Checking for C library pthread... (cached) no
Checking for C library stdc++... (cached) no
Checking for C library iconv... (cached) no
Checking for C library version... (cached) yes
Checking for C library dl... (cached) no
Checking for C library gdi32... (cached) yes
Checking for C library iconv... (cached) no
Checking for C library pthread... (cached) no
Checking for C library user32... (cached) yes
Checking for C++ library cppunit... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /opt:nowin98 /map "/OUT:build\release\NSIS Menu\NSIS.exe" "/LIBPATH:E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\lib\vc_lib
nsis" advapi32.lib comctl32.lib gdi32.lib shell32.lib user32.lib wxbase28.lib wxmsw28_core.lib wxmsw28_html.lib "build\release\NSIS Menu\nsismenu
\nsismenu.obj" "build\release\NSIS Menu\nsismenu\nslinks.obj" "build\release\NSIS Menu\nsismenu-rc.res"
LINK : fatal error LNK1181: cannot open input file 'wxbase28.lib'
scons: *** [build\release\NSIS Menu\NSIS.exe] Error 1181
scons: building terminated because of errors.
C:\Program Files\NSIS\src>

What I have to do yet, to compile nsis sources correctly...
regards
-Pawel


Does that library exist in E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\lib\vc_libnsis? If not, wxbuild.bat failed for some reason.


Originally posted by kichik
Does that library exist in E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\lib\vc_libnsis? If not, wxbuild.bat failed for some reason.
No. This library doesn't exist. The wxbase28.lib doesn't exist on my system - I have scanned all my disk.
May I install new wxWidgets? There is a new version (wxMSW-2.8.3-Setup.exe)...

Any idea to correct this?
-Pawel

I'm using 2.8.0. Run wxbuild.bat again and watch closely for errors.


Originally posted by kichik
I'm using 2.8.0. Run wxbuild.bat again and watch closely for errors.

This is my wxbuild.bat file:


if not exist "%WXWIN%\build\msw\makefile.vc" goto error
set OLDCD=%CD%
cd /D "%WXWIN%\build\msw"
copy /y "%WXWIN%\include\wx\msw\setup.h" "%OLDCD%\old_setup.h"
copy /y "%OLDCD%\setup.h" "%WXWIN%\include\wx\msw\setup.h"
rd /S ..\..\lib\vc_libnsis
rd /S vc_mswnsis
nmake -f makefile.vc CFG=nsis BUILD=release RUNTIME_LIBS=dynamic SHARED=0 UNICODE=0 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0
copy /y "%OLDCD%\old_setup.h" "%WXWIN%\include\wx\msw\setup.h"
cd /D "%OLDCD%"
goto done
:error
echo WXWIN is not properly set
:done


I run this bat file using windows cmd:
Two times I type T (it means Yes) on script question.
This is the results:



C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>wxbuild.bat

C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>if not exist "E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw\makef
ile.vc" goto error

C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>set OLDCD=C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx

C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>cd /D "E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw"

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>copy /y "E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\inc
lude\wx\msw\setup.h" "C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx\old_setup.h"
Liczba skopiowanych plików: 1.

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>copy /y "C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx\setup.h" "
E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\include\wx\msw\setup.h"
Liczba skopiowanych plików: 1.

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>rd /S ..\..\lib\vc_libnsis
..\..\lib\vc_libnsis, Czy na pewno (T/N)? T

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>rd /S vc_mswnsis
vc_mswnsis, Czy na pewno (T/N)? T

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>nmake -f makefile.vc CFG=nsis BUILD=release RUNTIME_LIBS=dynamic S
HARED=0 UNICODE=0 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0

Microsoft (R) Program Maintenance Utility Version 7.00.8882
Copyright (C) Microsoft Corp 1988-2000. All rights reserved.

if not exist vc_mswnsis mkdir vc_mswnsis
if not exist ..\..\lib\vc_libnsis mkdir ..\..\lib\vc_libnsis
if not exist ..\..\lib\vc_libnsis\msw mkdir ..\..\lib\vc_libnsis\msw
if not exist ..\..\lib\vc_libnsis\msw\wx mkdir ..\..\lib\vc_libnsis\msw\wx
if not exist ..\..\lib\vc_libnsis\msw\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\vc_libnsis\msw\wx\setup.h
Liczba skopiowanych plików: 1.
if not exist ..\..\lib\vc_libnsis\msw\wx\msw mkdir ..\..\lib\vc_libnsis\msw\wx\msw
cl /EP /nologo "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\vc_libnsis\msw\wx\msw\rcdefs.h"
Nazwa 'cl' nie jest rozpoznawana jako polecenie wewnętrzne lub zewnętrzne,
program wykonywalny lub plik wsadowy.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>copy /y "C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx\old_setup.
h" "E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\include\wx\msw\setup.h"
Liczba skopiowanych plików: 1.

E:\Programy\Microsoft Visual Studio 8\wxWidgets-2.8.0\build\msw>cd /D "C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx"

C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>goto done

C:\Program Files\NSIS\src\Contrib\NSIS Menu\wx>


There is some error, but don't know what does it mean...
-pawel

Looks like it can't find cl.exe. Make sure it's properly set in the PATH. Quote:


Yes. I have added this line to environment variable.

Properly means like that:?


CL E:\Programy\Microsoft Visual Studio 8\VC\bin

It must be here? Or somwhere else?
It doesn't work...


It's probably be easier to open the build environment from the start menu group of Visual Studio.

Either that, or build NSIS without NSIS Menu. Just run:

scons SKIPUTILS="NSIS Menu"
The NSIS Menu doesn't really change according to scons settings.

Coming to think of it, you don't pass any settings to scons. Why rebuild from source at all?

Building NSIS without NSIS Menu works, but why compiling everything doesn't work at my computer, and at Your for example works?
I want to have possibility to compile everything...


Anyway, Thanks for your help.


It doesn't work for you because you haven't set PATH correctly for Visual C and nmake can't find cl. Try opening the build environment from the start menu group of Visual Studio and run wxbuild.bat from there.


Originally posted by kichik
It doesn't work for you because you haven't set PATH correctly for Visual C and nmake can't find cl. Try opening the build environment from the start menu group of Visual Studio and run wxbuild.bat from there.
Yuppii!!!!!
It works! Thanks for your time and help!
I hope that soon I will finish translating nsis on polish language and compiling it. But it is many, many work...

Ps: My PATH environment variable was broken (I suppose).

Best regards
-Pawel

I also can't compile nsis 2.25, my problem is the nsis menu, everything compiles fine except the nsis menu exe.
here is the error i get:

"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\bin\Win64\li
nk.exe" /nologo /opt:nowin98 /map "/OUT:build\release\NSIS Menu\NSIS.exe" /LIBPA
TH:C:\wxWidgets-2.8.0\lib\vc_libnsis advapi32.lib comctl32.lib gdi32.lib shell32
.lib user32.lib wxbase28.lib wxmsw28_core.lib wxmsw28_html.lib "build\release\NS
IS Menu\nsismenu\nsismenu.obj" "build\release\NSIS Menu\nsismenu\nslinks.obj" "b
uild\release\NSIS Menu\nsismenu-rc.res"
LINK : fatal error LNK1104: cannot open file 'msvcprt.lib'
scons: *** [build\release\NSIS Menu\NSIS.exe] Error 1104
scons: building terminated because of errors.
D:\Scripts NSIS\NSIS-20070401>

Looks like you're missing a critical part of the compiler. Do you have msvcprt.lib in your compiler LIB path?


i tried to add C:\platform\lib/amd64 to the LIB variable but i still get the same error.
I'm using Vista 64, Toolit 3003 and platform SDK R2


And the command line? Did you use MSTOOLKIT=yes?


Hmm... Where did msvcprt.lib come from? It's not part of the VC Toolkit or the Platform SDK. Seems like you've used nmake from a different set of build tools than the one used for building NSIS.

Delete vc_libnsis and vc_mswnsis from wxWidgets and build again using the VC Toolkit.



Nazwa 'cl' nie jest rozpoznawana jako polecenie wewnętrzne lub zewnętrzne, program wykonywalny lub plik wsadowy.