mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +00:00
91 lines
3.5 KiB
Plaintext
91 lines
3.5 KiB
Plaintext
Building the Nmap Installer for Windows
|
|
=======================================
|
|
|
|
|
|
I. ZENMAP BUILD DEPENDENCIES
|
|
|
|
Here are the build dependencies for Zenmap and where to get them. The
|
|
latest known tested versions are listed here, but I usually start by
|
|
grabbing the latest version available on the sites rather than these
|
|
known-good versions.
|
|
|
|
GTK+ All-in-one bundle
|
|
o http://www.gtk.org/download-windows.html
|
|
o Tested: gtk+=bundle_2.14.7-20090119_win32.zip
|
|
o Also tried the more recent gtk+-bundle_2.16.6-20091013_win32.zip,
|
|
but while that worked on Windows 7, I got DLL errors when I tried
|
|
to run Zenmap on Windows XP. It basically failed to load:
|
|
Traceback (most recent call last):
|
|
File "zenmap", line 89, in <module>
|
|
File "zenmapGUI\App.pyo", line 113, in <module>
|
|
File "gtk\__init__.pyo", line 48, in <module>
|
|
File "gtk\_gtk.pyo", line 12, in <module>
|
|
File "gtk\_gtk.pyo", line 10, in __load
|
|
ImportError: DLL load failed: The specified procedure could not be found.
|
|
Python
|
|
o http://www.python.org/download
|
|
o Tested: python-2.6.4.msi
|
|
PyGTK
|
|
o http://ftp.gnome.org/pub/gnome/binaries/win32/pygtk
|
|
o Tested: pygtk-2.12.1-3.win32-py2.6.exe
|
|
PyCairo
|
|
o http://ftp.gnome.org/pub/gnome/binaries/win32/pycairo
|
|
o Tested: pycairo-1.4.12-2.win32-py2.6.exe
|
|
PyGObject
|
|
o http://ftp.gnome.org/pub/gnome/binaries/win32/pygobject
|
|
o pygobject-2.14.2-2.win32-py2.6.exe
|
|
Py2exe (0.6.9) - http://www.sourceforge.net/projects/py2exe
|
|
o py2exe-0.6.9.win32-py2.6.exe
|
|
Be sure to grab the PyGTK, PyCairo, etc. for Python 2.6!
|
|
|
|
The GTK all-in-one bundle is a zip file. Unzip it into the directory
|
|
c:\GTK. The other components have installers-using the default
|
|
install directories is important, especially for Python (C:\Python26)
|
|
and GTK (C:\GTK). See Section IV if you must change the directories.
|
|
|
|
You may need to set your Windows $PATH so that it can find the GTK
|
|
DLLs while py2exe is doing its thing. On Windows 7 x64, I did this as
|
|
follows:
|
|
o Open control panel, search for "environment variables", click on
|
|
"Edit the system environment variables", which opens the "System
|
|
Properties" dialogue. Select the "Advanced" tab then click the
|
|
"Environment Variables" button. Add ";C:\GTK\bin" to the end of
|
|
the user PATH variable.
|
|
|
|
After installing GTK, create C:\GTK\etc\gtk-2.0\gtkrc with the
|
|
contents:
|
|
gtk-theme-name = "MS-Windows"
|
|
|
|
II. OTHER REQUIREMENTS
|
|
|
|
You'll need Microsoft Visual C++ 2008 for compilation.
|
|
Directions for obtaining those are at:
|
|
http://nmap.org/install/inst-windows.html#inst-win-source
|
|
|
|
You'll also need Cygwin installed in order to build the Nmap installer (not
|
|
required for normal compiling). You'll find it at http://www.cygwin.com
|
|
|
|
And last, you'll need the Nullsoft Scriptable Install System installed. You
|
|
can download if from http://nsis.sourceforge.net/Download (Version
|
|
2.45 tested)
|
|
|
|
|
|
III. BUILDING
|
|
|
|
With all of the requirements and dependencies installed, open up a Cygwin
|
|
shell and go to the mswin32 directory in the Nmap directory and type "make".
|
|
This may take several minutes, and will create an executable installer and a
|
|
zip archive (nmap-<version>-setup.exe and nmap-<version>-win32.zip).
|
|
|
|
|
|
IV. INSTALLATION PATHS / PROBLEMS
|
|
|
|
If you have Python installed to a directory other than the default mentioned
|
|
above, then you need to edit the copy_and_compile.bat file under
|
|
zenmap/install_scripts/windows and change the "set PythonEXE" line with your
|
|
installed directory.
|
|
|
|
If you have GTK installed to a different directory, follow the same directions
|
|
as for Python, but edit the "set GTKDir" line.
|
|
|