mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[cmake] Run configure.sh at build
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -71,10 +71,6 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
|
|||||||
@@ -51,10 +51,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
@@ -93,10 +89,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -73,10 +73,6 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile
|
- name: Compile
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
|
|||||||
@@ -117,10 +117,6 @@ jobs:
|
|||||||
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
|
||||||
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Set up SDK
|
- name: Set up SDK
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
|
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties
|
||||||
|
|||||||
@@ -94,10 +94,6 @@ jobs:
|
|||||||
llvm \
|
llvm \
|
||||||
gcovr
|
gcovr
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -66,10 +66,6 @@ jobs:
|
|||||||
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
|
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
|
||||||
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
|
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Compile and upload to TestFlight
|
- name: Compile and upload to TestFlight
|
||||||
run: |
|
run: |
|
||||||
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"
|
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"
|
||||||
|
|||||||
@@ -59,10 +59,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure XCode cache
|
- name: Configure XCode cache
|
||||||
uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -71,10 +71,6 @@ jobs:
|
|||||||
libqt6positioning6-plugins \
|
libqt6positioning6-plugins \
|
||||||
libqt6positioning6
|
libqt6positioning6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
@@ -142,10 +138,6 @@ jobs:
|
|||||||
libqt6positioning6-plugins \
|
libqt6positioning6-plugins \
|
||||||
libqt6positioning6
|
libqt6positioning6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -57,10 +57,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
|
||||||
|
|
||||||
- name: Configure repository
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
9
.github/workflows/android-check.yaml
vendored
9
.github/workflows/android-check.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
|
||||||
|
SKIP_MAP_DOWNLOAD: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -22,10 +23,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Init boost, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh --skip-map-download
|
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: android
|
working-directory: android
|
||||||
@@ -76,10 +73,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||||
|
|
||||||
- name: Init boost, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh --skip-map-download
|
|
||||||
|
|
||||||
- name: Configure ccache
|
- name: Configure ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
with:
|
with:
|
||||||
|
|||||||
4
.github/workflows/ios-check.yaml
vendored
4
.github/workflows/ios-check.yaml
vendored
@@ -37,10 +37,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||||
|
|
||||||
- name: Init boost, download World map, generate textures
|
|
||||||
shell: bash
|
|
||||||
run: ./configure.sh
|
|
||||||
|
|
||||||
- name: Configure XCode cache
|
- name: Configure XCode cache
|
||||||
uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ if (APPLE AND NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android))
|
|||||||
set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden)
|
set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
execute_process(COMMAND "./configure.sh" WORKING_DIRECTORY ${OMIM_ROOT})
|
||||||
|
|
||||||
message(STATUS "Using compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
message(STATUS "Using compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
|
||||||
|
|
||||||
if (CMAKE_UNITY_BUILD)
|
if (CMAKE_UNITY_BUILD)
|
||||||
|
|||||||
@@ -18,5 +18,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
libxi-dev \
|
libxi-dev \
|
||||||
optipng
|
optipng
|
||||||
WORKDIR /root/comaps
|
WORKDIR /root/comaps
|
||||||
RUN ./configure.sh
|
|
||||||
CMD ./gradlew -Parm64 assembleFdroidDebug
|
CMD ./gradlew -Parm64 assembleFdroidDebug
|
||||||
|
|||||||
12
configure.sh
12
configure.sh
@@ -3,8 +3,8 @@
|
|||||||
# Please run this script to configure the repository after cloning it.
|
# Please run this script to configure the repository after cloning it.
|
||||||
#
|
#
|
||||||
|
|
||||||
SKIP_MAP_DOWNLOAD=false
|
SKIP_MAP_DOWNLOAD=$SKIP_MAP_DOWNLOAD
|
||||||
SKIP_GENERATE_SYMBOLS=false
|
SKIP_GENERATE_SYMBOLS=$SKIP_GENERATE_SYMBOLS
|
||||||
|
|
||||||
############################# PROCESS OPTIONS ################################
|
############################# PROCESS OPTIONS ################################
|
||||||
|
|
||||||
@@ -17,8 +17,8 @@ eval set -- "$TEMP"
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-m | --skip-map-download ) SKIP_MAP_DOWNLOAD=true; shift ;;
|
-m | --skip-map-download ) SKIP_MAP_DOWNLOAD=1; shift ;;
|
||||||
-s | --skip-generate-symbols ) SKIP_GENERATE_SYMBOLS=true; shift ;;
|
-s | --skip-generate-symbols ) SKIP_GENERATE_SYMBOLS=1; shift ;;
|
||||||
* ) break ;;
|
* ) break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@@ -54,7 +54,7 @@ if [ ! -d 3party/boost/boost ]; then
|
|||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SKIP_MAP_DOWNLOAD" = false ]; then
|
if [ -z "$SKIP_MAP_DOWNLOAD" ]; then
|
||||||
pushd data
|
pushd data
|
||||||
|
|
||||||
MWM_VERSION=$(awk -F'[:,]' '/"v":/{ $2 = substr($2, 2); print $2 }' countries.txt)
|
MWM_VERSION=$(awk -F'[:,]' '/"v":/{ $2 = substr($2, 2); print $2 }' countries.txt)
|
||||||
@@ -79,7 +79,7 @@ else
|
|||||||
echo "Skipping world map download..."
|
echo "Skipping world map download..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$SKIP_GENERATE_SYMBOLS" = false ]; then
|
if [ -z "$SKIP_GENERATE_SYMBOLS" ]; then
|
||||||
if Diff data/symbols_hash data/styles/*/*/symbols/*; then
|
if Diff data/symbols_hash data/styles/*/*/symbols/*; then
|
||||||
echo "Generating symbols..."
|
echo "Generating symbols..."
|
||||||
bash ./tools/unix/generate_symbols.sh
|
bash ./tools/unix/generate_symbols.sh
|
||||||
|
|||||||
@@ -37,13 +37,7 @@ Install required packages (Ubuntu/Debian):
|
|||||||
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
|
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
|
||||||
```
|
```
|
||||||
|
|
||||||
Configure the repository (make sure you have a working C++ build environment):
|
If you plan to publish the app privately in stores check [special options](#special-cases-options).
|
||||||
|
|
||||||
(if you plan to publish the app privately in stores check [special options](#special-cases-options))
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bash ./configure.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
You need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH.
|
You need to have [Git for Windows](https://git-scm.com/download/win) installed and Git bash available in the PATH.
|
||||||
@@ -69,15 +63,9 @@ For _Windows 10_: You should be able to build the project by following either o
|
|||||||
**Setup 1: Using WSL**
|
**Setup 1: Using WSL**
|
||||||
1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine.
|
1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) on your machine.
|
||||||
2. Install g++ by running the following command in WSL: `sudo apt install g++`
|
2. Install g++ by running the following command in WSL: `sudo apt install g++`
|
||||||
3. Run `./configure.sh` in WSL.
|
|
||||||
|
|
||||||
**Setup 2: Using Visual Studio Developer Command Prompt**
|
**Setup 2: Using Visual Studio Developer Command Prompt**
|
||||||
1. Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the latest MSVC x64/x86 build tool and Windows 10/11 SDK as individual components while installing Visual Studio).
|
Install the [Visual Studio Developer Command Prompt](https://docs.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022) (make sure to choose the latest MSVC x64/x86 build tool and Windows 10/11 SDK as individual components while installing Visual Studio).
|
||||||
2. Run the following command and follow instructions:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
"C:\Program Files\Git\bin\bash.exe" configure.sh # execute the script by using Developer Command Prompt
|
|
||||||
```
|
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
Install required build dependencies and Xcode
|
Install required build dependencies and Xcode
|
||||||
@@ -96,12 +84,9 @@ xcode-select --install
|
|||||||
brew install wget optipng cmake qt
|
brew install wget optipng cmake qt
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Clone and configure repository
|
#### Clone the repository
|
||||||
Clone the repository
|
|
||||||
```bash
|
```bash
|
||||||
git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git
|
git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git
|
||||||
cd comaps
|
|
||||||
bash ./configure.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Special cases options
|
### Special cases options
|
||||||
|
|||||||
@@ -5,9 +5,6 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$(dirname "$0")" && pwd -P )"
|
SCRIPT_DIR="$( cd "$(dirname "$0")" && pwd -P )"
|
||||||
cd "$SCRIPT_DIR/.."
|
|
||||||
./configure.sh
|
|
||||||
cd "$SCRIPT_DIR"
|
|
||||||
|
|
||||||
IOS_BUILD=$($SCRIPT_DIR/../tools/unix/version.sh ios_build)
|
IOS_BUILD=$($SCRIPT_DIR/../tools/unix/version.sh ios_build)
|
||||||
IOS_VERSION=$($SCRIPT_DIR/../tools/unix/version.sh ios_version)
|
IOS_VERSION=$($SCRIPT_DIR/../tools/unix/version.sh ios_version)
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ cd %{project_src}/..
|
|||||||
%if %{rhel} == 7
|
%if %{rhel} == 7
|
||||||
source /opt/rh/devtoolset-7/enable
|
source /opt/rh/devtoolset-7/enable
|
||||||
%endif
|
%endif
|
||||||
echo | %{project_src}/configure.sh
|
|
||||||
mkdir -p %{project_root}/build
|
mkdir -p %{project_root}/build
|
||||||
cd %{project_root}/build
|
cd %{project_root}/build
|
||||||
cmake3 %{project_src} -DSKIP_QT_GUI=ON
|
cmake3 %{project_src} -DSKIP_QT_GUI=ON
|
||||||
|
|||||||
@@ -19,8 +19,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
|
||||||
dpkg-reconfigure --frontend noninteractive tzdata
|
dpkg-reconfigure --frontend noninteractive tzdata
|
||||||
|
|
||||||
RUN echo "" | ./configure.sh \
|
RUN ./tools/unix/build_omim.sh -rs generator_tool
|
||||||
&& ./tools/unix/build_omim.sh -rs generator_tool
|
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,6 @@ if [[ "$OPT_TARGET" =~ "generator_tool|topography_generator_tool|world_roads_bui
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
OMIM_PATH="$(cd "${OMIM_PATH:-$(dirname "$0")/../..}"; pwd)"
|
OMIM_PATH="$(cd "${OMIM_PATH:-$(dirname "$0")/../..}"; pwd)"
|
||||||
if ! grep "DEFAULT_URLS_JSON" "$OMIM_PATH/private.h" >/dev/null 2>/dev/null; then
|
|
||||||
echo "Please run $OMIM_PATH/configure.sh"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
DEVTOOLSET_PATH=/opt/rh/devtoolset-7
|
DEVTOOLSET_PATH=/opt/rh/devtoolset-7
|
||||||
if [ -d "$DEVTOOLSET_PATH" ]; then
|
if [ -d "$DEVTOOLSET_PATH" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user