-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
132 lines (102 loc) · 4.03 KB
/
INSTALL
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
1. Prerequisites:
- Qt 5.9.8 msvc2015 and Qt 5.6.1-1 android needed on Windows
- Qt 5.9.8 needed on Mac OS X and iOS
- JDK 8u144 needed on Windows
- JDK 8u144 needed on Mac OS X >= 10.7 and Apple provided JDK 6 on Mac < 10.7
- Android SDK r25.2.5 + NDK r10e needed on Windows
Qt 5:
- Ubuntu 16.04 (ppa:beineri, https://launchpad.net/~beineri):
> sudo add-apt-repository ppa:beineri/opt-qt597-xenial
> sudo apt-get update
> sudo apt-get install qt59-meta-full qt-latest qt59base qt59x11extras
- Ubuntu 14.04 (ppa:beineri, https://launchpad.net/~beineri):
> sudo apt-add-repository ppa:beineri/opt-qt597-trusty
> sudo apt-get update
> sudo apt-get install qt59-meta-full qt-latest qt59base qt59x11extras
- CentOS (6, 7, EPEL repo):
> yum install epel-release
> yum update
- Ubuntu:
> sudo apt-get install build-essential ubuntu-dev-tools debhelper dpkg-sig apt-file
- Ubuntu 14.04 openjdk 8:
> sudo add-apt-repository ppa:openjdk-r/ppa
> sudo apt-get update
> sudo apt-get install openjdk-8-jdk
- Windows environment variables for Java and Android (if preferred cmd line instead of Qt Creator):
JAVA_HOME C:\Program Files\Java\jdk1.8.0_144
ANDROID_NDK_ROOT C:\android\ndk-r10e
NDK_ROOT %ANDROID_NDK_ROOT%
ANDROID_HOME C:\android\sdk-r25.2.5
ANDROID_SDK_ROOT %ANDROID_HOME%
ANDROID_NDK_PLATFORM android-19
Add to PATH:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin\server
%ANDROID_NDK_ROOT%
%ANDROID_HOME%\tools
%ANDROID_HOME%\platform-tools
- On Mac OS X create symlink /Library/Java/Home pointing to /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
- Windows cross-compile (build on 64 for 32) JDK convenience workaround:
Add in common.pri, win32 replace isEmpty(CPPDEVTK_JAVA_HOME) test with:
isEqual(QMAKE_TARGET.arch, "x86_64") {
CPPDEVTK_JAVA_HOME = "C:/Program Files/Java/jdk1.8.0_144"
}
else {
CPPDEVTK_JAVA_HOME = "C:/Program Files (x86)/Java/jdk1.8.0_144"
}
2. Update version:
2.1 Search in files cppdevtk/common.pri and cppdevtk/include/cppdevtk/config/product_info.hpp
for CPPDEVTK_VERSION_MAJOR, CPPDEVTK_VERSION_MINOR and CPPDEVTK_VERSION_PATCH
2.2 Search in *.plist for CFBundleShortVersionString and CFBundleVersion
2.3 Modify in AndroidManifest.xml files versionName and versionCode
2.4 Update in Doxyfile PROJECT_NUMBER
2.5 Update Version in cppdevtk.spec and debian changelog
3. (optional) Copy customization files (if needed)
4. Update translations (run cppdevtk/scripts/translate.* (bat/sh))
5. Update documentation (run doxygen ./Doxyfile)
6. Build
6.1 On Windows/Linux/iOS/Android/Mac >= 10.7 build from Qt Creator
In Qt Creator:
- make sure to select Release configuration
- add in Build Steps, qmake:
shared (Lnx/Win/Mac/Android):
CONFIG+=release CONFIG+=shared
static (iOS):
CONFIG+=release CONFIG+=static
Build (on Android select one relevant app; note that iphone test apps will fail to build because they are not signed) then in bld dir:
Linux:
> make install
Windows msvc 2015 cmd prompt:
> nmake install
- move dlls in install dir from lib to bin
Mac OS X, iOS:
> make -j1 install
Android: manually copy include, libs and apk from bld dir to install dir
Mac OS X deployment:
> cd /Applications/Qt/5.9.8/clang_64/bin
> ./macdeployqt ~/TestApplication/Build/Release/TestApplication.app -always-overwrite -appstore-compliant
Optional to codesign append:
-codesign=<ident>
6.2 Mac OS X 10.4
Qt Creator does not work on Mac OS X 10.4 so use CLI...
Open terminal in cppdevtk
static:
> export PATH=/opt/cososys/third_party/static/bin:$PATH
> qmake ./cppdevtk.pro -r -spec macx-g++ CONFIG+=release CONFIG+=static
shared:
> export PATH=/opt/cososys/third_party/shared/bin:$PATH
> qmake ./cppdevtk.pro -r -spec macx-g++ CONFIG+=release CONFIG+=shared
make
make -j1 install
6.3 On Linux if packaging:
RPM: rpmbuild -ta --sign cppdevtk-1.0.0.tar.bz2
Deb:
- if needed copy distro specific from ./distros/xxx to ./
> debuild --no-tgz-check -D -us -uc -B
> dpkg-sig -k CoSoSys --sign=origin --cache-passphrase ./*.deb
Verify signature:
- rpm based
> rpm --checksig ./*.rpm
- deb based
Ubuntu 16.04: dpkg-sig --verify ./*.deb
Ubuntu 14.04: dpkg-sig-fixed --verify ./*.deb