This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Problem packaging wireshark

0

Hi,

I have a problem when i'm packaging wireshark : nmake -f Makefile.nmake packaging

I obtain this error :

e.nmake

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.
    if exist ..\..\docbook\user-guide.chm xcopy ..\..\docbook\user-guide.chm

. /Y /D if exist E:\Developpement\Wireshark-win64-libs\user-guide\user-guide.chm xcopy E:\Developpement\Wireshark-win64-libs\user-guide\user-guide.chm . /Y /D 0 fichier(s) copié(s) rm -f E:\Developpement\wireshark\packaging\nsis....\wireshark-gtk2\uninstall_installer.exe "\Program Files (x86)\NSIS\makensis.exe" uninstall.nsi '\Program' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes. NMAKE : fatal error U1077: '"\Program Files (x86)\NSIS\makensis.exe' : return code '0x1' Stop. NMAKE : fatal error U1077: '"E:\Visual Studio\VC\BIN\amd64\nmake.exe"' : return code '0x2' Stop.

Anybody know how to help me ?

thanks

asked 24 Sep ‘15, 01:15

Hystreal's gravatar image

Hystreal
6224
accept rate: 0%

edited 24 Sep ‘15, 01:58

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

1

Somethings up with the path to makensis.exe. Do you have NSIS installed? The expected location appears to be "\Program Files (x86)\NSIS\makensis.exe", which looks a bit odd without a drive letter.

Check what you have in config.nmake for the variable MAKENSIS?

Actually looking at the master version of config.nmake, I think there's an opportunity for improvement:

#
# Optional: Build the NSIS installer.
#
# If NSIS is installed in a standard location (under Program Files
# or Program Files (x86)) you shouldn't have to change anything.
#
# If NSIS is installed in a custom location uncomment the following
# line and adjust the path accordingly.
#

#MAKENSIS="\custom\path\to\NSIS\makensis.exe"

Find NSIS automatically

!IF !DEFINED(MAKENSIS) !IF EXIST("$(PROGRAM_FILES)\NSIS\makensis.exe") MAKENSIS="$(PROGRAM_FILES)\NSIS\makensis.exe" !ELSE IF EXIST("$(PROGRAM_FILES_W6432)\NSIS\makensis.exe") MAKENSIS="$(PROGRAM_FILES_W6432)\NSIS\makensis.exe" !ELSE IF EXIST("\Program Files (x86)\NSIS\makensis.exe") MAKENSIS="\Program Files (x86)\NSIS\makensis.exe" !ENDIF !ENDIF

This code implies that we look for makensis.exe, firstly in the $PROGRAM_FILES\NSIS directory, then in $(PROGRAM_FILES_W6432)\NSIS (which is the same place on my x64 win 7) and then in the hard-coded path \Program Files (x86)\NSIS, which is what you seem to have ended up with.

The latter part should probably be:

!ELSE IF EXIST("$(PROGRAM_FILES_x86))\NSIS\makensis.exe")
MAKENSIS="$(PROGRAM_FILES_x86))\NSIS\makensis.exe"

along with a preceding:

PROGRAM_FILES_x86 = $(ProgramFiles(x86))

where the other path variables are defined (PROGRAM_FILES & PROGRAM_FILES).

Odd that your copy of NSIS seems to have installed a 32 bit version.

answered 24 Sep ‘15, 02:16

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

thanks, the problem was here.

But finally i have directly write my NSIS.exe path because others synthaxes didn’t work :/

(25 Sep ‘15, 01:39) Hystreal

This is being looked at here.

Could you help out by adding the following lines to config.nmake just after the assignment of PROGRAM_FILES_W6432, then run nmake -f Makefile.nmake verify_tools and then report back with the output?

!message PF is: $(PROGRAM_FILES)
!message PFW6432 is: $(PROGRAM_FILES_W6432)
!error stop here

You can remove the lines after the test.

(25 Sep ‘15, 02:40) grahamb ♦