Skip to content
Permalink
Browse files
Merge pull request #46643 from pathmapper/lp_cmake
[server] Integrate landingpage build process with cmake
  • Loading branch information
elpaso committed Jan 10, 2022
2 parents fd1b819 + 4f41405 commit ecdc19057c331d7254ceb3875e553b4f3acec7e2
Showing with 4,304 additions and 7,283 deletions.
  1. +1 −0 .docker/docker-qgis-build.sh
  2. +5 −0 .docker/qgis3-qt5-build-deps.dockerfile
  3. +8 −0 .github/workflows/mingw64.yml
  4. +2 −0 .gitignore
  5. +2 −0 CMakeLists.txt
  6. +12 −0 INSTALL.md
  7. +1 −0 ms-windows/mingw/build.sh
  8. +21 −0 resources/CMakeLists.txt
  9. +0 −1 resources/server/api/ogc/static/landingpage/css/app.ca3f5643.css
  10. +0 −1 resources/server/api/ogc/static/landingpage/css/chunk-26945ca0.4bfbed8f.css
  11. +0 −1 resources/server/api/ogc/static/landingpage/css/chunk-a28d6c70.182dac32.css
  12. +0 −1 resources/server/api/ogc/static/landingpage/css/chunk-d04d025e.a393ec5d.css
  13. +0 −5 resources/server/api/ogc/static/landingpage/css/chunk-vendors.a728f495.css
  14. BIN resources/server/api/ogc/static/landingpage/favicon.ico
  15. +0 −1 resources/server/api/ogc/static/landingpage/index.html
  16. +0 −2 resources/server/api/ogc/static/landingpage/js/app.13f18e4d.js
  17. +0 −1 resources/server/api/ogc/static/landingpage/js/app.13f18e4d.js.map
  18. +0 −13 resources/server/api/ogc/static/landingpage/js/chunk-26945ca0.432ae155.js
  19. +0 −1 resources/server/api/ogc/static/landingpage/js/chunk-26945ca0.432ae155.js.map
  20. +0 −2 resources/server/api/ogc/static/landingpage/js/chunk-a28d6c70.c3f6a2e7.js
  21. +0 −1 resources/server/api/ogc/static/landingpage/js/chunk-a28d6c70.c3f6a2e7.js.map
  22. +0 −2 resources/server/api/ogc/static/landingpage/js/chunk-d04d025e.4a92915c.js
  23. +0 −1 resources/server/api/ogc/static/landingpage/js/chunk-d04d025e.4a92915c.js.map
  24. +0 −19 resources/server/api/ogc/static/landingpage/js/chunk-vendors.450afea6.js
  25. +0 −1 resources/server/api/ogc/static/landingpage/js/chunk-vendors.450afea6.js.map
  26. +1 −1 resources/server/src/landingpage/README.md
  27. +19 −17 resources/server/src/landingpage/package.json
  28. 0 resources/server/{api/ogc/static/landingpage → src/landingpage/public}/README
  29. +1 −1 resources/server/src/landingpage/src/components/AttributeTable.vue
  30. +2 −2 resources/server/src/landingpage/src/components/LayerTree.vue
  31. +1 −1 resources/server/src/landingpage/src/components/LayerTreeNode.vue
  32. +1 −1 resources/server/src/landingpage/src/components/Metadata.vue
  33. +1 −1 resources/server/src/landingpage/src/js/WmsSource.js
  34. +1 −1 resources/server/src/landingpage/src/views/Catalog.vue
  35. +8 −2 resources/server/src/landingpage/vue.config.js
  36. +4,217 −7,203 resources/server/src/landingpage/yarn.lock
@@ -80,6 +80,7 @@ cmake \
-DWITH_ASTYLE=OFF \
-DWITH_BINDINGS=${WITH_QT5} \
-DWITH_SERVER=${WITH_QT5} \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=${WITH_QT5} \
-DWITH_ORACLE=${WITH_QT5} \
-DWITH_PDAL=${WITH_QT5} \
-DWITH_QT5SERIALPORT=${WITH_QT5} \
@@ -102,6 +102,11 @@ RUN apt-get update \
hdbcli \
&& apt-get clean

# Node.js and Yarn for server landingpage webapp
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
RUN corepack enable

# Oracle : client side
RUN curl https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-basic-linux.x64-19.9.0.0.0dbru.zip > instantclient-basic-linux.x64-19.9.0.0.0dbru.zip
RUN curl https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-sdk-linux.x64-19.9.0.0.0dbru.zip > instantclient-sdk-linux.x64-19.9.0.0.0dbru.zip
@@ -39,6 +39,14 @@ jobs:
- name: Install build dependencies
run: ./ms-windows/mingw/mingwdeps.sh

# Node.js and Yarn for server landingpage webapp
- uses: actions/setup-node@v2
with:
node-version: '17'

- name: Make yarn available
run: corepack enable

- name: Create ccache dir
run: mkdir -p /w/.ccache/QGIS

@@ -56,6 +56,8 @@ qgis.kdev4
qgis.supp
qgis-test.ctest
qtcreator-build/
resources/server/api/ogc/static/landingpage
resources/server/src/landingpage/node_modules
resources/themes/*/style.qss.auto
scripts/astyle.exe
scripts/Debug
@@ -198,6 +198,8 @@ if(WITH_CORE)
# server disabled default because it needs FastCGI (which is optional dependency)
set (WITH_SERVER FALSE CACHE BOOL "Determines whether QGIS server should be built")
if(WITH_SERVER)
set (WITH_SERVER_LANDINGPAGE_WEBAPP FALSE CACHE BOOL "Determines whether QGIS server landingpage webapp should be built (requires nodejs and yarn)")

set (SERVER_SKIP_ECW FALSE CACHE BOOL "Determines whether QGIS server should disable ECW (ECW in server apps requires a special license)")

set (WITH_SERVER_PLUGINS ${WITH_BINDINGS} CACHE BOOL "Determines whether QGIS server support for python plugins should be built")
@@ -192,6 +192,12 @@ See [debian-ubuntu](https://qgis.org/en/site/forusers/alldownloads.html#debian-u
currently supported distributions (plain xenial's GDAL for instance is too old
and we build with GDAL2 from ubuntugis).

To build QGIS server landingpage webapp additional dependencies are required:

Node.js (current LTS recommended): https://nodejs.org/en/download/<br>
Yarn Package Manager: https://yarnpkg.com/getting-started/install


## 3.4. Setup ccache (Optional, but recommended)

You should also setup ccache to speed up compile times:
@@ -435,6 +441,12 @@ To build QGIS server additional dependencies are required:
dnf install fcgi-devel
```

And for building QGIS server landingpage webapp:

```bash
dnf install nodejs yarnpkg
```

Make sure that your build directory is completely empty when you enter the
following command. Do never try to "re-use" an existing Qt5 build directory.
If you want to use `ccmake` or other interactive tools, run the following
@@ -95,6 +95,7 @@ mkdir -p "$BUILDDIR"
-DBINDINGS_GLOBAL_INSTALL=ON \
-DSIP_GLOBAL_INSTALL=ON \
-DWITH_SERVER=ON \
-DWITH_SERVER_LANDINGPAGE_WEBAPP=ON \
-DTXT2TAGS_EXECUTABLE= \
..
)
@@ -34,6 +34,27 @@ if (WITH_SERVER)
set(RESOURCES_FILES ${RESOURCES_FILES} ${SERVER_RESOURCE_FILES})
endif()

# Server landingpage webapp
if (WITH_SERVER_LANDINGPAGE_WEBAPP)
find_program(YARN yarn REQUIRED)

file(GLOB_RECURSE LANDINGPAGE_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} server/src/landingpage/*)
set(LANDINGPAGE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/output/data/resources/server/src/landingpage)

add_custom_target (server_landingpage ALL DEPENDS ${LANDINGPAGE_OUTPUT_PATH}/landingpage.stamp)

add_custom_command(
POST_BUILD
OUTPUT ${LANDINGPAGE_OUTPUT_PATH}/landingpage.stamp
DEPENDS ${LANDINGPAGE_SOURCE_FILES}
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/server/src/landingpage/
${LANDINGPAGE_OUTPUT_PATH}/
COMMAND ${CMAKE_COMMAND} -E touch ${LANDINGPAGE_OUTPUT_PATH}/landingpage.stamp
COMMAND cd ${LANDINGPAGE_OUTPUT_PATH} && ${YARN} install --frozen-lockfile && ${YARN} build
)
endif()

# Apple specific handling
if (APPLE)
# ASN.1 definition files of PKIX elements

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ecdc190

Please sign in to comment.