diff --git a/misc/create_vcxsrc.sh b/misc/create_vcxsrc.sh
old mode 100644
new mode 100755
index 215e27c5..156eee4b
--- a/misc/create_vcxsrc.sh
+++ b/misc/create_vcxsrc.sh
@@ -2,8 +2,9 @@
set -ex
vcxsrc="$1-$2"
-yosysver="$2"
gitsha="$3"
+yosysver="$2"
+yosysverstr="$yosysver (git sha1 $gitsha, Visual Studio)"
rm -rf YosysVS-Tpl-v1.zip YosysVS
wget http://www.clifford.at/yosys/nogit/YosysVS-Tpl-v1.zip
@@ -17,7 +18,7 @@ mv YosysVS "$vcxsrc"
head -n$n "$vcxsrc"/YosysVS/YosysVS.vcxproj
egrep '\.(h|hh|hpp|inc)$' srcfiles.txt | sed 's,.*,,'
egrep -v '\.(h|hh|hpp|inc)$' srcfiles.txt | sed 's,.*,,'
- echo ''
+ echo "YOSYS_VER_STR=\"${yosysverstr}\";%(PreprocessorDefinitions)"
tail -n +$((n+1)) "$vcxsrc"/YosysVS/YosysVS.vcxproj
} > "$vcxsrc"/YosysVS/YosysVS.vcxproj.new
@@ -27,9 +28,6 @@ mkdir -p "$vcxsrc"/yosys
tar -cf - -T srcfiles.txt | tar -xf - -C "$vcxsrc"/yosys
cp -r share "$vcxsrc"/
-echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"Yosys" \
- "$yosysver (git sha1 $gitsha, Visual Studio)\"; }" > "$vcxsrc"/yosys/kernel/version.cc
-
cat > "$vcxsrc"/readme-git.txt << EOT
Want to use a git working copy for the yosys source code?
Open "Git Bash" in this directory and run: