INSTALL 4.91 KB
Newer Older
Martin Straka's avatar
Martin Straka committed
1 2 3 4
------------------------------------------------------------------------------
How to build and deploy application to the device or app store?
Guide in Czech is available on address:
https://gitlab.labs.nic.cz/datovka/mobile-datovka/wikis/build-instructions
5

Martin Straka's avatar
Martin Straka committed
6 7 8
==============================================================================
General requirements for build on Windows/Linux/OSX:
==============================================================================
Martin Straka's avatar
Martin Straka committed
9 10
- Qt5.6 or later
  - QML 2.3 or later
11
  - Application requires the Qt sqlite database driver.
Martin Straka's avatar
Martin Straka committed
12
- OpenSSL (use crypto a cms)
Martin Straka's avatar
Martin Straka committed
13
==============================================================================
14

Martin Straka's avatar
Martin Straka committed
15
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
16 17
------------------------------------------------------------------------------
Build for Unix/Linux-like systems
Martin Straka's avatar
Martin Straka committed
18 19 20
------------------------------------------------------------------------------
1. qmake mobile-datovka.pro
2. make
Martin Straka's avatar
Martin Straka committed
21 22
------------------------------------------------------------------------------
------------------------------------------------------------------------------
23 24


Martin Straka's avatar
Martin Straka committed
25
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
26 27 28
------------------------------------------------------------------------------
Build and deployment for Android platform
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
29 30
------------------------------------------------------------------------------
First you must install following tools (Windows/Linux):
Martin Straka's avatar
Martin Straka committed
31 32 33 34
- The Android SDK Tools (https://developer.android.com/studio/index.html)
- The Android NDK (https://developer.android.com/ndk/index.html)
- Apache Ant v1.8 or later (http://ant.apache.org/bindownload.cgi)
- Java SE Development Kit (JDK) v6 or later (http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
Martin Straka's avatar
Martin Straka committed
35
Note: How to install these tools is described here: http://doc.qt.io/qt-5/androidgs.html
Martin Straka's avatar
Martin Straka committed
36
- OpenSSL (use batch file in /adroid/openssl/ for build on Windows)
Martin Straka's avatar
Martin Straka committed
37
  Note: Build OpenSSL for Android on Windows requiers Mingw and MSYS (read header in the batch file for more info)
Martin Straka's avatar
Martin Straka committed
38

Martin Straka's avatar
Martin Straka committed
39 40 41 42 43
Build under Linux
-----------------
1. Download latest openssl package from https://www.openssl.org/l to /android/openssl/ and build it.
2. qmake mobile-datovka.pro
3. make
Martin Straka's avatar
Martin Straka committed
44

Martin Straka's avatar
Martin Straka committed
45 46 47 48 49 50
Build under Windows (recommended)
-------------------
1. Install SED for Windows (http://gnuwin32.sourceforge.net/packages/sed.htm) and set/add path to SED binary (C:\Program Files (x86)\GnuWin32\bin\) to Windows PATH. 
2. Download latest openssl package from https://www.openssl.org/ to /android/openssl/ and build it with batch file.
3. Run QtCreator, open mobile-datovka.pro, set platform and target to Android and build it.
4. Then "Run" app and deploy to target device. 
Martin Straka's avatar
Martin Straka committed
51 52


Martin Straka's avatar
Martin Straka committed
53
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
54 55 56
------------------------------------------------------------------------------
Build and deployment for iOS platform
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
57
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
58
You must install following tools on OSX:
Martin Straka's avatar
Martin Straka committed
59
- Qt5.6 or later (static build)
Martin Straka's avatar
Martin Straka committed
60 61 62
- Xcode 7 or later
- CommandLine tools for Xcode
- OpenSSL (use script file in /ios/openssl/ for build by Xcode)
Martin Straka's avatar
Martin Straka committed
63
Note: You must set/create "iOS developer certificate" and "provisioning profile" on the https://developer.apple.com/ and associate with target device.
Martin Straka's avatar
Martin Straka committed
64

Martin Straka's avatar
Martin Straka committed
65 66 67 68 69 70 71 72 73 74
Build under OSX
---------------
1. Download package and build openssl with script in the /ios/openssl/. 
2. Set "iOS developer certificate" and "provisioning profile" in Xcode preferences.
3. Run QtCreator, open mobile-datovka.pro, set target to ios and run qmake. It will generate Xcode project to target folder.
4. Open generated Xcode project file with Xcode.
5. In the project tab "General" must be fields "Launch Screen File" and "Main Intereface" empty.         
6. Set provisioning profile in "General" tab and set target device. 
7. Built it (Run -> deploy app to device).
8. Run Product->Archive to built AppStore packages. 
Martin Straka's avatar
Martin Straka committed
75 76


Martin Straka's avatar
Martin Straka committed
77
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
78 79 80
------------------------------------------------------------------------------
Build for Windows Phone/WinRT
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
81
------------------------------------------------------------------------------
Martin Straka's avatar
Martin Straka committed
82
You must install following tools on Windows:
Martin Straka's avatar
Martin Straka committed
83
- Qt5.6
Martin Straka's avatar
Martin Straka committed
84
- Visual Studio 2015 or later
Martin Straka's avatar
Martin Straka committed
85
  - Add "Windows Phone 8.1 SDK" during installation of VS2015
Martin Straka's avatar
Martin Straka committed
86

Martin Straka's avatar
Martin Straka committed
87 88 89
1. Run batch file in the root of project and generate VS project.
2. Open project file in the VS2015.
3. Set target and device and build it.
Martin Straka's avatar
Martin Straka committed
90 91 92

------------------------------------------------------------------------------
NOTE: Instructions for deployment of application to device and app stores will be added later.
Martin Straka's avatar
Martin Straka committed
93
https://gitlab.labs.nic.cz/datovka/mobile-datovka/wikis/build-instructions