mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Don't edit nmap.rc and nsis/Nmap.nsi in place.
Make new versioned nmap.rc.in and nsis/Nmap.nsi.in, and use those to generate unversioned nmap.rc and nsis/Nmap.nsi. The changes made to those files were constantly causing problems with updating.
This commit is contained in:
parent
7b18ea1bc0
commit
9644ad825f
3 changed files with 18 additions and 12 deletions
|
|
@ -7,15 +7,9 @@ LOGLOC=c:nmapbuild.log
|
|||
NSE_FILES = scripts/script.db scripts/*.nse
|
||||
NMAP_MSWIN32_AUX = ../../nmap-mswin32-aux
|
||||
|
||||
winbuild:
|
||||
winbuild: nmap.rc nsis/Nmap.nsi
|
||||
# VCExpress.exe is devenv.com with the commercial Visual Studio suite instead of VC++ Express
|
||||
|
||||
@echo "Setting version: $(NMAP_VERSION) ($(NMAP_NUM_VERSION))"
|
||||
@cat ./nmap.rc | sed 's/VALUE "FileVersion", .*"/VALUE "FileVersion", "$(NMAP_VERSION)\\0"/' > ./nmap.rc.tmp
|
||||
@cat ./nmap.rc.tmp | sed 's/FILEVERSION .*,.*,.*,.*/FILEVERSION $(COMMA_VERSION)/' > ./nmap.rc
|
||||
@cat ./nsis/Nmap.nsi | sed 's/VIProductVersion ".*"/VIProductVersion "$(NMAP_NUM_VERSION)"/' > ./nmap.nsi.tmp
|
||||
@cat ./nmap.nsi.tmp | sed 's/!define VERSION ".*"/!define VERSION "$(NMAP_VERSION)"/' > ./nsis/Nmap.nsi
|
||||
@rm ./nmap.nsi.tmp ./nmap.rc.tmp
|
||||
@./license-format/licformat.sh ../COPYING > LICENSE
|
||||
|
||||
"$(VCEXPRESS)" nmap.sln /build release /log $(LOGLOC)
|
||||
|
|
@ -61,6 +55,18 @@ winbuild:
|
|||
$(MAKENSIS) nmap-$(NMAP_VERSION)/Nmap.nsi
|
||||
mv nmap-$(NMAP_VERSION)/NmapInstaller.exe nmap-$(NMAP_VERSION)-setup.exe
|
||||
|
||||
nmap.rc: nmap.rc.in
|
||||
@sed -e '1i// Automatically generated from $<.' \
|
||||
-e 's/@@FILEVERSION@@/"$(NMAP_VERSION)\\0"/' \
|
||||
-e 's/@@COMMAVERSION@@/$(COMMA_VERSION)/' \
|
||||
"$<" > "$@"
|
||||
|
||||
nsis/Nmap.nsi: nsis/Nmap.nsi.in
|
||||
@sed -e '1i; Automatically generated from $<.' \
|
||||
-e 's/@@VIPRODUCTVERSION@@/"$(NMAP_NUM_VERSION)"/' \
|
||||
-e 's/@@VERSION@@/"$(NMAP_VERSION)"/' \
|
||||
"$<" > "$@"
|
||||
|
||||
clean:
|
||||
"$(VCEXPRESS)" nmap.sln /clean
|
||||
rm -rf Debug Release nmapbuild.log
|
||||
rm -rf Debug Release nmapbuild.log nmap.rc nsis/Nmap.nsi
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 5,35,0,18
|
||||
FILEVERSION @@COMMAVERSION@@
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x21L
|
||||
|
|
@ -29,7 +29,7 @@ BEGIN
|
|||
BEGIN
|
||||
VALUE "CompanyName", "Insecure.Org\0"
|
||||
VALUE "FileDescription", "Nmap\0"
|
||||
VALUE "FileVersion", "5.35DC18\0"
|
||||
VALUE "FileVersion", @@FILEVERSION@@
|
||||
VALUE "InternalName", "Nmap\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) Insecure.Com LLC (fyodor@insecure.org)\0"
|
||||
VALUE "LegalTrademarks", "NMAP\0"
|
||||
|
|
@ -49,8 +49,8 @@ SetCompressor /SOLID /FINAL lzma
|
|||
;Get installation folder from registry if available
|
||||
InstallDirRegKey HKCU "Software\Nmap" ""
|
||||
|
||||
!define VERSION "6.02"
|
||||
VIProductVersion "6.02.0.1"
|
||||
!define VERSION @@VERSION@@
|
||||
VIProductVersion @@VIPRODUCTVERSION@@
|
||||
VIAddVersionKey /LANG=1033 "FileVersion" "${VERSION}"
|
||||
VIAddVersionKey /LANG=1033 "ProductName" "Nmap"
|
||||
VIAddVersionKey /LANG=1033 "CompanyName" "Insecure.org"
|
||||
Loading…
Add table
Add a link
Reference in a new issue