From 0471d158d955804c011338c5c664dfa7a38aed1f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 18 Oct 2014 19:00:52 +0200 Subject: Various improvements to version reporting on win32 --- misc/create_vcxsrc.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'misc') diff --git a/misc/create_vcxsrc.sh b/misc/create_vcxsrc.sh index eb223930..215e27c5 100644 --- a/misc/create_vcxsrc.sh +++ b/misc/create_vcxsrc.sh @@ -1,7 +1,9 @@ #!/bin/bash set -ex -vcxsrc="$1" +vcxsrc="$1-$2" +yosysver="$2" +gitsha="$3" rm -rf YosysVS-Tpl-v1.zip YosysVS wget http://www.clifford.at/yosys/nogit/YosysVS-Tpl-v1.zip @@ -15,6 +17,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 '' tail -n +$((n+1)) "$vcxsrc"/YosysVS/YosysVS.vcxproj } > "$vcxsrc"/YosysVS/YosysVS.vcxproj.new @@ -22,10 +25,13 @@ mv "$vcxsrc"/YosysVS/YosysVS.vcxproj.new "$vcxsrc"/YosysVS/YosysVS.vcxproj mkdir -p "$vcxsrc"/yosys tar -cf - -T srcfiles.txt | tar -xf - -C "$vcxsrc"/yosys +cp -r share "$vcxsrc"/ -cat > "$vcxsrc"/readme-git.txt << EOT -Using a git working copy for the yosys source code: +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: mv yosys yosys.bak @@ -35,5 +41,14 @@ Open "Git Bash" in this directory and run: unzip ../genfiles.zip EOT -sed -i 's/$/\r/; s/\r\r*/\r/g;' "$vcxsrc"/YosysVS/YosysVS.vcxproj "$vcxsrc"/readme-git.txt +cat > "$vcxsrc"/readme-abc.txt << EOT +Yosys is using "ABC" for gate-level optimizations and technology +mapping. Download yosys-win32-mxebin-$yosysver.zip and copy the +following files from it into this directory: + + pthreadVC2.dll + yosys-abc.exe +EOT + +sed -i 's/$/\r/; s/\r\r*/\r/g;' "$vcxsrc"/YosysVS/YosysVS.vcxproj "$vcxsrc"/readme-git.txt "$vcxsrc"/readme-abc.txt -- cgit v1.2.3