Skip to content
Snippets Groups Projects
Commit 36ef1c52 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

QDS-8887 Add version info and integrate with web service pipeline

parent 56349944
No related branches found
No related tags found
1 merge request!4QDS-8887 Add version info and integrate with web service pipeline
Pipeline #63104 passed
Showing
with 41 additions and 106 deletions
......@@ -29,7 +29,7 @@ if(QT_VERSION VERSION_LESS QT_MINIMUM_VERSION)
endif()
qt_add_executable(${PROJECT_NAME}
resources/importdummy_wasm.qml
src/importdummy_wasm.qml
src/main.cpp
src/designviewer.cpp src/designviewer.h
)
......@@ -44,7 +44,9 @@ set_property(TARGET ${PROJECT_NAME}
APPEND PROPERTY QT_WASM_INITIAL_MEMORY "50MB"
)
# --install configuration
qt6_import_qml_plugins(${PROJECT_NAME})
# BEGIN --install configuration
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.html
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wasm
......@@ -54,10 +56,15 @@ install(
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/resources/www/
DIRECTORY ${CMAKE_SOURCE_DIR}/www/
DESTINATION ${CMAKE_INSTALL_PREFIX}
)
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_INSTALL_PREFIX})
execute_process(COMMAND git describe --always --tags OUTPUT_VARIABLE GIT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
configure_file(${CMAKE_SOURCE_DIR}/resources/version.json ${CMAKE_INSTALL_PREFIX}/resources/meta-data/version.json)
qt6_import_qml_plugins(${PROJECT_NAME})
message(STATUS "GIT_VERSION: ${GIT_VERSION}")
message(STATUS "QT_VERSION: ${QT_VERSION}")
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_INSTALL_PREFIX})
# END --install configuration
......@@ -14,7 +14,7 @@ workflow:
stages:
- build
- deploy
- trigger
- release
include:
......
......@@ -29,6 +29,8 @@ build-wasm-multiarch:
expose_as: "build-artifacts"
paths:
- ${QDS_CI_ARTIFACTS_PATH}
reports:
dotenv: build.env
image: "git.qt.io:4567/design-studio/maintenance/docker-images/${QDS_CI_JOB_TARGET_PLATFORM}:${QDS_CI_QT_VERSION}-${QDS_CI_JOB_TARGET_PLATFORM}_${QDS_CI_JOB_TARGET_ARCH}"
script:
- mkdir -p ${QDS_CI_JOB_ARTIFACTS_PATH}
......@@ -70,3 +72,24 @@ build-wasm-multiarch:
-DCMAKE_INSTALL_PREFIX=${QDS_CI_JOB_ARTIFACTS_PATH}
- cmake --build ${QDS_BUILD_PATH}
- cmake --install ${QDS_BUILD_PATH}
- echo "PREVIOUS_JOB_ID=${CI_JOB_ID}" >> build.env
- echo "JOB_TARGET_ARCH=${QDS_CI_JOB_TARGET_ARCH}" >> build.env
trigger-deployment:
stage : trigger
variables: # these variables are passed to the downstream pipeline
QDS_CI_PARENT_PIPELINE_ID: ${CI_PIPELINE_ID}
QDS_CI_ARTIFACT_JOB_ID: ${PREVIOUS_JOB_ID}
QDS_CI_PARENT_PROJECT_ID: ${CI_PROJECT_ID}
QDS_CI_PARENT_PIPELINE_ARCH: ${JOB_TARGET_ARCH}
needs:
- job: build-wasm-multiarch
artifacts: true
optional: true
trigger:
project: design-studio/design-viewer/design-viewer-web-service
branch: master
strategy: depend
forward:
yaml_variables: true
pipeline_variables: false
// Hack to force the qml plugins to be linked statically
// TODO: Find out how to do that in .pro or .cpp file
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
import QtQuick.Extras
import QtQuick.Layouts
import QtQuick.Particles
import QtQuick.PrivateWidgets
import QtQuick.Templates
import QtQuick.VirtualKeyboard
import QtQuick.VirtualKeyboard.Settings
import QtQuick.Window
import QtQuick.XmlListModel
import QtQuick.Timeline
import QtQuick.Shapes
import Qt.labs.calendar
import Qt.labs.folderlistmodel
// import Qt.labs.lottieqt
import Qt.labs.platform
import Qt.labs.qmlmodels
import Qt.labs.settings
import Qt.labs.wavefrontmesh
import Qt.labs.sharedimage
import QtBluetooth
import QtCanvas3D
import QtCharts
import QtDataVisualization
// import QtFeedback
import QtGamepad
import QtGraphicalEffects
import QtLocation
import QtMultimedia
import QtNfc
import QtPositioning
import QtPurchasing
import QtRemoteObjects
import QtScxml
import QtSensors
import QtTest
import QtWebChannel
import QtWebSockets
import QtWebView
import QtQml
import QtQml.Models
import QtQml.RemoteObjects
import QtQml.StateMachine
import QtQuick.Scene3D
import QtQuick.Scene2D
import QtQuick.LocalStorage
import QtQuick.Controls.Styles
import QtQuick.Controls.Material
import QtQuick.Controls.Universal
import QtQuick.Controls.Imagine
import Qt3D.Extras
import Qt3D.Input
import Qt3D.Logic
import Qt3D.Core
import Qt3D.Render
import Qt3D.Animation
// TODO: Find out how to build that
import Qt.SafeRenderer
// Will QtStudio3D.OpenGL or its successor support WebAssembly?
import QtStudio3D.OpenGL
import Qt5Compat.GraphicalEffects
import FlowView
import Components
import QtQuick.Studio.Components
import QtQuick.Studio.Effects
import QtQuick.Studio.EventSimulator
import QtQuick.Studio.EventSystem
import QtQuick.Studio.LogicHelper
import QtQuick.Studio.MultiText
import QtQuick3D
import QtQuick3D.Effects
import QtQuick3D.Particles3D
ApplicationWindow {
visible: true
width: 640
height: 480
}
{
"appVersion": "@GIT_VERSION@",
"qtVersion": "@QT_VERSION@"
}
{
"version": "0.8",
"buildNumber": "#buildnumber#"
}
File moved
......@@ -138,7 +138,7 @@
cloud.
</p>
<p>
<a href="https://github.com/qt/qtdesignviewer"
<a href="https://git.qt.io/design-studio/design-viewer/design-viewer-wasm"
>"Qt Design Viewer" sources</a
>
| Made with:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment