Skip to content

Commit

Permalink
Merge pull request #4 from ElementAstro/23w01a
Browse files Browse the repository at this point in the history
23w01a
  • Loading branch information
AstroAir authored Nov 24, 2023
2 parents 53c3342 + b8fdd0c commit bb25202
Show file tree
Hide file tree
Showing 432 changed files with 34,827 additions and 25,407 deletions.
70 changes: 40 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ endif()
# root directory of the project
set(Lithium_PROJECT_ROOT_DIR ${CMAKE_SOURCE_DIR})
set(lithium_src_dir ${Lithium_PROJECT_ROOT_DIR}/src)
set(lithium_module_dir ${Lithium_PROJECT_ROOT_DIR}/src/modules)
set(lithium_module_dir ${Lithium_PROJECT_ROOT_DIR}/src/atom)
set(lithium_client_dir ${Lithium_PROJECT_ROOT_DIR}/src/client)

add_custom_target(CmakeAdditionalFiles
SOURCES
Expand Down Expand Up @@ -110,23 +111,26 @@ elseif(LINUX)
endif()

set(api_module
${lithium_src_dir}/client/astap.cpp
${lithium_src_dir}/client/astrometry.cpp
${lithium_src_dir}/client/phd2client.cpp
${lithium_module_dir}/client/indiclient.cpp
${lithium_src_dir}/client/hydrogen/hydrogencamera.cpp
${lithium_client_dir}/platesolve/astap.cpp
${lithium_client_dir}/platesolve/astrometry.cpp
${lithium_client_dir}/phd2/phd2client.cpp
${lithium_client_dir}/hydrogen/hydrogenclient.cpp
${lithium_client_dir}/hydrogen/hydrogencamera.cpp
${lithium_client_dir}/hydrogen/hydrogenfilterwheel.cpp
${lithium_client_dir}/hydrogen/hydrogentelescope.cpp
${lithium_client_dir}/hydrogen/hydrogenfocuser.cpp
)

set(config_module
${lithium_module_dir}/config/configor.cpp
${lithium_src_dir}/config/configor.cpp
)

set(device_module
${lithium_module_dir}/device/device_manager.cpp
${lithium_module_dir}/device/indidevice_manager.cpp
${lithium_module_dir}/device/device_utils.cpp
${lithium_module_dir}/device/indi_device.cpp
${lithium_module_dir}/device/hydrogen_device.cpp
${lithium_src_dir}/device/device_manager.cpp
${lithium_src_dir}/device/indidevice_manager.cpp
${lithium_src_dir}/device/device_utils.cpp
${lithium_src_dir}/device/indi_device.cpp
${lithium_src_dir}/device/hydrogen_device.cpp
)

set(image_module
Expand All @@ -141,12 +145,9 @@ set(io_module
)

set(module_module
${lithium_module_dir}/module/modloader.cpp
${lithium_module_dir}/plugin/plugin.cpp
${lithium_module_dir}/plugin/exe_plugin.cpp
${lithium_module_dir}/plugin/script_plugin.cpp
${lithium_module_dir}/plugin/plugin_manager.cpp
${lithium_module_dir}/module/compiler.cpp
${lithium_module_dir}/plugin/module_loader.cpp
${lithium_src_dir}/plugin/plugin_loader.cpp
${lithium_module_dir}/plugin/compiler.cpp
)

set(web_module
Expand All @@ -162,6 +163,8 @@ set(server_module
${lithium_module_dir}/server/message_bus.hpp
${lithium_module_dir}/server/message_queue.hpp
${lithium_module_dir}/server/serialize.cpp
${lithium_module_dir}/server/deserialize.cpp
${lithium_module_dir}/server/json_checker.cpp

${lithium_src_dir}/websocket/WebSocketServer.cpp
${lithium_src_dir}/websocket/WsDeviceComponent.cpp
Expand All @@ -173,19 +176,24 @@ set(server_module
${lithium_src_dir}/websocket/device/WsDeviceInstance.cpp
${lithium_src_dir}/websocket/device/WsDeviceServer.cpp

${lithium_src_dir}/websocket/device/WsCameraInstance.cpp
${lithium_src_dir}/websocket/device/WsTelescopeInstance.cpp
${lithium_src_dir}/websocket/device/WsFocuserInstance.cpp
${lithium_src_dir}/websocket/device/WsFilterInstance.cpp

${lithium_src_dir}/websocket/plugin/WsPluginHub.cpp
${lithium_src_dir}/websocket/plugin/WsPluginInstance.cpp
${lithium_src_dir}/websocket/plugin/WsPluginServer.cpp
)

set(script_module
${lithium_module_dir}/script/script_manager.cpp
${lithium_src_dir}/script/script_manager.cpp
)

set(task_module
${lithium_module_dir}/task/task_manager.cpp
${lithium_module_dir}/task/task_stack.cpp
${lithium_module_dir}/task/task_generator.cpp
${lithium_src_dir}/task/task_manager.cpp
${lithium_src_dir}/task/task_stack.cpp
${lithium_src_dir}/task/task_generator.cpp
)

set(thread_module
Expand All @@ -206,7 +214,7 @@ set(system_module
set(utils_module
${lithium_module_dir}/utils/time.cpp
${lithium_module_dir}/utils/string.cpp
${lithium_module_dir}/utils/switch.cpp
${lithium_module_dir}/utils/static_switch.cpp
)

set(Lithium_module
Expand Down Expand Up @@ -242,7 +250,7 @@ configure_gettext(
"--copyright-holder=Max Qian" "[email protected]"
LANGUAGES "en_US.UTF-8")

find_package(Intl REQUIRED)
# find_package(Intl REQUIRED)

#################################################################################
# Main
Expand Down Expand Up @@ -274,9 +282,6 @@ add_subdirectory(modules/hydrogen_client)

# 构建Lithium内核
add_subdirectory(${lithium_src_dir}/core)
if(NOT WIN32)
add_subdirectory(${lithium_module_dir}/deviceloader)
endif()

add_executable(lithium_server ${api_module} ${config_module} ${io_module} ${module_module} ${web_module} ${device_module} ${thread_module} ${task_module} ${server_module} ${script_module} ${system_module} ${utils_module} ${Lithium_module})

Expand All @@ -287,6 +292,7 @@ target_link_libraries(lithium_server loguru)
target_link_libraries(lithium_server libzippp)

target_link_libraries(lithium_server lithiumcorestatic)
target_link_libraries(lithium_server lithiumpluginstatic)
target_link_libraries(lithium_server hydrogencore)
target_link_libraries(lithium_server hydrogenclientstatic)

Expand All @@ -296,17 +302,21 @@ if(NOT HAS_STD_FORMAT)
target_link_libraries(lithium_server fmt::fmt)
endif()

target_compile_definitions(lithium_server PRIVATE LOGURU_DEBUG_LOGGING)

target_link_libraries(lithium_server ${CFITSIO_LIBRARIES})
target_link_libraries(lithium_server OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(lithium_server ${ZLIB_LIBRARIES})
target_link_libraries(lithium_server libzip::zip)
target_link_libraries(lithium_server pugixml-static)
if(WIN32)
target_link_libraries(lithium_server pugixml-shared)
else()
target_link_libraries(lithium_server pugixml-shared)
endif()
target_link_libraries(lithium_server sqlite3)
target_link_libraries(lithium_server cpp_httplib)
target_link_libraries(lithium_server backward)

target_link_libraries(lithium_server asan)

target_link_libraries(lithium_server ${Libintl_LIBRARY})
target_include_directories(lithium_server PUBLIC ${Libintl_INCLUDE_DIRS})
add_dependencies(lithium_server lithium-gettext)
Expand Down
8 changes: 6 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
OpenAPT Update Log

23w01a

update most of the codes , and there is still a long way to go!
Expand Down Expand Up @@ -36,8 +38,10 @@ big update but not finished

big update but not finished



23w04a

big server update and blackened update

Lithium Update Log

23w01a
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pacman -S mingw-w64-x86_64-zlib
pacman -S mingw-w64-x86_64-fftw
pacman -S mingw-w64-x86_64-fmt
pacman -S mingw-w64-x86_64-libnova
pacman -S mingw-w64-x86_64-libjpeg-turbo
pacman -S mingw-w64-x86_64-libusb
```

On Ubuntu or other similar Linux platforms:
Expand Down Expand Up @@ -132,6 +134,11 @@ pacman -S mingw-w64-x86_64-cfitsio
pacman -S mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-libzip
pacman -S mingw-w64-x86_64-zlib
pacman -S mingw-w64-x86_64-fftw
pacman -S mingw-w64-x86_64-fmt
pacman -S mingw-w64-x86_64-libnova
pacman -S mingw-w64-x86_64-libjpeg-turbo
pacman -S mingw-w64-x86_64-libusb
# 如果想用make构建
pacman -S make
```
Expand Down
2 changes: 0 additions & 2 deletions cmake_modules/compiler_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ if (APPLE)
endif ()
endif ()

add_compile_options(-fsanitize=address -Wall)

# set build architecture for non-Apple platforms
if (NOT APPLE)
set(CMAKE_OSX_ARCHITECTURES x86_64 CACHE STRING "build architecture for non-Apple platforms" FORCE)
Expand Down
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#cmakedefine01 ENABLE_ASYNC
#cmakedefine01 ENABLE_NATIVE_SERVER
#cmakedefine01 ENABLE_FASTHASH

// I18n
#include <libintl.h>
Expand Down
Loading

0 comments on commit bb25202

Please sign in to comment.