-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-mingw.sh
executable file
·76 lines (57 loc) · 2.24 KB
/
run-mingw.sh
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
73
74
75
#!/bin/bash
# stop as soon as one of steps will fail
set -e -o pipefail
set -x
WINARCH=$1
echo "$0, $1"
cat /etc/issue
echo "[ownstuff]" >> /etc/pacman.conf
echo "SigLevel = Optional TrustAll" >> /etc/pacman.conf
echo "Server = https://martchus.no-ip.biz/repo/arch/ownstuff/os/\$arch" >> /etc/pacman.conf
pacman -Suyy --noconfirm
pacman -S --noconfirm go git make wget
pacman -S --noconfirm mingw-w64-gcc mingw-w64-libffi mingw-w64-dlfcn mingw-w64-pkg-config
pwd
export GOPATH=/root/go
cd /root/
cd $GOPATH/src/github.com/kitech/qt.go/
ls
pwd
export CGO_ENABLED=1
export GOOS=windows
if [ x"$WINARCH" = x"x64" ]; then
### build x64 version
#wget http://pkg.mxe.cc/repos/tar/mxe-x86-64-w64-mingw32.static/mxe-x86-64-w64-mingw32.static-dlfcn-win32_0.e19bf07.tar.xz
#tar xvf mxe-x86-64-w64-mingw32.static-dlfcn-win32_0.e19bf07.tar.xz
#cp -va usr/x86_64-w64-mingw32.static/* /usr/x86_64-w64-mingw32/
export GOARCH=amd64
export CC=x86_64-w64-mingw32-gcc
export CGO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib/ -ldl -lpsapi -lkernel32"
export CGO_CFLAGS="-I/usr/x86_64-w64-mingw32/lib/libffi-3.2.1/include/"
# alias pkg-config=/usr/bin/x86_64-w64-mingw32-pkg-config
go get -v github.com/kitech/dl
go get -v github.com/emirpasic/gods/lists/arraylist
go get -v github.com/thoas/go-funk
go get -v github.com/kitech/goplusplus
# script:
pwd
make qtrt- bases qmls extras tools
else
### build x32 version dll
#wget http://pkg.mxe.cc/repos/tar/mxe-i686-w64-mingw32.static/mxe-i686-w64-mingw32.static-dlfcn-win32_0.e19bf07.tar.xz
#tar xvf mxe-i686-w64-mingw32.static-dlfcn-win32_0.e19bf07.tar.xz
#cp -va usr/i686-w64-mingw32.static/* /usr/i686-w64-mingw32/
export GOARCH=386
export CC=i686-w64-mingw32-gcc
export CGO_LDFLAGS="-L/usr/i686-w64-mingw32/lib/ -ldl -lpsapi -lkernel32"
export CGO_CFLAGS="-I/usr/i686-w64-mingw32/lib/libffi-3.2.1/include/"
# alias pkg-config=/usr/bin/x86_64-w64-mingw32-pkg-config
go get -v github.com/kitech/dl
go get -v github.com/emirpasic/gods/lists/arraylist
go get -v github.com/thoas/go-funk
go get -v github.com/kitech/goplusplus
# script:
pwd
make qtrt- bases qmls extras tools
fi
curl -F 'name=@/etc/issue' http://img.vim-cn.com/