Skip to content

Commit

Permalink
Use the latest dependencies
Browse files Browse the repository at this point in the history
* use the latest dependencies by tags
  • Loading branch information
EddyTheCo authored Jan 1, 2025
1 parent c2d4a1b commit 6686637
Show file tree
Hide file tree
Showing 13 changed files with 544 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [main,develop]
jobs:
build-wasm:
uses: EddyTheCo/Common/.github/workflows/build-wasm.yml@v0.4.0
uses: EddyTheCo/Common/.github/workflows/build-wasm.yml@v0.5.0
with:
qtModules: 'qtwebsockets qtshadertools'
qtVersion: '6.6.0'
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: code-format
run-name: Format code and do PR
on:
pull_request_target:
types: [closed]
branches: [develop]
jobs:
checkout-format-pr:
uses: EddyTheCo/Common/.github/workflows/[email protected]
if: ${{ (github.event.pull_request.merged == true) && (startsWith(github.base_ref, 'develop')) }}
permissions:
contents: write
pull-requests: write

52 changes: 0 additions & 52 deletions .github/workflows/codeFormat.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: 'Download artifact'
uses: actions/download-artifact@v4
with:
name: qmllint
name: common
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

Expand All @@ -28,7 +28,7 @@ jobs:
echo "prn=$(cat pr_number)" >> $GITHUB_OUTPUT
- name: 'Run reviewer'
uses: EddyTheCo/qmllint-action/@main
uses: EddyTheCo/qmllint-action/@v0.1.0
with:
jsondir: ${{ github.workspace }}
pr_number: ${{ steps.getprn.outputs.prn }}
Expand Down
91 changes: 46 additions & 45 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ include(${CMAKE_CURRENT_BINARY_DIR}/local_conf.cmake OPTIONAL)
option(USE_QtQr "add qrCode types " ON)
option(USE_OMClient "add open-meteo types" ON)
option(USE_DateTimePickers "add datetimepickers types" ON)
option(USE_Iotaaccount "add iota account types" ON)
option(USE_Iotaaccount "add iota account types" OFF)
option(USE_Iotaconnection "add iota connection types" ON)
option(USE_QVault "add QVault types" ON)
option(USE_Vault "add Vault types" ON)

include(FetchContent)
FetchContent_Declare(
ccommon
GIT_REPOSITORY https://github.com/EddyTheCo/Common.git
GIT_TAG v0.4.0)
GIT_TAG v0.5.0)
FetchContent_MakeAvailable(ccommon)
version_from_git(LOG OFF TIMESTAMP "%Y%m%d%H%M%S")
project(
Expand All @@ -30,33 +30,33 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Qml QuickControls2)
qt_standard_project_setup()

qt6_add_executable(appqmlonline main.cpp)
if(USE_QVault)
if(USE_Vault)
FetchContent_Declare(
QtVault
GIT_REPOSITORY https://github.com/EddyTheCo/QVault.git
GIT_TAG v0.2.1
FIND_PACKAGE_ARGS 0.2 CONFIG)
FetchContent_MakeAvailable(QtVault)
EstervVault
GIT_REPOSITORY https://github.com/EddyTheCo/Esterv.Crypto.Vault.git
GIT_TAG v1.0.0
FIND_PACKAGE_ARGS 1 CONFIG)
FetchContent_MakeAvailable(EstervVault)
target_link_libraries(
appqmlonline
PRIVATE
QtVault::qvault
$<$<STREQUAL:$<TARGET_PROPERTY:QtVault::qvault,TYPE>,STATIC_LIBRARY>:QtVault::qvaultplugin>
Esterv::Vault
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::Vault,TYPE>,STATIC_LIBRARY>:Esterv::Vaultplugin>
)
list(APPEND qmlimport "Esterv.Utils.Vault")
endif(USE_QVault)
list(APPEND qmlimport "Esterv.Crypto.Vault")
endif(USE_Vault)
if(USE_OMClient)
FetchContent_Declare(
openMeteo
GIT_REPOSITORY https://github.com/EddyTheCo/OMClient.git
GIT_TAG v0.3.0
FIND_PACKAGE_ARGS 0.3 CONFIG)
FetchContent_MakeAvailable(openMeteo)
EstervOpenMeteo
GIT_REPOSITORY https://github.com/EddyTheCo/Esterv.Utils.OMClient.git
GIT_TAG v0.4.0
FIND_PACKAGE_ARGS 0.4 CONFIG)
FetchContent_MakeAvailable(EstervOpenMeteo)
target_link_libraries(
appqmlonline
PRIVATE
openMeteo::OMClient
$<$<STREQUAL:$<TARGET_PROPERTY:openMeteo::OMClient,TYPE>,STATIC_LIBRARY>:openMeteo::OMClientplugin>
Esterv::OMClient
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::OMClient,TYPE>,STATIC_LIBRARY>:Esterv::OMClientplugin>
)
list(APPEND qmlimport Esterv.CustomControls.OpenMeteo)
endif(USE_OMClient)
Expand Down Expand Up @@ -93,56 +93,57 @@ endif(USE_Iotaaccount)

if(USE_QtQr)
FetchContent_Declare(
qrCode
GIT_REPOSITORY https://github.com/EddyTheCo/qrCode.git
GIT_TAG v1.1.0
FIND_PACKAGE_ARGS 1.1 CONFIG)
FetchContent_MakeAvailable(qrCode)
EstervQrCode
GIT_REPOSITORY https://github.com/EddyTheCo/Esterv.Utils.QrCode
GIT_TAG v2.0.0
FIND_PACKAGE_ARGS 2 CONFIG)
FetchContent_MakeAvailable(EstervQrCode)
target_link_libraries(
appqmlonline
PRIVATE
qrCode::QtQrGen
qrCode::QtQrDec
$<$<STREQUAL:$<TARGET_PROPERTY:qrCode::QtQrGen,TYPE>,STATIC_LIBRARY>:qrCode::QtQrGenplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:qrCode::QtQrDec,TYPE>,STATIC_LIBRARY>:qrCode::QtQrDecplugin>
Esterv::QtQrGen
Esterv::QtQrDec
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::QtQrGen,TYPE>,STATIC_LIBRARY>:Esterv::QtQrGenplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::QtQrDec,TYPE>,STATIC_LIBRARY>:Esterv::QtQrDecplugin>
)
target_compile_definitions(appqmlonline PRIVATE USE_QtQr)
list(APPEND qmlimport "Esterv.CustomControls.QrGen"
"Esterv.CustomControls.QrDec")
endif(USE_QtQr)
if(USE_DateTimePickers)
FetchContent_Declare(
DTPickersQML
GIT_REPOSITORY https://github.com/EddyTheCo/DateTimePickers.git
GIT_TAG v0.2.1
FIND_PACKAGE_ARGS 0.2 CONFIG)
FetchContent_MakeAvailable(DTPickersQML)
EstervDTPickers
GIT_REPOSITORY
https://github.com/EddyTheCo/Esterv.CustomControls.DateTimePickers.git
GIT_TAG v1.0.0
FIND_PACKAGE_ARGS 1 CONFIG)
FetchContent_MakeAvailable(EstervDTPickers)
target_link_libraries(
appqmlonline
PRIVATE
DTPickersQML::DTPickers
$<$<STREQUAL:$<TARGET_PROPERTY:DTPickersQML::DTPickers,TYPE>,STATIC_LIBRARY>:DTPickersQML::DTPickersplugin>
Esterv::DTPickers
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::DTPickers,TYPE>,STATIC_LIBRARY>:Esterv::DTPickersplugin>
)
target_compile_definitions(appqmlonline PRIVATE USE_QtQr)
list(APPEND qmlimport "Esterv.CustomControls.DateTimePickers")
endif(USE_DateTimePickers)

FetchContent_Declare(
EstervDesigns
GIT_REPOSITORY https://github.com/EddyTheCo/MyDesigns.git
GIT_TAG v1.2.1
FIND_PACKAGE_ARGS 1.2 CONFIG)
GIT_REPOSITORY https://github.com/EddyTheCo/Esterv.Designs.git
GIT_TAG v2.0.0
FIND_PACKAGE_ARGS 2.0 CONFIG)
FetchContent_MakeAvailable(EstervDesigns)

target_link_libraries(
appqmlonline
PRIVATE
EstervDesigns::SimpleStyle
EstervDesigns::CustomControls
EstervDesigns::FlatControl
$<$<STREQUAL:$<TARGET_PROPERTY:EstervDesigns::SimpleStyle,TYPE>,STATIC_LIBRARY>:EstervDesigns::SimpleStyleplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:EstervDesigns::CustomControls,TYPE>,STATIC_LIBRARY>:EstervDesigns::CustomControlsplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:EstervDesigns::FlatControl,TYPE>,STATIC_LIBRARY>:EstervDesigns::FlatControlplugin>
Esterv::SimpleStyle
Esterv::CustomControls
Esterv::FlatControl
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::SimpleStyle,TYPE>,STATIC_LIBRARY>:Esterv::SimpleStyleplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::CustomControls,TYPE>,STATIC_LIBRARY>:Esterv::CustomControlsplugin>
$<$<STREQUAL:$<TARGET_PROPERTY:Esterv::FlatControl,TYPE>,STATIC_LIBRARY>:Esterv::FlatControlplugin>
)
list(APPEND qmlimport "Esterv.Styles.Simple" "Esterv.CustomControls"
"Esterv.Controls.Flat")
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,8 @@ integrating a JavaScript code editor to the compiled Qt application of this rep

## Compile the WASM file and Qt-JavaScript Api

Clone the repo
```
git clone [email protected]:EddyTheCo/qmlonline.git qmlonline
```
Create build directory and build from there.
```
mkdir build
cd build
Qt../wasm_../bin/qt-cmake -DCMAKE_BUILD_TYPE=Release ../qmlonline/
cmake --build .
```
The project uses [CMake presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) as a way to share CMake configurations.
Refer to [cmake](https://cmake.org/cmake/help/latest/manual/cmake.1.html), [ctest](https://cmake.org/cmake/help/latest/manual/ctest.1.html) and [cpack](https://cmake.org/cmake/help/latest/manual/cpack.1.html) documentation for more information on the use of presets.

If everything went well, the corresponding WASM file and Qt-JavaScript Api should be updated on the qmlonline/wasm source directory.

Expand Down
7 changes: 5 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@

#include <QQuickStyle>
#ifdef USE_QtQr
#include "Qrimagedecoder.hpp"
#include "Qrimageprovider.hpp"
#include <esterv/utils/qr_image_decoder.hpp>
#include <esterv/utils/qr_image_provider.hpp>
#endif

using namespace Esterv::Utils::QrGen;
using namespace Esterv::Utils::QrDec;

int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
Expand Down
4 changes: 2 additions & 2 deletions wasm/examples/dtpickers
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Shows the use of the dateTime pickers QML module.
* The library is found on https://github.com/EddyTheCo/DateTimePickers
* Shows the use of the Date and Time pickers QML module.
* The library is found on https://github.com/EddyTheCo/Esterv.CustomControls.DateTimePickers
*
*/
import QtQuick 2.0
Expand Down
Loading

0 comments on commit 6686637

Please sign in to comment.