Add linux distros and desktop instructions

Signed-off-by: patepelo <developer.anton@gmail.com>
This commit is contained in:
patepelo
2026-01-15 11:41:41 -04:00
parent 8b32358d9a
commit 7f7caf23c2
2 changed files with 81 additions and 21 deletions

View File

@@ -23,7 +23,7 @@ Follow the instructions for your OS, and afterwards the repository is prepared t
## Setting up to your OS of development
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Linux</span></summary>
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
<details>
<summary><span style="font-size: 1em; font-weight: bold;">Ubuntu/Debian</span></summary>
```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
```
</details>
<details>
<summary><span style="font-size: 1em; font-weight: bold;">Arch Linux</span></summary>
```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
```
</details>
<details>
<summary><span style="font-size: 1em; font-weight: bold;">Fedora</span></summary>
```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
```
</details>
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
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Windows</span></summary>
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/
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">macOS</span></summary>
Install required build dependencies and Xcode
@@ -107,7 +137,7 @@ cd comaps
```
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Special cases options</span></summary>
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
</details>
## Develop for:
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Android app</span></summary>
### Preparing
@@ -219,7 +249,7 @@ adb shell pm grant app.organicmaps.debug android.permission.READ_LOGS
```
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Android Auto</span></summary>
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:
```
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">iOS app</span></summary>
### Preparing
@@ -424,7 +454,7 @@ Compile and run the project ("Product" → "Run").
</details>
<details open>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">CarPlay</span></summary>
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.
</details>
## Desktop app
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Desktop developer app</span></summary>
See [install_desktop](INSTALL_DESKTOP.md) to install and build Desktop app for Linux and Mac OS
</details>
## 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.

View File

@@ -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
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Linux or MacOS</span></summary>
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"
```
</details>
<details>
<summary><span style="font-size: 1.5em; font-weight: bold;">Windows</span></summary>
### 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)
</details>
### Building
@@ -199,17 +204,22 @@ The generated binaries appear in `../omim-build-<buildtype>`.
A desktop app binary is `CoMaps`. To run e.g. a release version:
_Linux:_
<details>
<summary><span style="font-size: 1em; font-weight: bold;">Linux</span></summary>
```bash
../omim-build-release/CoMaps
```
</details>
<details>
<summary><span style="font-size: 1em; font-weight: bold;">macOS</span></summary>
_macOS:_
```bash
../omim-build-release/CoMaps.app/Contents/MacOS/CoMaps
```
</details>
### 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:
<details>
<summary><span style="font-size: 1em; font-weight: bold;">Linux</span></summary>
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
```
</details>
<details>
<summary><span style="font-size: 1em; font-weight: bold;">MacOS</span></summary>
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:
</details>
#### Steps to generate coverage report:
1. Configure cmake with `-DCOVERAGE_REPORT=ON` flag:
```bash