diff --git a/Makefile b/Makefile
index a48112e..d20c414 100644
--- a/Makefile
+++ b/Makefile
@@ -376,7 +376,8 @@ no_title.vim: Makefile
 	echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
 
 # MS-DOS sources
-dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
+dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
+	nsis/gvim_version.nsh
 	-rm -rf dist/vim$(VERSION)src.zip
 	-rm -rf dist/vim
 	mkdir dist/vim
@@ -387,6 +388,7 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
 		$(SRC_AMI_DOS) \
 		$(SRC_DOS_UNIX) \
 		runtime/doc/uganda.nsis.txt \
+		nsis/gvim_version.nsh \
 		| (cd dist/vim/$(VIMRTDIR); tar xf -)
 	mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
 	rmdir dist/vim/$(VIMRTDIR)/runtime
@@ -399,6 +401,14 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
 runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
 	cd runtime/doc && $(MAKE) uganda.nsis.txt
 
+nsis/gvim_version.nsh:
+	echo "# Generated header to export version numbers from Makefile" > $@
+	echo "!ifndef __GVIM_VER__NSH__"  >> $@
+	echo "!define __GVIM_VER__NSH__"  >> $@
+	echo "!define VER_MAJOR $(MAJOR)" >> $@
+	echo "!define VER_MINOR $(MINOR)" >> $@
+	echo "!endif" >> $@
+
 dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
 	-rm -rf dist/vim$(VERSION)rt.zip
 	cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
diff --git a/nsis/gvim.nsi b/nsis/gvim.nsi
index a2940eb..bc21ca8 100644
--- a/nsis/gvim.nsi
+++ b/nsis/gvim.nsi
@@ -21,15 +21,14 @@
 # comment the next line if you do not want to add Native Language Support
 !define HAVE_NLS
 
-!define VER_MAJOR 7
-!define VER_MINOR 3
-
 # ----------- No configurable settings below this line -----------
 
 !include UpgradeDLL.nsh		# for VisVim.dll
 !include LogicLib.nsh
 !include x64.nsh
 
+!include gvim_version.nsh	# for version number
+
 Name "Vim ${VER_MAJOR}.${VER_MINOR}"
 OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
 CRCCheck force
