diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 406f99be5..3477e150b 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -23,7 +23,7 @@ Follow the instructions for your OS, and afterwards the repository is prepared t ## Setting up to your OS of development -
+
Linux Clone the repository @@ -31,11 +31,41 @@ Clone the repository git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git ``` -Install required packages (Ubuntu/Debian): +### Install required packages for your specific Linux distro + + + +
+ Ubuntu/Debian + ```bash sudo apt install build-essential cmake qt6-base-dev qt6-svg-dev qt6-positioning-dev libicu-dev libfreetype-dev libharfbuzz-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev optipng python3-pip ninja-build pip install "protobuf<3.21" --break-system-packages ``` +
+ +
+ Arch Linux + +```bash +sudo pacman -S base-devel cmake qt6-base qt6-svg qt6-positioning icu freetype2 harfbuzz harfbuzz-utils libxrandr libxinerama libxcursor libxi ninja python-pip optipng +``` + +
+ +
+ Fedora + +```bash +sudo dnf install @development-tools cmake qt6-qtbase qt6-qtsvg qt6-qtpositioning icu harfbuzz freetype libXrandr libXinerama libXcursor libXi optipng python3-pip ninja-build +``` + +
+ + +Note: If the system can't find `pip`, try `pip3` instead + +### Configure running bash script Go into the cloned repository and configure it for development: ```bash @@ -47,7 +77,7 @@ If you plan to publish the app privately in stores check [special options](#spec
-
+
Windows You need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH. @@ -79,7 +109,7 @@ Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/
-
+
macOS Install required build dependencies and Xcode @@ -107,7 +137,7 @@ cd comaps ```
-
+
Special cases options If you're only doing a one-off build or your internet bandwidth or disk space is limited, add following options to the `git clone` command: @@ -131,7 +161,7 @@ If you really need them (e.g. to build a very old app version) then refer to ful
## Develop for: -
+
Android app ### Preparing @@ -219,7 +249,7 @@ adb shell pm grant app.organicmaps.debug android.permission.READ_LOGS ```
-
+
Android Auto Android Auto can be developed and tested without having a physical device by using [Desktop Head Unit (DHU)](https://developer.android.com/training/cars/testing/dhu). Go to Android Studio > Tools -> SDK Manager -> SDK Tools and enable "Android Auto Desktop Head Unit". @@ -370,7 +400,7 @@ Example of command line for running system tracing: ```
-
+
iOS app ### Preparing @@ -424,7 +454,7 @@ Compile and run the project ("Product" → "Run").
-
+
CarPlay To test CarPlay, simply select "I/O" → "External Displays" → "CarPlay" in the Simulator @@ -438,9 +468,13 @@ To simulate a custom GPX track use `python3 tools/python/ios_simulator_load_gpx.
-## Desktop app +
+ Desktop developer app See [install_desktop](INSTALL_DESKTOP.md) to install and build Desktop app for Linux and Mac OS +
+ + ## Map data and styles See readme for the [map generator](MAPS.md) and [styles](STYLES.md) if you need to customize the map files and styles. diff --git a/docs/INSTALL_DESKTOP.md b/docs/INSTALL_DESKTOP.md index dca50c569..da8fc7213 100644 --- a/docs/INSTALL_DESKTOP.md +++ b/docs/INSTALL_DESKTOP.md @@ -4,7 +4,8 @@ You need a Linux or a MacOS machine to build a desktop version of CoMaps. [Windows](#windows) users can use the [WSL](https://learn.microsoft.com/en-us/windows/wsl/) (Windows Subsystem for Linux) and follow ["Linux or Mac"](#linux-or-mac) steps described below. -### Linux or MacOS +
+ Linux or MacOS Ensure that you have at least 20GB of free space. @@ -132,8 +133,11 @@ pip3 install "protobuf<3.21" --break-system-packages brew install cmake ninja qt@6 pip3 install "protobuf<3.21" ``` +
+ +
+ Windows -### Windows We haven't compiled CoMaps on Windows *natively* in a long time, somes adaptations is required to support Windows. You'll need to have python3, cmake, ninja, and QT6 in the PATH, and Visual Studio 2022 or Visual Studio 2022 Build Tools installed. Use [Visual Studio Developer Command Prompt](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) or generate Visual Studio project files with CMake to build the project. @@ -167,6 +171,7 @@ Now when you want to run the desktop app you just need to first launch the X Ser Running X Server is also required to run `generate_symbols.sh` script when you change icons for [styles](STYLES.md) +
### Building @@ -199,17 +204,22 @@ The generated binaries appear in `../omim-build-`. A desktop app binary is `CoMaps`. To run e.g. a release version: -_Linux:_ +
+ Linux ```bash ../omim-build-release/CoMaps ``` +
+ +
+ macOS -_macOS:_ ```bash ../omim-build-release/CoMaps.app/Contents/MacOS/CoMaps ``` +
### Testing @@ -239,18 +249,17 @@ Some tests are known to be broken and disabled on CI. ### Test Coverage -To generate a test coverage report you'll need [gcovr](https://gcovr.com) and gcov tools installed. +To generate a test coverage report you'll need [gcovr](https://gcovr.com) and gcov tools installed: + + +
+ Linux Installing gcovr on Linux: ```bash pip3 install gcovr ``` -Installing gcovr on MacOS: -```bash -brew install gcovr -``` - Installing gcov on Linux: ```bash # If you're using GCC compiler @@ -260,6 +269,18 @@ sudo apt-get install cpp sudo apt-get install llvm ``` + +
+ +
+ MacOS + + +Installing gcovr on MacOS: +```bash +brew install gcovr +``` + Installing gcov on MacOS: ```bash # If you're using AppleClang compiler it should already be installed @@ -268,7 +289,12 @@ Installing gcov on MacOS: brew install llvm ``` -Steps to generate coverage report: + +
+ + + +#### Steps to generate coverage report: 1. Configure cmake with `-DCOVERAGE_REPORT=ON` flag: ```bash