Skip to content

Commit

Permalink
Merge branch 'master' into master_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
iiLubos authored Oct 31, 2023
2 parents 5316466 + 231fe1e commit ca93533
Show file tree
Hide file tree
Showing 167 changed files with 5,613 additions and 6,983 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ jobs:
if: ( github.repository == 'MerginMaps/input' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: macos-12
env:
QT_VERSION: '6.5.2'
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
NDK_VERSION: r25
NDK_VERSION_FULL: r25b
JDK_VERSION: 11
SDK_PLATFORM: android-33
SDK_BUILD_TOOLS: 33.0.1
INPUT_SDK_VERSION_ARM: arm-android-20230824-200
INPUT_SDK_VERSION_ARM64: arm64-android-20230824-200
INPUT_SDK_VERSION_ARM: arm-android-20231006-201
INPUT_SDK_VERSION_ARM64: arm64-android-20231006-201
CCACHE_DIR: /Users/runner/work/ccache
GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }}
CACHE_VERSION: 2
CACHE_VERSION: 0
QT_ANDROID_KEYSTORE_ALIAS: input
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }}
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.INPUTKEYSTORE_STOREPASS }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- published

env:
QT_VERSION: '6.5.2'
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
CACHE_VERSION: 0

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gallery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-2019]
runs-on: ${{ matrix.os }}
env:
QT_VERSION: '6.5.2'
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
GITHUB_TOKEN: ${{ secrets.INPUTAPP_BOT_GITHUB_TOKEN }}
CACHE_VERSION: 0
XC_VERSION: ${{ '14.2' }} # macos-only
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: ( github.repository == 'MerginMaps/input' ) && (!contains(github.event.head_commit.message, 'Translate '))
runs-on: ubuntu-latest
env:
QT_VERSION: '6.5.2'
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
steps:

- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ on:
- published

env:
QT_VERSION: '6.5.2'
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
XC_VERSION: ${{ '14.2' }}
IOS_CMAKE_TOOLCHAIN_VERSION: "4.4.0"
INPUT_SDK_VERSION: arm64-ios-20230824-157
INPUT_SDK_VERSION: arm64-ios-20231006-158
IOS_PROVISIONING_PROFILE_UUID: 59aaa8d7-516a-4592-8c58-d7d1c1f81610
KEYCHAIN: ${{ 'inputapp.keychain' }}
CCACHE_DIR: /Users/runner/work/ccache
CACHE_VERSION: 2
CACHE_VERSION: 0

concurrency:
group: ci-${{github.ref}}-ios
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ on:

env:
CCACHE_DIR: ~/.ccache
INPUT_SDK_VERSION: x64-linux-20230824-162
QT_VERSION: '6.5.2'
CACHE_VERSION: 1
INPUT_SDK_VERSION: x64-linux-20231006-163
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
CACHE_VERSION: 0

concurrency:
group: ci-${{github.ref}}-linux
Expand Down Expand Up @@ -149,6 +149,8 @@ jobs:
- name: run tests
env:
TEST_MERGIN_URL: https://test.dev.merginmaps.com/
TEST_API_USERNAME: test_mobileapp
TEST_API_PASSWORD: ${{ secrets.TEST_API_PASSWORD }}
QT_QPA_PLATFORM: "offscreen"
run: |
cd build-Input-db/
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ on:
- published

env:
QT_VERSION: '6.5.2'
INPUT_SDK_VERSION: x64-osx-20230824-181
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
INPUT_SDK_VERSION: x64-osx-20231005-182
CCACHE_DIR: /Users/runner/work/ccache
CACHE_VERSION: 2
CACHE_VERSION: 0
XC_VERSION: ${{ '14.2' }}

concurrency:
Expand Down Expand Up @@ -148,6 +148,8 @@ jobs:
- name: run tests
env:
TEST_MERGIN_URL: https://test.dev.merginmaps.com/
TEST_API_USERNAME: test_mobileapp2
TEST_API_PASSWORD: ${{ secrets.TEST_API_PASSWORD }}
run: |
cd build-Input-db/
ctest --output-on-failure
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
runs-on: windows-2019

env:
QT_VERSION: '6.5.2'
INPUT_SDK_VERSION: x64-windows-20230824-209
QT_VERSION: '6.5.3' # use scripts/update_qt_version.bash to change
INPUT_SDK_VERSION: x64-windows-20231006-210
CCACHE_DIR: C:/ccache-cache # https://linux.die.net/man/1/ccache
CACHE_VERSION: 3
CACHE_VERSION: 0
VS_VERSION: "2019"
QT_ARCH: "win64_msvc2019_64"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ app/android/AndroidManifest.xml
*.gpkg-shm
Input_keystore.keystore
CMakeLists.txt.user
app/android/build.gradle
app/android/.gradle/*
app/android/.gradle
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"description": "<p>Mergin Maps Input app is a QGIS based mobile app for Android and iOS devices.</p>",
"license": "GPLv3",
"title": "Mergin Maps Input: QGIS in your pocket",
"version": "2.3.1",
"version": "2.4.1",
"upload_type": "software",
"publication_date": "2022-02-24",
"creators": [
Expand Down Expand Up @@ -43,7 +43,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/MerginMaps/input/tree/2.3.1",
"identifier": "https://github.com/MerginMaps/input/tree/2.4.1",
"relation": "isSupplementTo"
},
{
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cff-version: 2.3.1
cff-version: 2.4.1
message: "If you use this software, please cite it as below."
authors:
- family-names: "Martin"
Expand Down
48 changes: 17 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ cmake_minimum_required(VERSION 3.22)

# TODO automatically change with the scripts/update version script
set(MM_VERSION_MAJOR "2")
set(MM_VERSION_MINOR "3")
set(MM_VERSION_MINOR "4")
set(MM_VERSION_PATCH "1")
set(QT_VERSION_DEFAULT "6.5.2")
set(QT_VERSION_DEFAULT "6.5.3")

# Note: we cannot set this for non-android build, since CMake will start looking for
# Qt6AndroidMacros.cmake
Expand All @@ -24,6 +24,10 @@ if (DEFINED ENV{INPUT_SDK_ANDROID_BASE})
# Target/Minimum API levels for Android, used as Input target properties
set(INPUT_ANDROID_TARGET_SDK_VERSION "33")
set(INPUT_ANDROID_MIN_SDK_VERSION "${ANDROIDAPI}")
set(INPUT_ANDROID_NDK_PATH "$ENV{ANDROID_NDK_ROOT}")
if (NOT INPUT_ANDROID_NDK_PATH)
message(FATAL_ERROR "Set required environment variable ANDROID_NDK_ROOT.")
endif ()
endif ()

if (IOS)
Expand Down Expand Up @@ -77,14 +81,6 @@ else ()
set(HAVE_BLUETOOTH_DEFAULT TRUE)
endif ()

if (IOS)
set(HAVE_PURCHASING_DEFAULT TRUE)
set(HAVE_APPLE_PURCHASING_DEFAULT TRUE)
else ()
set(HAVE_PURCHASING_DEFAULT ${ENABLE_TESTS_DEFAULT})
set(HAVE_APPLE_PURCHASING_DEFAULT FALSE)
endif ()

# on android in multi-ABI build, command line variables are NOT passed to
# ExternalProject_Add called by QT. Therefore we need to pass the variables through ENV
if (ANDROID)
Expand Down Expand Up @@ -146,14 +142,7 @@ set(HAVE_BLUETOOTH
${HAVE_BLUETOOTH_DEFAULT}
CACHE BOOL "Building with bluetooth position provider"
)
set(HAVE_PURCHASING
${HAVE_PURCHASING_DEFAULT}
CACHE BOOL "Build with purchasing (e.g. for test of purchasing GUI)"
)
set(HAVE_APPLE_PURCHASING
${HAVE_APPLE_PURCHASING_DEFAULT}
CACHE BOOL "Building with Apple's StoreKit support"
)

set(QT6_VERSION
${QT_VERSION_DEFAULT}
CACHE STRING "QT6 version to use"
Expand All @@ -173,7 +162,16 @@ message(STATUS "Mergin Maps Input ${version_desc} - ${platform_desc}")

if (ANDROID)
set(INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a ${INPUT_SDK_PATH}/arm-android)

if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_armeabi-v7a})
message(WARNING "INPUT_SDK_PATH arm-android directory does not exist!")
endif ()

set(INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a ${INPUT_SDK_PATH}/arm64-android)
if (NOT EXISTS ${INPUT_SDK_PATH_ANDROID_ABI_arm64-v8a})
message(WARNING "INPUT_SDK_PATH arm64-android directory does not exist!")
endif ()

set(INPUT_SDK_PATH_MULTI ${INPUT_SDK_PATH_ANDROID_ABI_${ANDROID_ABI}})
# allow libraries outside of SDK/NDK directory
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
Expand Down Expand Up @@ -215,7 +213,7 @@ if (NOT IOS)
)
endif ()

if (NOT LINUX)
if (NOT LNX)
find_package(Charset REQUIRED)
find_package(Iconv REQUIRED)
endif ()
Expand Down Expand Up @@ -330,14 +328,6 @@ if (ENABLE_TESTS)
set(TEST_DATA_DIR "${CMAKE_CURRENT_BINARY_DIR}/test/test_data")
endif ()

if (HAVE_PURCHASING)
set(PURCHASING TRUE)
endif ()

if (HAVE_APPLE_PURCHASING)
set(APPLE_PURCHASING TRUE)
endif ()

configure_file(
${CMAKE_SOURCE_DIR}/cmake_templates/inputconfig.h.in ${CMAKE_BINARY_DIR}/inputconfig.h
)
Expand Down Expand Up @@ -376,10 +366,6 @@ if (IOS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-shorten-64-to-32")
endif ()

if (ANDROID)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g0")
endif ()

# ########################################################################################
# SUBDIRECTORIES
# ########################################################################################
Expand Down
35 changes: 26 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Building Mergin Maps Input from source - step by step
Building Mergin Maps mobile app from source - step by step


# Table of Contents
Expand All @@ -16,7 +16,7 @@ Building Mergin Maps Input from source - step by step
* [5. Building iOS](#5-building-ios)
* [6. Building macOS](#6-building-macos)
* [7. Building Windows](#7-building-windows)

* [8. Auto Testing](#9-auto-testing)

# 1. Introduction

Expand Down Expand Up @@ -126,7 +126,7 @@ Steps to build and run Input:
mkdir build
cd build
cmake -G Ninja \
-DCMAKE_PREFIX_PATH=~/Qt/6.5.2/gcc_64 \
-DCMAKE_PREFIX_PATH=~/Qt/6.5.3/gcc_64 \
-DINPUT_SDK_PATH=~/input-sdk/x64-linux \
-DQGIS_QUICK_DATA_PATH=~/input/app/android/assets/qgis-data \
..
Expand Down Expand Up @@ -281,8 +281,8 @@ Now you can create a build (either on commmand line or by setting these variable
cmake \
-DIOS=TRUE \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.5.2/ios \
-DQT_HOST_PATH=/opt/Qt/6.5.2/macos \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.5.3/ios \
-DQT_HOST_PATH=/opt/Qt/6.5.3/macos \
-DCMAKE_TOOLCHAIN_FILE:PATH="~/input-sdk/ios.toolchain.cmake" \
-DCMAKE_INSTALL_PREFIX:PATH="../install" \
-DUSE_SERVER_API_KEY=FALSE \
Expand All @@ -298,10 +298,10 @@ Now you can create a build (either on commmand line or by setting these variable
2. Get Input SDK - it contains pre-built dependencies of libraries used by Input

- Check what SDK version is currently in use - look for `INPUT_SDK_VERSION` in `.github/workflows/macos.yml`
- Download Input SDK for Ubuntu - go to https://github.com/merginmaps/input-sdk/releases and download the built SDK.
- Download Input SDK for `osx` - go to https://github.com/merginmaps/input-sdk/releases and download the built SDK.
- Unpack the downloaded .tar.gz to `~/input-sdk/x64-osx`

3. Get Qt libraries - Ubuntu's system libraries are too old, and currently Input SDK does not include Qt SDK.
3. Get Qt libraries - Input SDK does not include Qt SDK

- Check what Qt version is currently in use - look for `QT_VERSION` in `.github/workflows/macos.yml`
- Download Qt online installer from https://www.qt.io/download-open-source
Expand All @@ -318,7 +318,7 @@ export BASE_DIR=~/Projects/quick;
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.5.2/macos \
-DCMAKE_PREFIX_PATH=/opt/Qt/6.5.3/macos \
-DCMAKE_INSTALL_PREFIX:PATH=$BASE_DIR/install-macos \
-DINPUT_SDK_PATH=$BASE_DIR/sdk/x64-osx \
-GNinja \
Expand Down Expand Up @@ -346,7 +346,7 @@ For version of the tools used, see `.github/workflows/win.yml`
- setup build environment
```
set ROOT_DIR=C:\Users\zilol\Projects
set Qt6_DIR=C:\Qt\6.5.2\msvc2019_64
set Qt6_DIR=C:\Qt\6.5.3\msvc2019_64
set PATH=%QT_ROOT%\bin;C:\Program Files\CMake\bin\;%PATH%
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
```
Expand All @@ -372,3 +372,20 @@ set CL=/MP
nmake
```

# 8. Auto Testing

You need to add cmake define `-DENABLE_TESTING=TRUE` on your cmake configure line.
Also you need to open Passbolt and check for password for user `test_mobileapp_dev` on `test.dev.merginmaps.com`,
or you need some user with unlimited projects limit. First workspace from list is taken.

! Note that the same user cannot run tests in paraller !

now you need to set environment variables:
```
TEST_MERGIN_URL=test.dev.merginmaps.com
TEST_API_USERNAME=test_mobileapp_dev
TEST_API_PASSWORD=<your_password>
```

Build binary and you can run tests either with `ctest` or you can run individual tests by adding `--test<TestName>`
e.g. ` ./input --testMerginApi`
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Mergin Maps Input App

<img src="images/MM_logo.png" width=350>
<picture>
<source media="(prefers-color-scheme: dark)" width=350 srcset="https://raw.githubusercontent.com/MerginMaps/.github/main/images/MM_logo_HORIZ_COLOR_INVERSE_VECTOR.svg">
<img width=350 src="https://raw.githubusercontent.com/MerginMaps/.github/main/images/MM_logo_HORIZ_COLOR_VECTOR.svg">
</picture>

Platform builds:

Expand Down
Loading

1 comment on commit ca93533

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 23.10.476411 just submitted!

Please sign in to comment.