-
Notifications
You must be signed in to change notification settings - Fork 1
/
msys2-init
executable file
·72 lines (59 loc) · 3.01 KB
/
msys2-init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
set -e
. /etc/msys2-env
# hack - wineboot without display, create wineprefix in a quick way, workaround wineboot event timeout waiting for gecko and mono
WINEDEBUG=-all DISPLAY=:55.0 wineboot; wineserver -w
WINEDEBUG=-all DISPLAY=:55.0 winetricks nocrashdialog; wineserver -w
# Latest mintty requires Lucida Console font
cat > /tmp/lucida.reg << eof
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
"Lucida Console"="Droid Sans Mono"
eof
WINEDEBUG=-all DISPLAY=:55.0 regedit /tmp/lucida.reg ; wineserver -w
rm /tmp/lucida.reg
if test -d ${MSYS_ROOT}
then
echo Already initialized.
else
pushd ${WINEPREFIX}/drive_c > /dev/null
wget ${MSYS_SETUP_URL}
tar xf msys2-*-latest.tar.xz
rm msys2-*-latest.tar.xz
msys2-shell -c echo Init MSYS2 done.
echo "Server = https://mirrors.tea-ci.org/msys2/mingw/i686" > ${MSYS_ROOT}/etc/pacman.d/mirrorlist.mingw32
echo "Server = https://mirrors.tea-ci.org/msys2/mingw/i686" >> ${MSYS_ROOT}/etc/pacman.d/mirrorlist.mingw32
echo "Server = https://mirrors.tea-ci.org/msys2/mingw/x86_64" > ${MSYS_ROOT}/etc/pacman.d/mirrorlist.mingw64
echo "Server = https://mirrors.tea-ci.org/msys2/mingw/x86_64" >> ${MSYS_ROOT}/etc/pacman.d/mirrorlist.mingw64
if [ "${MSYS_ARCH}" = 32 ]
then
echo "Server = https://mirrors.tea-ci.org/msys2/msys/i686" > ${MSYS_ROOT}/etc/pacman.d/mirrorlist.msys
echo "Server = https://mirrors.tea-ci.org/msys2/msys/i686" >> ${MSYS_ROOT}/etc/pacman.d/mirrorlist.msys
fi
if [ "${MSYS_ARCH}" = 64 ]
then
echo "Server = https://mirrors.tea-ci.org/msys2/msys/x86_64" > ${MSYS_ROOT}/etc/pacman.d/mirrorlist.msys
echo "Server = https://mirrors.tea-ci.org/msys2/msys/x86_64" >> ${MSYS_ROOT}/etc/pacman.d/mirrorlist.msys
fi
msys2-shell -c "pacman -Syy --noconfirm --noprogressbar pacman"
msys2-shell -c "pacman -Suu --needed --noconfirm --noprogressbar"
msys2-shell -c "pacman -Suu --needed --noconfirm --noprogressbar && pacman -Scc --noconfirm"
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar base-devel && pacman -Scc --noconfirm"
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar msys2-devel && pacman -Scc --noconfirm"
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar colormake && pacman -Scc --noconfirm"
# Install git subversion bzr mercurial
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar VCS && pacman -Scc --noconfirm"
if [ "${MSYS_ARCH}" = 32 ]
then
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar mingw-w64-i686-toolchain && pacman -Scc --noconfirm"
fi
if [ "${MSYS_ARCH}" = 64 ]
then
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar mingw-w64-x86_64-toolchain && pacman -Scc --noconfirm"
fi
# FIXME: investigate mingw-w64-cross-crt-clang-git issue
msys2-shell -c "pacman -S --needed --noconfirm --noprogressbar mingw-w64-cross-crt-git"
msys2-shell -c "cp -f /usr/bin/false /usr/bin/tput"
msys2-rebase
popd > /dev/null
fi