forked from vedderb/vesc_tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_win
executable file
·86 lines (75 loc) · 2.32 KB
/
build_win
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
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
# https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows
# https://github.com/mxe/mxe/issues/2561
# cd /opt
# sudo mkdir mxe2
# sudo chown $USER mxe2
# git clone https://github.com/mxe/mxe.git mxe2
# sudo apt-get install autoconf automake autopoint bash bison bzip2 flex gettext git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev libtool libltdl-dev libssl-dev libxml-parser-perl make openssl p7zip-full patch perl pkg-config python ruby scons sed unzip wget xz-utils g++-multilib libc6-dev-i386 libtool-bin lzip python-mako
# cd mxe2
# make qtbase
# make qtserialport
# make qtconnectivity
# make qtquickcontrols
# make qtquickcontrols2
# make qtserialbus
# make qtlocation
# make qtgamepad
# make qtgraphicaleffects
set -e
export PATH=/opt/mxe2/usr/bin/:$PATH
rm -rf build/win/*
# Original
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_original"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_original_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Platinum
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_platinum"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_platinum_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Gold
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_gold"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_gold_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Silver
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_silver"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_silver_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Bronze
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_bronze"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_bronze_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..
# Free of charge
/opt/mxe2/usr/bin/i686-w64-mingw32.static-qmake-qt5 -config release "CONFIG+=release_win build_free"
make clean
make -j8
rm -rf build/win/obj
cd build/win
zip vesc_tool_free_windows.zip vesc_tool*.exe
ls | grep -v '\.zip$' | xargs rm
cd ../..