Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Mar 8, 2024
2 parents c41c400 + 8e13508 commit 80109e7
Show file tree
Hide file tree
Showing 5,571 changed files with 362,887 additions and 2,578,001 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-latest]
os: [ubuntu-latest]

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Update before installing packages
run: sudo apt-get update
Expand All @@ -41,6 +43,9 @@ jobs:
- name: Install libssl-dev manually
run: sudo apt-get install libssl-dev

- name: Install libwebsockets-dev manually
run: sudo apt-get install libwebsockets-dev

- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: configure
Expand Down
21 changes: 21 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[submodule "third_party/spdlog"]
path = third_party/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "third_party/nlohmann"]
path = third_party/nlohmann
url = https://github.com/nlohmann/json.git
[submodule "third_party/mustache"]
path = third_party/mustache
url = https://github.com/kainjow/Mustache.git
[submodule "third_party/maddy"]
path = third_party/maddy
url = https://github.com/progsource/maddy.git
[submodule "third_party/tiny-aes"]
path = third_party/tiny-aes
url = https://github.com/kokke/tiny-AES-c.git
[submodule "third_party/fastpbkdf2"]
path = third_party/fastpbkdf2
url = https://github.com/ctz/fastpbkdf2.git
[submodule "third_party/mongoose"]
path = third_party/mongoose
url = https://github.com/cesanta/mongoose.git
7 changes: 0 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
"codecvt": "cpp"
},
"cSpell.words": [
"Åke Hedman",
"angliškas",
"aprašymas",
"Atmel",
Expand Down Expand Up @@ -138,12 +137,6 @@
"editor.dragAndDrop": false,
"editor.codeLens": true,
"diffEditor.codeLens": true,
"cmake.configureSettings": {
"VCPKG_TARGET_TRIPLET" : "x64-windows",
"CMAKE_BUILD_TYPE" : "${buildType}",
"CMAKE_TOOLCHAIN_FILE" : "E:/development/vcpkg/scripts/buildsystems/vcpkg.cmake"
},
"cmake.generator": "Visual Studio 16 2019",
"cSpell.language": "sv,en",
"files.watcherExclude": {
"**/.git/objects/**": true,
Expand Down
112 changes: 72 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Build instructions for the VSCP daemon.
#
# Copyright (c) 2000-2022 Åke Hedman, the VSCP project
# Copyright (C) 2000-2024 Ake Hedman the VSCP project
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,6 +25,7 @@

cmake_minimum_required(VERSION 3.5)
project(vscpd LANGUAGES CXX C)
set(PACKAGE_AUTHOR "Ake Hedman, the VSCP Project")

# Version settings
if(NOT DEFINED MAJOR_VERSION)
Expand All @@ -37,6 +38,8 @@ if(NOT DEFINED PATCH_VERSION)
SET(PATCH_VERSION "2")
endif()

add_subdirectory(./third_party/spdlog/)

# Disable abi warnings (nlohmann)
if(WIN32)
else()
Expand Down Expand Up @@ -172,7 +175,6 @@ elseif(UNIX)
set(LIBS_SYSTEM c stdc++)
endif()


# set the module path
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)

Expand All @@ -183,6 +185,10 @@ find_package(Threads REQUIRED)
# openssl
find_package(OpenSSL REQUIRED)

# libwebsockets
#find_package(libwebsockets CONFIG REQUIRED)
include(FindLibWebSockets)

# Windows Libs
if (WIN32)
# pthread
Expand All @@ -200,8 +206,6 @@ if (WIN32)
# dlfcn
find_package(dlfcn-win32 CONFIG REQUIRED)

# Logging
#find_package(spdlog CONFIG REQUIRED)
else()
# expat
include(FindEXPAT)
Expand All @@ -210,23 +214,41 @@ else()

# Mosquitto lib
include(FindMosquitto)

# Logger
#find_package(spdlog CONFIG REQUIRED)

endif(WIN32)

# Set civetweb build flags
add_definitions(-DUSE_WEBSOCKET)
add_definitions(-DUSE_IPV6)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_IPV6 -DUSE_WEBSOCKET ")
string(FIND "${OPENSSL_VERSION}" "1.1." SSL_VER_POS)
if (${SSL_VER_POS})
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL_API_1_0")
add_definitions(-DOPENSSL_API_1_0)
else()
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENSSL_API_1_1")
add_definitions(-DOPENSSL_API_1_1)

set(OPENSSL_VER "OPENSSL_API_${OPENSSL_VERSION_MAJOR}_${OPENSSL_VERSION_MINOR}")
message(STATUS "OPENSSL Version: ${OPENSSL_VER} - ${OPENSSL_VERSION}")
#add_definitions(-D${OPENSSL_VER})

# 1.1.0 / 1.1.1 / 3.0.0 / 3.1.0
string(FIND "${OPENSSL_VERSION}" "1.0" SSL_VER_POS)
if(NOT ${SSL_VER_POS} EQUAL -1)
add_definitions(-DOPENSSL_API_1_0)
message(STATUS "Open ssl version is 1.0")
endif()

string(FIND "${OPENSSL_VERSION}" "1.1" SSL_VER_POS)
if(NOT ${SSL_VER_POS} EQUAL -1)
add_definitions(-DOPENSSL_API_1_1)
message(STATUS "Open ssl version is 1.1")
endif()

string(FIND "${OPENSSL_VERSION}" "3.0" SSL_VER_POS)
if(NOT SSL_VER_POS EQUAL -1)
add_definitions(-DOPENSSL_API_3_0)
message(STATUS "Open ssl version is 3.0")
endif()

string(FIND "${OPENSSL_VERSION}" "3.1" SSL_VER_POS)
if(NOT SSL_VER_POS EQUAL -1)
add_definitions(-DOPENSSL_API_3_1)
message(STATUS "Open ssl version is 3.1")
endif()

if (WIN32)
Expand Down Expand Up @@ -258,11 +280,11 @@ if (WIN32)
src/vscp/common/vscp_client_base.cpp
src/vscp/common/vscp_client_mqtt.h
src/vscp/common/vscp_client_mqtt.cpp
src/common/third_party/mustache.hpp
src/common/third_party/civetweb-1.15/include/civetweb.h
src/common/third_party/civetweb-1.15/src/civetweb.c
src/common/third_party/sqlite3-3.35.4/sqlite3.h
src/common/third_party/sqlite3-3.35.4/sqlite3.c
./third_party/mustache/mustache.hpp
#third_party/civetweb/include/civetweb.h
#third_party/civetweb/src/civetweb.c
./third_party/sqlite3/sqlite3.h
./third_party/sqlite3/sqlite3.c
src/common/windows/getopt.c
src/common/configfile.h
src/common/configfile.cpp
Expand All @@ -278,8 +300,8 @@ if (WIN32)
src/common/crc8.c
src/common/vscpmd5.h
src/common/vscpmd5.c
src/common/fastpbkdf2.h
src/common/fastpbkdf2.c
./third_party/fastpbkdf2/fastpbkdf2.h
./third_party/fastpbkdf2/fastpbkdf2.c
src/common/randpassword.h
src/common/randpassword.cpp
)
Expand Down Expand Up @@ -312,11 +334,11 @@ else()
src/vscp/common/vscp_client_base.cpp
src/vscp/common/vscp_client_mqtt.h
src/vscp/common/vscp_client_mqtt.cpp
src/common/third_party/mustache.hpp
src/common/third_party/civetweb-1.15/include/civetweb.h
src/common/third_party/civetweb-1.15/src/civetweb.c
src/common/third_party/sqlite3-3.35.4/sqlite3.h
src/common/third_party/sqlite3-3.35.4/sqlite3.c
./third_party/mustache/mustache.hpp
#third_party/civetweb/include/civetweb.h
#third_party/civetweb/src/civetweb.c
./third_party/sqlite3/sqlite3.h
./third_party/sqlite3/sqlite3.c
src/common/configfile.h
src/common/configfile.cpp
src/common/sockettcp.h
Expand All @@ -331,8 +353,8 @@ else()
src/common/crc8.c
src/common/vscpmd5.h
src/common/vscpmd5.c
src/common/fastpbkdf2.h
src/common/fastpbkdf2.c
./third_party/fastpbkdf2/fastpbkdf2.h
./third_party/fastpbkdf2/fastpbkdf2.c
src/common/randpassword.h
src/common/randpassword.cpp
)
Expand All @@ -347,16 +369,19 @@ if (WIN32)
./src/common
./src/vscp/common/
./src/common/third_party
./src/common/third_party/nlohmann
./src/common/third_party/civetweb-1.15/
./src/common/third_party/civetweb-1.15/include/
./src/common/third_party/sqlite3-3.35.4/
./src/common/third_party/spdlog-1.9.2/include/
./third_party/nlohmann/include
#./third_party/civetweb/
#./third_party/civetweb/include/
./third_party/sqlite3/
./third_party/spdlog/include/
./third_party/mustache/
./third_party/fastpbkdf2/
./src/common/windows
${PThreads4W_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${OPENSSL_INCLUDE_DIR}
${MOSQUITTO_INCLUDE_DIRS}
${LIBWEBSOCKETS_INCLUDE_DIR}
${EXPAT_INCLUDE_DIRS}
${DLFCN_INCLUDES}
${LOCAL_WIN_INCLUDE} )
Expand All @@ -365,28 +390,34 @@ else()
./src/common
./src/vscp/common/
./src/common/third_party
./src/common/third_party/nlohmann
./src/common/third_party/civetweb-1.15/
./src/common/third_party/civetweb-1.15/include/
./src/common/third_party/sqlite3-3.35.4/
./src/common/third_party/spdlog-1.9.2/include/
./third_party/nlohmann/include
#./third_party/civetweb/
#./third_party/civetweb/include/
./third_party/sqlite3/
./third_party/mustache/
./third_party/spdlog/include/
./third_party/fastpbkdf2/
${PThreads4W_INCLUDE_DIR}
${CMAKE_BINARY_DIR}
${OPENSSL_INCLUDE_DIR}
${MOSQUITTO_INCLUDE_DIRS}
${LIBWEBSOCKETS_INCLUDE_DIR}
${EXPAT_INCLUDE_DIRS}
${DLFCN_INCLUDES}
${LOCAL_WIN_INCLUDE} )
${LOCAL_WIN_INCLUDE}
${LIBWEBSOCKETS_INCLUDE_DIR} )
endif()

if(WIN32)
if(MSVC)
target_link_libraries(vscpd PRIVATE
netapi32.lib
PThreads4W::PThreads4W_CXXEXC
OpenSSL::SSL
OpenSSL::Crypto
OpenSSL::SSL OpenSSL::Crypto
websockets_shared
${MOSQUITTO_LIBRARIES}
${LIBWEBSOCKETS_LIBRARIES}
expat::expat
dlfcn-win32::dl
# spdlog::spdlog spdlog::spdlog_header_only
Expand All @@ -400,6 +431,7 @@ else()
OpenSSL::SSL
OpenSSL::Crypto
${OPENSSL_LIBRARIES}
${LIBWEBSOCKETS_LIBRARIES}
${MOSQUITTO_LIBRARIES}
${EXPAT_LIBRARIES}
)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright © 2020-2022 Ake Hedman, Grodans Paradis AB
Copyright (C)2020-2022 Ake Hedman, Grodans Paradis AB
<[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Also there is a <a href="https://github.com/grodansparadis/vscp_firmware"firmwar
<a href="https://github.com/grodansparadis/vscp_html5">HTML5 websocket UI repository</a>.
</p>

Copyright © 2000-2022 Ake Hedman, the VSCP project - MIT license.
Copyright (C) 2000-2024 Ake Hedman, the VSCP project - MIT license.
2 changes: 1 addition & 1 deletion contrib/samples/python/gettempfromyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//
// This file is part of the VSCP (https://www.vscp.org)
//
// Copyright © 2000-2022 Ake Hedman,
// Copyright (C) 2000-2024 Ake Hedman,
// Ake Hedman, the VSCP project, <[email protected]>
//
// This file is distributed in the hope that it will be useful,
Expand Down
2 changes: 1 addition & 1 deletion contrib/samples/python/send1wvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//
// This file is part of the VSCP (https://www.vscp.org)
//
// Copyright © 2000-2022 Ake Hedman,
// Copyright (C) 2000-2024 Ake Hedman,
// Ake Hedman, the VSCP project, <[email protected]>
//
// This file is distributed in the hope that it will be useful,
Expand Down
2 changes: 1 addition & 1 deletion contrib/samples/python/send_pi_cpu_temp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//
// This file is part of the VSCP (https://www.vscp.org)
//
// Copyright © 2000-2022 Ake Hedman,
// Copyright (C) 2000-2024 Ake Hedman,
// Ake Hedman, the VSCP project, <[email protected]>
//
// This file is distributed in the hope that it will be useful,
Expand Down
2 changes: 1 addition & 1 deletion contrib/samples/python/send_pi_gpu_temp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//
// This file is part of the VSCP (https://www.vscp.org)
//
// Copyright © 2000-2022 Ake Hedman,
// Copyright (C) 2000-2024 Ake Hedman,
// Ake Hedman, the VSCP project, <[email protected]>
//
// This file is distributed in the hope that it will be useful,
Expand Down
2 changes: 1 addition & 1 deletion contrib/samples/python/sendvalues.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//
// This file is part of the VSCP (https://www.vscp.org)
//
// Copyright © 2000-2022 Ake Hedman,
// Copyright (C) 2000-2024 Ake Hedman,
// Ake Hedman, the VSCP project, <[email protected]>
//
// This file is distributed in the hope that it will be useful,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("vscp_analyzer")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyCopyright("Copyright (C) 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Binary file modified database
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/bottom_copyright.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Document created: *${/var/creation-time}*
Describe software version: ${/var/document-version}
This documentation is open-source. Please help improve it by filing issues or pull requests.
© 2000-2021 [the VSCP project](https://www.vscp.org) | Documentation Distributed under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) and can be freely copied, redistributed, remixed, transformed, built upon as long as you give credits to the author.
(C) 2000-2021 [the VSCP project](https://www.vscp.org) | Documentation Distributed under [Creative Commons BY 4.0](https://creativecommons.org/licenses/by/4.0/) and can be freely copied, redistributed, remixed, transformed, built upon as long as you give credits to the author.
Loading

0 comments on commit 80109e7

Please sign in to comment.