Old 29th March 2015, 22:13   #1
Wayne Goode
Junior Member
 
Join Date: Mar 2015
Posts: 1
Exclamation Problems building NSIS

I'm trying to build NSIS, but I'm having problems. There are three different errors depending on which version of Visual Studio I specify.

DownloadedFiles are at
  • C:\dev\NSIS
  • C:\Python27
  • C:\Python27\Lib\site-packages\scons-2.3.4
  • C:\dev\zlib-1.2.8
Other
I build it by cleaning the directory and then using a command line of scons. I tried this using various versions of Visual Studio. By default, it is 12.0. I set MSVS_VERSION to build with other versions.

The results:
  1. 6.0, 7.0, 7.1: "Couldn't find a good version of libcp.lib"
  2. 8.0, 9.0: "zlib (win32) is missing!"
  3. 10.0, 12.0: "error LNK2019: unresolved external symbol __hypot referenced in function _hypot" & "error LNK2001: unresolved external symbol __fltused"
I also built it with the "MSTOOLKIT=yes" with the same results. I pointed MSSDK to the SDK that matched MSVS_VERSION. I tried it with:

MSSDK=C:\Program Files\Microsoft SDKs\Windows\version
MSSDK=C:\Program Files (x86)\Microsoft SDKs\Windows\version

#1 I have not researched this error yet.
#2 I found a few posts about this, but none provided a solution. I've checked that zlib.h, zdll.lib and zlib1.lib are where they are expected.
#3 The unresolved __hypot is because of a change in the library starting with VS 2010. I suspect that __fltused is a similar problem.

I have tried this on a second computer with a similar setup. The results are the same.

Output #1

scons: Reading SConscript files ...
Delete("nsis-29-Mar-2015.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (7.1)
*** Couldn't find a good version of libcp.lib

Output #2
scons: Reading SConscript files ...
Delete("nsis-29-Mar-2015.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (9.0)
Checking for memset requirement... yes
Checking for memcpy requirement... yes
Checking for C library gdi32... no
Checking for C library user32... no
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library shlwapi... no
Checking for C library version... no
Checking for C library zdll... no
Checking for C library z... no
zlib (win32) is missing!

Output for #3
scons: Reading SConscript files ...
Delete("nsis-29-Mar-2015.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (12.0)
Checking for memset requirement... yes
Checking for memcpy requirement... no
Checking for C library gdi32... yes
Checking for C library user32... yes
Checking for C library pthread... no
Checking for C library iconv... no
Checking for C library shlwapi... yes
Checking for C library version... yes
Checking for C library zdll... yes
Checking for C library zdll... yes
Checking for C library zdll... yes
Checking for C library dl... no
Checking for C library gdi32... yes
Checking for C library iconv... no
Checking for C library pthread... no
Checking for C library user32... yes
Checking for C library version... yes
Checking for C library zdll... yes
Checking for C++ library cppunit... no
scons: done reading SConscript files.
scons: Building targets ...
Install file: "Contrib\ExDLL\pluginapi.h" as "build\urelease\api\nsis\pluginapi.h"
Install file: "Source\exehead\api.h" as "build\urelease\api\nsis\api.h"
Install file: "Contrib\ExDLL\nsis_tchar.h" as "build\urelease\api\nsis\nsis_tchar.h"
<lots of cl commands>
link /nologo /map /subsystem:windows,5.01 /entry:NSISWinMainNOCRT /NODEFAULTLIB /OUT:build\urelease\MakeLangId\MakeLangId.exe kernel32.lib user32.lib comctl32.lib build\urelease\MakeLangId\MakeLangId.obj build\urelease\MakeLangId\resource-rc.res build\urelease\MakeLangId\memset.obj
MakeLangId.obj : error LNK2019: unresolved external symbol __hypot referenced in function _hypot
MakeLangId.obj : error LNK2001: unresolved external symbol __fltused
build\urelease\MakeLangId\MakeLangId.exe : fatal error LNK1120: 2 unresolved externals
scons: building terminated because of errors.

Wayne Goode is offline   Reply With Quote
Old 30th March 2015, 02:12   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Showing us the exact scons command used would help.

Which SDK are you using with VC toolkit 2003? Platform SDK 2003 Feb. is probably your best bet.

1) SCons is probably not able to find the lib?
2) Are you sure ZLIB_W32 is set correctly? Use File Monitor/Process Monitor to make sure SCons is actually looking in the right place.
3) Newer versions of VS are probably doing something stupid. MakeLangId does not use floating point numbers nor any other CRT function.



I can build with VCTK2003 but I'm using a backdoor to override the Scons VS detection:
Quote:
cd trunk
set ZLIB_W32=c:\....\dep\zlib-win32
scons MSVC_USE_SCRIPT=None MSTOOLKIT=yes MSVS_VERSION=7.1 DOCTYPES=htmlsingle VERSION= VER_MAJOR=3 VER_MINOR= VER_REVISION=4 VER_BUILD=1 PREFIX=c:\....\NSIS SKIPUTILS="NSIS Menu" SKIPPLUGINS=System install
I'm using SCons v1.2.0.r3842 because newer versions never work correctly for me. (Having multiple SDK's and versions of VS on the same machine is not a good idea when trying to fix these build errors)

When using MSVC_USE_SCRIPT=None the PATH, INCLUDE and LIB environment variables have to be set correctly (Use the shortcuts created by the Platform SDK: Windows 2000/XP Release 32-bit etc). Specifically it needs to be able to find cl.exe, link.exe and lib.exe in %PATH% and Windows.h in %INCLUDE%.

I'm using SKIPPLUGINS=System because I did not have the MASM assembler (ml.exe) in %PATH%.

The contents of my zlib folder:
Quote:
\zlib-win32\zlib1.dll
\zlib-win32\include\zconf.h
\zlib-win32\include\zlib.h
\zlib-win32\lib\zdll.lib
\zlib-win32\lib\zlib.lib
(I may have built these myself, I don't remember)



I would generally not recommend that people use MSVC_USE_SCRIPT but it can be helpful if you cannot get SCons to operate correctly. It seems to be a rather undocumented parameter and depends on your SCons version. If you also use MSTOOLKIT=yes then it will use our custom implementation of this feature (YMMV).



It is important that you delete .sconsign.dblite and the .sconf_temp directory when trying to fix the libcp.lib and zlib errors because SCons caches config data. Checking config.log might also provide some clues...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th November 2015, 07:45   #3
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
im in the same alley struggling to get NSIS to compile without errors,
assuming i have nothing installed; can someone please sort these out for me,
which of these do i want to use to get a successful build?

TIA,
Chris

MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 08:49   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
You have the service pack and processor pack for Visual Studio 6 but not Visual Studio itself which is rather strange.

First install python, then scons.

Then you need to choose between 2003TK and 2005. When you try to build scons is going to complain about missing zlib and wxwidgets so set those variables and then report back if you get errors...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th November 2015, 09:48   #5
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thumbs up

Thank you Andres,
I am actually trying again on a new virgin PC because I was getting errors on my other machine,
I do use it for other development; I already have VS2012; I have all path in place on both machines;
with Python installed scones v1.20 and wxMSW v2.8; I am getting a warring on both machines,
and on both compilation stops due to fatal errors,

the one machine W7 has VS2012 with latest scones build and newer wxMSW
I got similar errors as OP described; on my other box its xp,
I’m setting up now VS6 with SP5 and proc pack with older scones and wxMSW to see if this helps,

No switches were initially used; though I have tried several with no joy,

TIA
Chris


(log attached)
Attached Files
File Type: txt log.txt (34.0 KB, 180 views)
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 10:39   #6
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Try adding SKIPUTILS=MakeLangId as a scons parameter. (MakeLangId is a simple program and does not use floats but as you can see, it is rather hard to keep all visual studio versions happy at the same time)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th November 2015, 11:23   #7
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thumbs up

Thank you very much Andres,
i did as instructed; something kept going; but ended up again not completing again,

log attached

TIA
Chris
Attached Files
File Type: txt log.txt (63.5 KB, 157 views)
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 11:47   #8
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
Also add nsis menu to the scons list, so: SKIPUTILS="MakeLangId","NSIS Menu". The Menu is the thing you see when you click the NSIS icon on the desktop or in the start menu.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 12:15   #9
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
kept going again; only this time i got... allot of windows popup VS pages as well as url's
this is one nutty process to figure out

thank you for all you help guys; i do appreciate this,
(log attached)

ATB
Chris
Attached Files
File Type: txt log.txt (143.8 KB, 136 views)
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 12:20   #10
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
What's the directory you are running scons in? And what's the command line you are using?

I've compiled nsis multiple times on windows and linux, and I've never seen a log like that last one.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 12:36   #11
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
i think the buffer was enough to hold all the log;
the first line should have the command i run as well

i run from -> d:\dev\nsis\
in this last run i had -> scons SKIPUTILS="MakeLangId","NSIS Menu"

other directories needed are here and referenced in path
d:\dev\wxWidgets\
d:\dev\zlib-1.2.7\
C:\Python27\
in this last run i had

im not sure yet if im doing something to add to this odd behavior;
scons doesn't like to work nicely on my Win7 pc for some odd reason,

i run it few times from a normal command window;
until it just refused to be recognized; jut like that!
no changes made other then close and open a new command window;

it didn't matter that i removed and installed it back; python is in path as needed,
i added direct path reference to \site packages\scons\
i did just about everything i can think of to make sure everything is visible;
yet scons remained un recognized; i had to pull VS command and work through it,


ATB
Chris
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 12:43   #12
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
You installed python in it's default directory right? Which would be C:\Python27? Add C:\Python27\scripts into the environment's system path. Then in a command window all you have to do is change to the nsis directory and run your scons command.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 12:51   #13
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
C:\Python27\scripts is already in there; python is in its default path C:\Python27\
(i see scones files in scripts folder but with no extensions)
scones doesn't let you change install path anyway,
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 12:56   #14
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
this is what i have in path

PHP Code:
C:\Python27\
C:\Python27\Scripts
C
:\Python27\Lib\site-packages\scons-2.4.1\SCons
%SystemRoot%\system32
%SystemRoot%
%
SystemRoot%\System32\Wbem
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86
C
:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64
D
:\Program Files\FWTools2.4.7\bin
C
:\Program Files\TortoiseSVN\bin
C
:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\
C:\Program Files (x86)\HTML Help Workshop
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 12:57   #15
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
So from a new command window are you doing this:

D: (enter)
cd dev\nsis (enter)
scons (enter)

If not, do it this way and let me know what happens.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 13:07   #16
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
i cant explain why; as you see a standard run cmd shell is working now,
PHP Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c2009 Microsoft Corporation.  All rights reserved.

D:\Users\Administrator>cd d:\

d:\>cd dev\nsis

d
:\dev\nsis>scons
scons
Reading SConscript files ...
Delete("nsis-26-Nov-2015.cvs")
Delete(".instdist")
Delete(".test")
Using Microsoft tools configuration (12.0)
Checking for memset requirement... (cachedyes
Checking 
for memcpy requirement... (cachedno
Checking 
for C library gdi32... (cachedyes
Checking 
for C library user32... (cachedyes
Checking 
for C library pthread... (cachedno
Checking 
for C library iconv... (cachedno
Checking 
for C library shlwapi... (cachedyes
Checking 
for C library version... (cachedyes
Checking 
for C library zdll... (cachedyes
Checking 
for C library zdll... (cachedyes
Checking 
for C library zdll... (cachedyes
Checking 
for C library dl... (cachedno
Checking 
for C library gdi32... (cachedyes
Checking 
for C library iconv... (cachedno
Checking 
for C library pthread... (cachedno
Checking 
for C library user32... (cachedyes
Checking 
for C library version... (cachedyes
Checking 
for C library zdll... (cachedyes
Checking 
for C++ library cppunit... (cachedno
scons
done reading SConscript files.
sconsBuilding targets ...
link /nologo /map /subsystem:windows,5.01 /entry:NSISWinMainNOCRT /NODEFAULTLIB /OUT:build\urelease\MakeLangId\MakeLangId.exe kernel32.lib user32.lib comctl32.lib build\urelease\MakeLangId\MakeLangId.obj build\urelease\MakeLangId\resource-rc.res build\urelease\MakeLangId\memset.obj
MakeLangId
.obj error LNK2019unresolved external symbol __hypot referenced in function _hypot
MakeLangId
.obj error LNK2001unresolved external symbol __fltused
build
\urelease\MakeLangId\MakeLangId.exe fatal error LNK11202 unresolved externals
scons
: *** [build\urelease\MakeLangId\MakeLangId.exeError 1120
scons
building terminated because of errors.

d:\dev\nsis
i still had the window open from the time it refused to run from a normal window;
no changes made since!

PHP Code:

D
:\dev\nsis>scons
'scons' is not recognized as an internal or external command,
operable program or batch file.

D:\dev\nsis
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 13:14   #17
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Why do you even need to build NSIS? If you cannot piece together the information you have already gotten to get past the MakeLangId problem then I don't understand how you are going to be able to make any meaningful changes to the source...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th November 2015, 13:15   #18
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
Alright, close that window that failed. Now use your original scons command line on the new window.

Because the command window doesn't pickup changes in the environment, it's advised to only have one command window open at any time, and close and open a new window after each change. On ubuntu it doesn't matter, I can have one command window open and I can add and remove path variables and programs, and the command window can still pick them up, and it remembers every command you type into it .

[edit] Just saw Ander's reply, that's a good point, I didn't have this much trouble compiling NSIS, I use VS2008 and I skip the help file and NSIS Menu. I've done this on windows 7 and windows 10.

I noticed VS version 12 in the scons output, do you have VS2013/VS2015 installed by any chance?

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 13:23   #19
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thumbs up

W00T -> scons: done building targets.
what a silly thing to cause this odd behavior; good catch there Jason!

trying a fresh build now

ATB
Chris
Attached Files
File Type: txt log.txt (145.4 KB, 152 views)
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 13:46   #20
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
why am i getting ->
File: "..\NSIS.exe" -> no files found.

when trying to compile an exe or archive?
scons dist-installer SKIPUTILS="MakeLangId","NSIS Menu"?

TIA
Chris
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 13:57   #21
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Quote:
Originally Posted by MyPC8MyBrain View Post
why am i getting ->
File: "..\NSIS.exe" -> no files found.
Because you skipped NSIS menu when you built NSIS. You will not be able to compile the official NSIS installer without it but you can compile all other scripts...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th November 2015, 14:09   #22
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
without makensis.exe, how?
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 14:14   #23
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
makensis.exe is the compiler, NSIS.exe is the menu.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 26th November 2015, 21:46   #24
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thank you Jason, i end up with no exe after compiling,
any idea why im getting these errors to start with; is it the src files or my environment?

TIA
Chris
MyPC8MyBrain is offline   Reply With Quote
Old 26th November 2015, 22:12   #25
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
im curious now about this 2GB limit,
have you stumbled on this before? why isnt this implemented in NSIS standard builds today?
https://github.com/ywjheart/Nsis64
(blog https://ywjheart.wordpress.com/2012/...-the-2gb-limit)

ATB
Chris
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 04:34   #26
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Red face

Quote:
Originally Posted by Anders View Post
Why do you even need to build NSIS?
trying to get this compiled with a private key

Quote:
Originally Posted by Afrow UK View Post
You need to modify exehead\fileform.h. Insert a dummy enum value name just before EW_EXTRACTFILE (this ensures File gets a new opcode). E.g.
code:
EW_WHYDIDNTITHINKOFTHISDOH,
EW_EXTRACTFILE,

Stu
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 06:27   #27
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
That code is a bit old now, mine is based on 3.0b2.

The devs have talked about it, but nothing has been set in concrete. I've been experimenting with it over the last year or two, and I have a working prototype right now.

PHP Code:
Processed 1 filewriting output (amd64-unicode):
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!

Output"C:\NSIS\bigfile.exe"
Output"C:\NSIS\bigfile.bin"
Install2 pages (128 bytes), 1 section (2072 bytes), 1216 instructions (38912 bytes), 7081 strings (60042 bytes), 1 language table (270 bytes).
Datablock optimizer saved 1455 KiB (~0.0%).

Using zlib compression.

EXE header size:               64000 49664 bytes
Install code
:                 101884 101880 bytes
Install data
:                   7442 MiB 7444 MiB
CRC 
(0x4DD627A2):                  4 bytes

Totals
:
Exe size:                     165888 151548 bytes (109.4%)
Bin size:                       7442 MiB 7444 MiB 

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th November 2015, 07:15   #28
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
SWEET!
can you share the build?
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 08:48   #29
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
I've been thinking about it, but really I don't want to. The trunk build has had some major changes done to it since my fork, and I don't really want to maintain a fork that's probably going to be discarded in the future anyway (because technology keeps moving on).

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th November 2015, 08:54   #30
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Unhappy

why would it be discard in future releases; this is crucial today!
if anything this should be further enhanced and supported, im shocked to find out this 2GB limit,
everyone moving towards 64bit more ram; more speeds; while NSIS is stuck with FAT16 limits?
shocked, stunned, extremely disappointed; i will likely be looking for another solution ,

did you manage to fix the few loss end he originally left with compression and such?
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 09:24   #31
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
The limit has been in place for a good ten years now, and there have been people over the years that have requested this limit be removed (myself included). The devs are a bit reluctant to add support, the patches shown so far aren't really 'nice' enough to be integrated.

My fork just adds to what's already there, I haven't removed anything from the original source. The only downside is that solid compression isn't supported, which is no biggie as it would just make the install slower.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th November 2015, 12:34   #32
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Lightbulb Building NSIS with the free VC 2003 Toolkit on a clean Windows 2000 install

  • Download and install Python: https://www.python.org/ftp/python/2....thon-2.7.6.msi (On older systems you need Windows Installer 2.0 Redistributable: http://www.microsoft.com/en-us/downl....aspx?id=11176 -> http://www.microsoft.com/en-us/downl...5695C5A2143=1#)
  • Download and install SCons: http://sourceforge.net/projects/scon...2.exe/download -> http://netcologne.dl.sourceforge.net....2.0.win32.exe
  • Download and install HTML help workshop: http://download.microsoft.com/downlo...4/htmlhelp.exe (This is optional, it will generate HTML documentation instead of CHM if you don't do this)
  • Download and install VC 2003 Toolkit: Google:"VCToolkitSetup.exe" (v13.10.3052, 32952488 bytes or v13.10.3077, 32948392 bytes)
  • Download Platform SDK February 2003 (5.2.3790.0):
    PHP Code:
    FOR /%A IN (1,1,13) DO wget http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.%A.cab
    wget http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.bat
    wget http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/extract.exe
    REM (Download manually if you don't have wget) 
  • Run PSDK-FULL.bat and then run the extracted setup and install the Core SDK and Internet Development SDK
  • Download the Zlib library: http://nsis.sourceforge.net/Zlib (Zlib-1.2.7-win32-x86.zip)
  • Download the NSIS source code, I used trunk r6644 r6646
  • We are now ready to build, run "Set Windows 2000 Build Environment (Retail).lnk":

    PHP Code:
    REM VC2003TK linker sometimes dies with "fatal error LNK1158: cannot run 'cvtres.exe'" because SCons fails to put it in %pathso I'm fixing that with:
    copy "%windir%\Microsoft.NET\Framework\v1.1.4322\cvtres*" "%VCToolkitInstallDir%\Bin\"

    cd C:\NSIS\trunk
    set PATH=%PATH%;C:\Program Files\HTML Help Workshop&REM
    set ZLIB_W32=C:\NSIS\dep\zlib&REM

    C:\Python27\Scripts\scons.bat MSTOOLKIT=yes VER_MAJOR=3 VER_MINOR=0 SKIPUTILS="NSIS Menu" SKIPPLUGINS=System PREFIX="c:\NSIS\NSIS" install 

If you want to build the system plugin you also need MASM. If you want to build the NSIS menu you need to download wxwidgets. I'm building everything here.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th November 2015, 23:03   #33
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Thank you very much Andres
followed your instructions verbatim

any idea why im getting this now?
PHP Code:
Source\build.cpp(3389) : error C2589'(' illegal token on right side of '::'
Source\build.cpp(3389) : error C2059syntax error '::'
scons: *** [build\urelease\makensis\build.objError 2
scons
building terminated because of errors
MSTOOLKIT=yes VER_MAJOR=3 VER_MINOR=0 SKIPUTILS="NSIS Menu" SKIPPLUGINS=System PREFIX="c:\NSIS\NSIS" install
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 23:23   #34
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 859
Which version of the source files are you using?

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 27th November 2015, 23:24   #35
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
trunk r6644
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 23:26   #36
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Quote:
Originally Posted by MyPC8MyBrain View Post
followed your instructions verbatim

any idea why im getting this now?
I don't see how that is possible, you must be using a different compiler or SDK version. Not all SDK and compiler versions can be combined.

To fix it you need to play around with the STD_MIN/STD_MAX defines in platform.h

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th November 2015, 23:35   #37
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
MyPC8MyBrain is offline   Reply With Quote
Old 27th November 2015, 23:49   #38
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Which Microsoft tools configuration version is reported at the start of the scons output/log?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th November 2015, 23:58   #39
MyPC8MyBrain
Member
 
Join Date: Nov 2015
Posts: 96
Using Microsoft tools configuration (3.5)
MyPC8MyBrain is offline   Reply With Quote
Old 28th November 2015, 00:18   #40
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,843
Quote:
Originally Posted by MyPC8MyBrain View Post
Using Microsoft tools configuration (3.5)
It should say 7.1 so something is clearly not right with the compiler detection. You could try adding MSVS_VERSION=7.1 to the scons command but I doubt that is going to help.

Unless you want to try on a clean machine I think you will have to debug our scons toolkit detection script. (somewhere under trunk\scons\)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Tags
build, error, nsis, scons, zlib

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump