-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcygwin-init
executable file
·56 lines (44 loc) · 2.72 KB
/
cygwin-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
#!/bin/bash
set -e
# unset DRONE to skip copying wineprefix in cygwin-init
export DRONE=false
. /etc/cygwin-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 ${CYGWIN_ROOT}
then
echo Already initialized.
else
export DISPLAY=:95
Xvfb :95 -ac -reset -terminate -screen 0 800x600x16 2>/dev/null &
sleep 3
pushd ${WINEPREFIX}/drive_c > /dev/null
wget ${CYGWIN_SETUP_URL} -O cygwin-installer.exe
mkdir /tmp/cygwin
WINEDEBUG=fixme-all wine cygwin-installer.exe --site http://mirrors.tea-ci.org/cygwin --local-package-dir Z:/tmp/cygwin -W -q
# Workaround https://bugs.wine-staging.com/show_bug.cgi?id=653
setfattr -x user.wine.sd ${CYGWIN_ROOT}/tmp/
# Workaround https://bugs.wine-staging.com/show_bug.cgi?id=403
cp ${CYGWIN_ROOT}/etc/postinstall/bash.sh.done ${CYGWIN_ROOT}/etc/profile.d/workaround_bug_403.sh
WINEDEBUG=fixme-all wine cygwin-installer.exe --site http://mirrors.tea-ci.org/cygwin --local-package-dir Z:/tmp/cygwin -W -P mintty -q
WINEDEBUG=fixme-all wine cygwin-installer.exe --site http://mirrors.tea-ci.org/cygwin --local-package-dir Z:/tmp/cygwin -W -P cocom,gcc,gcc-core,gcc-g++,binutils,autogen,bison,diffstat,diffutils,dos2unix,file,flex,gettext,gperf,grep,groff,help2man,lemon,libtool,m4,make,patch,patchutils,perl,pkg-config,pkgfile,pth,quilt,rcs,sed,swig,ttyrec,unrar,unzip -q
#WINEDEBUG=fixme-all wine cygwin-installer.exe --site http://mirrors.tea-ci.org/cygwin --local-package-dir Z:/tmp/cygwin -W -P cocom,gcc,gcc-core,gcc-g++,binutils,autogen,bison,diffstat,diffutils,dos2unix,file,flex,gettext,gettext-develgperf,grep,groff,help2man,intltool,lemon,libtool,m4,make,patch,patchutils,perl,pkg-config,pkgfile,pth,quilt,rcs,scons,sed,swig,ttyrec,unrar,wget,xmlto -q
# We do not need to worry about cache because we put it is into Z:/tmp/cygwin which will not be copied to docker image.
# FIXME These packages use symlinks which does not work with docker images: autoconf(autom4te),automake(aclocal),gawk(awk),python(python),ca-certificates
# And packages depending on them: asciidoc,gettext-devel,git,intltool,scons,xmlto,wget
wineserver -w
unset DISPLAY
cygwin-rebase
cygwin-shell -c cp -f /usr/bin/false /usr/bin/tput
cygwin-shell -c echo Init CYGWIN done.
popd > /dev/null
fi