From d4ac3b1e7d0c457285cbbcb71a1ec2a3c0997c87 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 5 Jun 2026 09:24:19 +0200 Subject: [PATCH] No need for script when CMake is used --- misc/create_vcxsrc.sh | 71 ------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 misc/create_vcxsrc.sh diff --git a/misc/create_vcxsrc.sh b/misc/create_vcxsrc.sh deleted file mode 100644 index dccc31fac..000000000 --- a/misc/create_vcxsrc.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash - -set -ex -vcxsrc="$1" -yosysver="$2" - -rm -rf YosysVS-Tpl-v2.zip YosysVS -wget https://github.com/YosysHQ/yosys/releases/download/resources/YosysVS-Tpl-v2.zip -wget https://github.com/YosysHQ/yosys/releases/download/resources/zlib-1.2.11.tar.gz - -unzip YosysVS-Tpl-v2.zip -rm -f YosysVS-Tpl-v2.zip -tar xvfz zlib-1.2.11.tar.gz - -mv YosysVS "$vcxsrc" -mkdir -p "$vcxsrc"/yosys -mkdir -p "$vcxsrc"/yosys/libs/zlib -mv zlib-1.2.11/* "$vcxsrc"/yosys/libs/zlib/. -rm -rf zlib-1.2.11 -pushd "$vcxsrc"/yosys -ls libs/zlib/*.c | sed 's,.*:,,; s,//*,/,g; s,/[^/]*/\.\./,/,g; y, \\,\n\n,;' | grep '^[^/]' >> ../../srcfiles.txt - -if [ -f "/usr/include/FlexLexer.h" ] ; then - mkdir -p libs/flex - cp /usr/include/FlexLexer.h libs/flex/FlexLexer.h - ls libs/flex/*.h >> ../../srcfiles.txt -fi -sed -i '\#libs/../kernel/yosys.h#d' ../../srcfiles.txt - -popd -{ - n=$(grep -B999 '' "$vcxsrc"/YosysVS/YosysVS.vcxproj | wc -l) - 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,.*,,' - tail -n +$((n+1)) "$vcxsrc"/YosysVS/YosysVS.vcxproj -} > "$vcxsrc"/YosysVS/YosysVS.vcxproj.new - -sed -i 's,,\n stdcpp20\n /Zc:__cplusplus %(AdditionalOptions),g' "$vcxsrc"/YosysVS/YosysVS.vcxproj.new -sed -i 's,,YOSYS_ENABLE_THREADS;,g' "$vcxsrc"/YosysVS/YosysVS.vcxproj.new -if [ -f "/usr/include/FlexLexer.h" ] ; then - sed -i 's,,;..\\yosys\\libs\\flex,g' "$vcxsrc"/YosysVS/YosysVS.vcxproj.new -fi -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 -Want to use a git working copy for the yosys source code? -Open "Git Bash" in this directory and run: - - mv yosys yosys.bak - git clone https://github.com/YosysHQ/yosys.git yosys - cd yosys - git checkout -B main $(git rev-parse HEAD | cut -c1-10) - unzip ../genfiles.zip -EOT - -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 -