Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline MinGW package installation for CI #2004

Merged
merged 3 commits into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1088,12 +1088,7 @@ endlocal
Install tools and dependencies:

```bash
for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest
do (echo y | pacman -S $i) ; done
pacman --noconfirm -S --needed base-devel mingw-w64-x86_64-{toolchain,cmake,expat,gettext,gtest,libiconv,python-lxml,zlib}
```

#### Download exiv2 from github and build
Expand Down Expand Up @@ -1148,6 +1143,8 @@ bash.exe -norc
endlocal
```

The utility apt-cyg can be downloaded and used to install dependencies. The code to do this is in appveyor\_mingw\_cygwin.yml.

[TOC](#TOC)
<div id="5-5">
### 5.5 Visual Studio
Expand Down Expand Up @@ -1258,5 +1255,5 @@ $ sudo pkg install developer/gcc-7

[TOC](#TOC)

Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2021-08-10
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2021-11-28

12 changes: 3 additions & 9 deletions appveyor_mingw_cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,14 @@ shallow_clone: true

install:
- echo %APPVEYOR_BUILD_FOLDER%
- if "%BUILD%"=="MINGW64" set "PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
- if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "python -m pip install --upgrade pip;pip3.exe install lxml ; for i in base-devel git coreutils dos2unix tar diffutils make \
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
- if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S --needed base-devel mingw-w64-x86_64-{toolchain,cmake,expat,gettext,gtest,libiconv,python-lxml,zlib}"
- if "%BUILD%"=="MINGW64" set "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\local\bin;C:\msys64\usr\bin;C:\msys64\bin;"
- cd %APPVEYOR_BUILD_FOLDER%
- if "%BUILD%"=="CYGWIN64" set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"

- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "wget https://github.com/transcode-open/apt-cyg/master/apt-cyg ; chmod +x apt-cyg; mv apt-cyg /usr/local/bin"
# Issue:#2003 Change mirror used by apt-cyg. cmake installed by default mirror is broken
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "apt-cyg mirror http://mirrors.kernel.org/sources.redhat.com/cygwin/"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "apt-cyg install cmake curl zlib-devel libexpat-devel libxml2-devel libxslt-devel python38 python38-pip python38-libxml2 tar"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "/usr/bin/python3.8.exe -m pip install --upgrade pip"
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "apt-cyg install cmake libexpat-devel libxml2-devel libxslt-devel python38-lxml zlib-devel"
# As a last resort, build CMake from source. Caution: This takes about 60 minutes.
# if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "cd /tmp; curl -LO https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0.tar.gz; tar xfz cmake-3.22.0.tar.gz; cd cmake-3.22.0 ; ./bootstrap ; make ; make install"

Expand Down