diff --git a/CHANGELOG b/CHANGELOG index d9fc5349d..2fff0c95e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ # Nmap Changelog ($Id$); -*-text-*- +o Reformat Nmap COPYING file (e.g. remove C comment markers, reduce + line length) during Nmap windows build so that it looks much better + when presented by the Windows executable (NSIS) installer. Thanks + to Jah for the patch (which was modified slightly by Fyodor). + Nmap 4.60 o Nmap has moved. Everything at http://insecure.org/nmap/ can now be diff --git a/mswin32/Makefile b/mswin32/Makefile index 97e5e749e..4090a5abd 100644 --- a/mswin32/Makefile +++ b/mswin32/Makefile @@ -15,6 +15,7 @@ winbuild: @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 + @sed -f ./license-sed/lic_sedexp_1 ../COPYING | sed -f ./license-sed/lic_sedexp_2 | sed -f ./license-sed/lic_sedexp_3 | sed -f ./license-sed/lic_sedexp_4 > LICENSE $(VCEXPRESS) nmap.sln /build release /log $(LOGLOC) $(MAKENSIS) winpcap/winpcap-nmap.nsi diff --git a/mswin32/license-sed/lic_sedexp_1 b/mswin32/license-sed/lic_sedexp_1 new file mode 100644 index 000000000..bf6bd5496 --- /dev/null +++ b/mswin32/license-sed/lic_sedexp_1 @@ -0,0 +1,32 @@ +# remove horizontal asterisks +s@\*\*@@g + +# preserve double hyphens between words in GNU GPL +s@\([^\S\-]\)\-\-\([^\S\-]\)@\1SDFGHdbldash\2@g + +# remove horizontal hyphens +s@\-\-@@g + +# reintroduce double hyphens +s@SDFGHdbldash@--@g + +# remove trailing asterisk +s@\s*\*\s*$@@g + +# remove leading asterisk +s@^\s*\*\s*@@g + +# remove lonely slash +s@^/$@@g + +# remove leading whitespace +s@^\s\+@@g + +# preserve bullets +s@^o\s@oSDFGHbullet@g + +# preserve sentence spacing +s@\.\s\s\(\S\)@.SDFGHJdblspace\1@g + +# remove first line +1d diff --git a/mswin32/license-sed/lic_sedexp_2 b/mswin32/license-sed/lic_sedexp_2 new file mode 100644 index 000000000..30394cffb --- /dev/null +++ b/mswin32/license-sed/lic_sedexp_2 @@ -0,0 +1,8 @@ +# read entire input and preserve paragraph separation + +: more +$!N +t enough +$!b more +: enough +s@\n\n@SDFGHJdblnewline@g diff --git a/mswin32/license-sed/lic_sedexp_3 b/mswin32/license-sed/lic_sedexp_3 new file mode 100644 index 000000000..b3f6f29b1 --- /dev/null +++ b/mswin32/license-sed/lic_sedexp_3 @@ -0,0 +1,8 @@ +# read entire input and replace all newlines with a space + +: more +$!N +t enough +$!b more +: enough +s@\n@ @g diff --git a/mswin32/license-sed/lic_sedexp_4 b/mswin32/license-sed/lic_sedexp_4 new file mode 100644 index 000000000..e45f68ca4 --- /dev/null +++ b/mswin32/license-sed/lic_sedexp_4 @@ -0,0 +1,19 @@ +# newline first line +s@^\s\(COPYING\)@\n\1@g + +# collapse whitespace +s@\s\s@ @g + +# reintroduce double newlines +s@SDFGHJdblnewline@\n\n@g + +# reintroduce bullets +s@oSDFGHbullet@\no @g + +# reintroduce sentence spacing +s@SDFGHJdblspace@ @g + +# Clean up GNU "How to apply" +s@\.\s\(Copyright (C) 19yy\)@\.\n\1@g +s@\(name\sof\sauthor\)\s\(Gnomovision\)@\1\n\2@g +s@1989 Ty Coon@1989\nTy Coon@g \ No newline at end of file diff --git a/mswin32/nsis/Nmap.nsi b/mswin32/nsis/Nmap.nsi index dd6e3d2c9..e82e31ead 100644 --- a/mswin32/nsis/Nmap.nsi +++ b/mswin32/nsis/Nmap.nsi @@ -42,7 +42,7 @@ ;Pages ; !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt" - !insertmacro MUI_PAGE_LICENSE "..\..\COPYING" + !insertmacro MUI_PAGE_LICENSE "..\LICENSE" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES