[cmake] Run configure.sh at build

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-07-31 07:19:08 +00:00
parent c6dcfc71bf
commit 96ef33a401
19 changed files with 14 additions and 92 deletions

View File

@@ -71,10 +71,6 @@ jobs:
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Compile
shell: bash
working-directory: android

View File

@@ -51,10 +51,6 @@ jobs:
shell: bash
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Lint
shell: bash
working-directory: android
@@ -93,10 +89,6 @@ jobs:
shell: bash
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -73,10 +73,6 @@ jobs:
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Compile
shell: bash
working-directory: android

View File

@@ -117,10 +117,6 @@ jobs:
SECURE_PROPERTIES: ${{ secrets.SECURE_PROPERTIES }}
RELEASE_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Set up SDK
shell: bash
run: echo "sdk.dir=$ANDROID_SDK_ROOT" > android/local.properties

View File

@@ -94,10 +94,6 @@ jobs:
llvm \
gcovr
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -66,10 +66,6 @@ jobs:
CERTIFICATES_DEV_P12: ${{ secrets.CERTIFICATES_DEV_P12 }}
CERTIFICATES_DISTR_P12: ${{ secrets.CERTIFICATES_DISTR_P12 }}
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Compile and upload to TestFlight
run: |
echo "IOS_VERSION=$(../tools/unix/version.sh ios_version)-$(../tools/unix/version.sh ios_build)" >> "$GITHUB_ENV"

View File

@@ -59,10 +59,6 @@ jobs:
shell: bash
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
uses: irgaly/xcode-cache@v1
with:
@@ -103,4 +99,4 @@ jobs:
-destination 'generic/platform=iOS' \
-quiet \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO
CODE_SIGNING_ALLOWED=NO

View File

@@ -71,10 +71,6 @@ jobs:
libqt6positioning6-plugins \
libqt6positioning6
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
@@ -142,10 +138,6 @@ jobs:
libqt6positioning6-plugins \
libqt6positioning6
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -57,10 +57,6 @@ jobs:
run: |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja qt@6
- name: Configure repository
shell: bash
run: ./configure.sh
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -7,6 +7,7 @@ on:
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
SKIP_MAP_DOWNLOAD: true
jobs:
lint:
@@ -22,10 +23,6 @@ jobs:
shell: bash
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
shell: bash
working-directory: android
@@ -76,10 +73,6 @@ jobs:
shell: bash
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
uses: hendrikmuhs/ccache-action@v1.2
with:

View File

@@ -37,10 +37,6 @@ jobs:
shell: bash
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
uses: irgaly/xcode-cache@v1
with:

View File

@@ -48,6 +48,8 @@ if (APPLE AND NOT ("${CMAKE_SYSTEM_NAME}" STREQUAL Android))
set(CMAKE_OBJCXX_VISIBILITY_PRESET hidden)
endif()
execute_process(COMMAND "./configure.sh" WORKING_DIRECTORY ${OMIM_ROOT})
message(STATUS "Using compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
if (CMAKE_UNITY_BUILD)

View File

@@ -18,5 +18,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libxi-dev \
optipng
WORKDIR /root/comaps
RUN ./configure.sh
CMD ./gradlew -Parm64 assembleFdroidDebug

View File

@@ -3,8 +3,8 @@
# Please run this script to configure the repository after cloning it.
#
SKIP_MAP_DOWNLOAD=false
SKIP_GENERATE_SYMBOLS=false
SKIP_MAP_DOWNLOAD=$SKIP_MAP_DOWNLOAD
SKIP_GENERATE_SYMBOLS=$SKIP_GENERATE_SYMBOLS
############################# PROCESS OPTIONS ################################
@@ -17,8 +17,8 @@ eval set -- "$TEMP"
while true; do
case "$1" in
-m | --skip-map-download ) SKIP_MAP_DOWNLOAD=true; shift ;;
-s | --skip-generate-symbols ) SKIP_GENERATE_SYMBOLS=true; shift ;;
-m | --skip-map-download ) SKIP_MAP_DOWNLOAD=1; shift ;;
-s | --skip-generate-symbols ) SKIP_GENERATE_SYMBOLS=1; shift ;;
* ) break ;;
esac
done
@@ -54,7 +54,7 @@ if [ ! -d 3party/boost/boost ]; then
popd
fi
if [ "$SKIP_MAP_DOWNLOAD" = false ]; then
if [ -z "$SKIP_MAP_DOWNLOAD" ]; then
pushd data
MWM_VERSION=$(awk -F'[:,]' '/"v":/{ $2 = substr($2, 2); print $2 }' countries.txt)
@@ -79,7 +79,7 @@ else
echo "Skipping world map download..."
fi
if [ "$SKIP_GENERATE_SYMBOLS" = false ]; then
if [ -z "$SKIP_GENERATE_SYMBOLS" ]; then
if Diff data/symbols_hash data/styles/*/*/symbols/*; then
echo "Generating symbols..."
bash ./tools/unix/generate_symbols.sh

View File

@@ -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
```
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))
```bash
bash ./configure.sh
```
If you plan to publish the app privately in stores check [special options](#special-cases-options).
### Windows
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**
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++`
3. Run `./configure.sh` in WSL.
**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).
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
```
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).
### macOS
Install required build dependencies and Xcode
@@ -96,12 +84,9 @@ xcode-select --install
brew install wget optipng cmake qt
```
#### Clone and configure repository
Clone the repository
#### Clone the repository
```bash
git clone --recurse-submodules --shallow-submodules https://codeberg.org/comaps/comaps.git
cd comaps
bash ./configure.sh
```
### Special cases options

View File

@@ -5,9 +5,6 @@
set -euxo pipefail
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_VERSION=$($SCRIPT_DIR/../tools/unix/version.sh ios_version)

View File

@@ -47,7 +47,6 @@ cd %{project_src}/..
%if %{rhel} == 7
source /opt/rh/devtoolset-7/enable
%endif
echo | %{project_src}/configure.sh
mkdir -p %{project_root}/build
cd %{project_root}/build
cmake3 %{project_src} -DSKIP_QT_GUI=ON

View File

@@ -19,8 +19,7 @@ RUN apt-get update && apt-get install -y \
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
RUN echo "" | ./configure.sh \
&& ./tools/unix/build_omim.sh -rs generator_tool
RUN ./tools/unix/build_omim.sh -rs generator_tool
RUN pip install --upgrade pip

View File

@@ -73,10 +73,6 @@ if [[ "$OPT_TARGET" =~ "generator_tool|topography_generator_tool|world_roads_bui
fi
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
if [ -d "$DEVTOOLSET_PATH" ]; then