Skip to content

Commit

Permalink
Refs fibercrypto#342, trying another approach using the git-win shell…
Browse files Browse the repository at this point in the history
… only
  • Loading branch information
stdevPavelmc committed Dec 9, 2019
1 parent 40d464a commit 7bb87f9
Showing 1 changed file with 46 additions and 26 deletions.
72 changes: 46 additions & 26 deletions ci-scripts/install-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,61 @@ set +e
# msys2 shell lite pacman installs, etc...
export msys2="cmd.exe //C RefreshEnv.cmd & C:/tools/msys64/msys2_shell.cmd -defterm -mingw64 -no-start -full-path -here -c \$\* --"

# install msys2 using chocolatey
choco install msys2
# dependencies
choco install make
choco install protoc
choco install unzip
choco install tree
choco install python3
choco install pip
choco install gcc-arm-embedded
choco install gcc-arm
choco install cppcheck
choco install llvm

# get and install SDL2
curl http://libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz
tar -zvzf SDL2*gz
cd SDL2-2.0.10/x86_64-w64-mingw32
# copy all .a from lib to lib
cp lib/*.a /usr/lib/
cd include
cp -r SDL2 /usr/include
cd ../bin
cp * /usr/bin

$msys2 pacman -Sy --noconfirm make gcc protobuf unzip python3-pip tree
# install msys2 using chocolatey
# choco install msys2
# $msys2 pacman -Sy --noconfirm make gcc protobuf unzip python3-pip tree
# $msys2 pacman -Sy --noconfirm mingw-w64-x86_64-check
# $msys2 pacman -Sy --noconfirm mingw-w64-x86_64-SDL2
# $msys2 pacman -Sy --noconfirm mingw-w64-x86_64-protobuf-c
# $msys2 pacman -Sy --noconfirm mingw-w64-x86_64-clang

# There are no available packages for MSYS2, listed below
# To make them work under MSYS2, we need to move all files to MSYS2 /usr/
$msys2 pacman -Sy --noconfirm mingw-w64-x86_64-check
$msys2 pacman -Sy --noconfirm mingw-w64-x86_64-SDL2
$msys2 pacman -Sy --noconfirm mingw-w64-x86_64-protobuf-c
$msys2 pacman -Sy --noconfirm mingw-w64-x86_64-clang
set -e && echo "If u got error"
#set -e && echo "If u got error"

# debug the fylesystem structure on travis
$msys2 tree -L 3 --filelimit 100 /c/tools/
#$msys2 tree -L 3 --filelimit 100 /c/tools/

echo "Successfully installed all tools"
#echo "Successfully installed all tools"

cd /c/tools/msys64/mingw64/bin
cp checkmk libcheck-0.dll SDL2.dll sdl2-config libprotobuf-c-1.dll protoc-c.exe protoc-gen-c.exe /usr/bin/
# cd /c/tools/msys64/mingw64/bin
# cp checkmk libcheck-0.dll SDL2.dll sdl2-config libprotobuf-c-1.dll protoc-c.exe protoc-gen-c.exe "/c/Program Files/Git/usr/bin"

cd /c/tools/msys64/mingw64/include
cp check.h check_stdint.h /usr/include/
cp -r SDL2 google protobuf-c /usr/include/
# cd /c/tools/msys64/mingw64/include
# cp check.h check_stdint.h /usr/include/
# cp -r SDL2 google protobuf-c /usr/include/

cd /c/tools/msys64/mingw64/lib
cp libcheck.a libcheck.dll.a libSDL2.a libSDL2.dll.a libSDL2_test.a libSDL2main.a libprotobuf-c.a libprotobuf-c.dll.a /usr/lib/
cp pkgconfig/sdl2.pc pkgconfig/check.pc pkgconfig/libprotobuf-c.pc /usr/lib/pkgconfig/
# cd /c/tools/msys64/mingw64/lib
# cp libcheck.a libcheck.dll.a libSDL2.a libSDL2.dll.a libSDL2_test.a libSDL2main.a libprotobuf-c.a libprotobuf-c.dll.a /usr/lib/
# cp pkgconfig/sdl2.pc pkgconfig/check.pc pkgconfig/libprotobuf-c.pc /usr/lib/pkgconfig/

cd /c/tools/msys64/mingw64/share
cp licenses/protobuf-c/LICENSE /usr/share/licenses/
cp aclocal/check.m4 aclocal/sdl2.m4 /usr/share/aclocal/
cp -r doc/check /usr/share/doc/
cp ./info/check.info.gz /usr/share/info/
cp ./man/man1/checkmk.1.gz /usr/share/man/man1/
# cd /c/tools/msys64/mingw64/share
# cp licenses/protobuf-c/LICENSE /usr/share/licenses/
# cp aclocal/check.m4 aclocal/sdl2.m4 /usr/share/aclocal/
# cp -r doc/check /usr/share/doc/
# cp ./info/check.info.gz /usr/share/info/
# cp ./man/man1/checkmk.1.gz /usr/share/man/man1/

echo "Successfully moved all needed tools"
echo "WARNING!!! Don't forget to install Arm-None-Eabi Toolchain and ST-Link Utility"
Expand Down

0 comments on commit 7bb87f9

Please sign in to comment.