diff --git a/.forgejo/workflows/android-beta.yaml b/.forgejo/workflows/android-beta.yaml index a58169484..e200fcd68 100644 --- a/.forgejo/workflows/android-beta.yaml +++ b/.forgejo/workflows/android-beta.yaml @@ -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 diff --git a/.forgejo/workflows/android-check.yaml b/.forgejo/workflows/android-check.yaml index 41fc04745..766445fe1 100644 --- a/.forgejo/workflows/android-check.yaml +++ b/.forgejo/workflows/android-check.yaml @@ -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: diff --git a/.forgejo/workflows/android-monkey.yaml b/.forgejo/workflows/android-monkey.yaml index c9b8f202c..ad68a78ee 100644 --- a/.forgejo/workflows/android-monkey.yaml +++ b/.forgejo/workflows/android-monkey.yaml @@ -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 diff --git a/.forgejo/workflows/android-release.yaml b/.forgejo/workflows/android-release.yaml index d9b6ced05..51d1417c7 100644 --- a/.forgejo/workflows/android-release.yaml +++ b/.forgejo/workflows/android-release.yaml @@ -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 diff --git a/.forgejo/workflows/coverage-check.yaml b/.forgejo/workflows/coverage-check.yaml index 833b5180f..b7cc3b7a4 100644 --- a/.forgejo/workflows/coverage-check.yaml +++ b/.forgejo/workflows/coverage-check.yaml @@ -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: diff --git a/.forgejo/workflows/ios-beta.yaml b/.forgejo/workflows/ios-beta.yaml index a077c7d4b..acfb06c3a 100644 --- a/.forgejo/workflows/ios-beta.yaml +++ b/.forgejo/workflows/ios-beta.yaml @@ -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" diff --git a/.forgejo/workflows/ios-check.yaml b/.forgejo/workflows/ios-check.yaml index b8b1c3352..2e459a353 100644 --- a/.forgejo/workflows/ios-check.yaml +++ b/.forgejo/workflows/ios-check.yaml @@ -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 \ No newline at end of file + CODE_SIGNING_ALLOWED=NO diff --git a/.forgejo/workflows/linux-check.yaml b/.forgejo/workflows/linux-check.yaml index 75874fc81..ce6954bdc 100644 --- a/.forgejo/workflows/linux-check.yaml +++ b/.forgejo/workflows/linux-check.yaml @@ -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: diff --git a/.forgejo/workflows/macos-check.yaml b/.forgejo/workflows/macos-check.yaml index 7a4737028..5c694e0f9 100644 --- a/.forgejo/workflows/macos-check.yaml +++ b/.forgejo/workflows/macos-check.yaml @@ -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: diff --git a/.github/workflows/android-check.yaml b/.github/workflows/android-check.yaml index a89939d8e..0e8146026 100644 --- a/.github/workflows/android-check.yaml +++ b/.github/workflows/android-check.yaml @@ -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: diff --git a/.github/workflows/ios-check.yaml b/.github/workflows/ios-check.yaml index a732a887c..eee05fcd5 100644 --- a/.github/workflows/ios-check.yaml +++ b/.github/workflows/ios-check.yaml @@ -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: diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eba5f7a8..cc55e8822 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/android/Dockerfile b/android/Dockerfile index e65cf8a91..583c834ae 100644 --- a/android/Dockerfile +++ b/android/Dockerfile @@ -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 diff --git a/configure.sh b/configure.sh index 6ef03eefe..1db7e82d3 100755 --- a/configure.sh +++ b/configure.sh @@ -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 diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 116fc3bcd..c846b75ef 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -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 diff --git a/iphone/upload_to_appstore.sh b/iphone/upload_to_appstore.sh index 536460179..2b5ab7945 100755 --- a/iphone/upload_to_appstore.sh +++ b/iphone/upload_to_appstore.sh @@ -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) diff --git a/packaging/centos/omim-tool-project.maps.me.spec b/packaging/centos/omim-tool-project.maps.me.spec index 0b90178ee..7fef27a89 100644 --- a/packaging/centos/omim-tool-project.maps.me.spec +++ b/packaging/centos/omim-tool-project.maps.me.spec @@ -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 diff --git a/tools/python/airmaps/sandbox/airmaps/Dockerfile b/tools/python/airmaps/sandbox/airmaps/Dockerfile index f16c1cecb..ebd4d93f1 100644 --- a/tools/python/airmaps/sandbox/airmaps/Dockerfile +++ b/tools/python/airmaps/sandbox/airmaps/Dockerfile @@ -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 diff --git a/tools/unix/build_omim.sh b/tools/unix/build_omim.sh index 68e2397a2..42c02ed66 100755 --- a/tools/unix/build_omim.sh +++ b/tools/unix/build_omim.sh @@ -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