From 76dbcab15b96b009a713fb611cd9d146b28b8ac6 Mon Sep 17 00:00:00 2001
From: Max Qian
Date: Wed, 24 Jan 2024 11:22:31 +0800
Subject: [PATCH] update -- remove lithium gui launcher -- add a cmd interface
launcher -- upgrade the database creator -- add msys2 build github action --
fix bugs in cobalt-web -- rebase lithium-web, remove unnecessary files -- add
definition of the addon in README.md
---
.github/workflows/codeql.yml | 8 +
.github/workflows/windows-mingw.yml | 64 +
README.md | 5 +-
data/createdb.cpp | 443 +++-
data/object.hpp | 118 +
launcher/.gitignore | 2 -
launcher/CMakeLists.txt | 118 -
launcher/LICENSE | 339 ---
launcher/LithiumWebManagerApp-master.kdev4 | 4 -
launcher/LithiumWebManagerApp.kcfg | 189 --
launcher/Options.kcfgc | 7 -
launcher/README.md | 137 -
launcher/cmake/modules/MacroBoolTo01.cmake | 48 -
launcher/debian/CMakeCache.txt | 380 ---
.../CMakeFiles/3.26.4/CMakeCCompiler.cmake | 72 -
.../CMakeFiles/3.26.4/CMakeCXXCompiler.cmake | 83 -
.../3.26.4/CMakeDetermineCompilerABI_C.bin | Bin 16656 -> 0 bytes
.../3.26.4/CMakeDetermineCompilerABI_CXX.bin | Bin 16680 -> 0 bytes
.../CMakeFiles/3.26.4/CMakeSystem.cmake | 15 -
.../3.26.4/CompilerIdC/CMakeCCompilerId.c | 866 -------
.../CompilerIdCXX/CMakeCXXCompilerId.cpp | 855 ------
.../debian/CMakeFiles/CMakeConfigureLog.yaml | 529 ----
launcher/debian/CMakeFiles/cmake.check_cache | 1 -
launcher/debian/changelog | 89 -
launcher/debian/compat | 1 -
launcher/debian/control | 33 -
launcher/debian/copyright | 53 -
launcher/debian/rules | 4 -
launcher/debian/version.h | 5 -
launcher/icons/128-indi_logo.png | Bin 20206 -> 0 bytes
launcher/icons/INDIWebManagerApp.icns | Bin 744948 -> 0 bytes
launcher/icons/configure-dark.svg | 17 -
launcher/icons/configure.svg | 17 -
launcher/icons/edit-copy-dark.svg | 15 -
launcher/icons/edit-copy.svg | 13 -
launcher/icons/green.png | Bin 730 -> 0 bytes
launcher/icons/media-playback-start-dark.svg | 18 -
launcher/icons/media-playback-start.svg | 18 -
launcher/icons/media-playback-stop-dark.svg | 18 -
launcher/icons/media-playback-stop.svg | 18 -
launcher/icons/red.png | Bin 680 -> 0 bytes
launcher/images/configPage1.png | Bin 99817 -> 0 bytes
launcher/images/configPage2.png | Bin 135237 -> 0 bytes
launcher/images/indi_logo.png | Bin 14385 -> 0 bytes
launcher/images/linuxImage.png | Bin 115495 -> 0 bytes
launcher/images/macImage.png | Bin 91991 -> 0 bytes
launcher/images/macImageWithLog.png | Bin 196333 -> 0 bytes
launcher/images/webManager.png | Bin 29540 -> 0 bytes
launcher/launcher.cpp | 552 ++++
launcher/launcher.hpp | 292 +++
launcher/launcher.json | 10 +
launcher/resources.qrc | 15 -
launcher/src/main.cpp | 32 -
launcher/src/mainwindow.cpp | 1167 ---------
launcher/src/mainwindow.h | 98 -
launcher/src/mainwindow.ui | 958 -------
launcher/src/opsconfiguration.cpp | 502 ----
launcher/src/opsconfiguration.h | 47 -
launcher/src/opsconfiguration.ui | 333 ---
launcher/src/opsmanager.cpp | 216 --
launcher/src/opsmanager.h | 44 -
launcher/src/opsmanager.ui | 192 --
launcher/src/version.h.cmake | 5 -
launcher/terminal.cpp | 480 ++++
launcher/terminal.hpp | 197 ++
src/script/addon/driver.hpp | 81 +
src/script/chaiscript.cpp | 251 ++
src/script/chaiscript.hpp | 117 +
src/script/python.cpp | 23 +
src/script/python.hpp | 30 +
src/script/sheller.cpp | 280 ++
src/script/sheller.hpp | 122 +
websrc/cobalt-web/package-lock.json | 39 +
websrc/cobalt-web/package.json | 2 +
.../src/pages/dashboard/CameraView.tsx | 35 +
.../src/pages/dashboard/CaptureButton.tsx | 13 +
.../src/pages/dashboard/FloatingUI.tsx | 61 +
.../src/pages/dashboard/Sidebar.tsx | 54 +
.../src/pages/dashboard/Toolbar.tsx | 20 +
.../cobalt-web/src/pages/dashboard/index.tsx | 122 +-
.../cobalt-web/src/pages/dashboard/style.tsx | 25 +
websrc/cobalt-web/src/pages/home/style.less | 37 -
websrc/lithium-web/package-lock.json | 557 ++--
websrc/lithium-web/package.json | 12 +-
.../public/css/skymap/aladin.min.css | 1 -
.../lithium-web/public/css/skymap/skymap.css | 230 --
.../public/js/bootstrap.bundle.min.js | 7 +
websrc/lithium-web/public/js/jquery.min.js | 2 +
.../public/js/jquery.overlayScrollbars.min.js | 13 +
.../public/js/skymap/aladin.min.js | 1 -
.../lithium-web/public/js/skymap/anime.min.js | 8 -
websrc/lithium-web/public/js/skymap/skymap.js | 2298 -----------------
.../src/components/LanguagePicker.astro | 10 +
.../src/components/_loadding.astro | 0
.../lithium-web/src/components/_scripts.astro | 15 +-
websrc/lithium-web/src/i18n/ui.ts | 20 +
websrc/lithium-web/src/i18n/utils.ts | 19 +
websrc/lithium-web/src/pages/client.astro | 362 +--
.../src/pages/en/help/bugreport.astro | 90 +
.../lithium-web/src/pages/en/help/faq.astro | 112 +
.../src/pages/en/help/license.astro | 211 ++
websrc/lithium-web/src/pages/en/index.astro | 2 +-
websrc/lithium-web/src/pages/index.astro | 2 +-
.../lithium-web/src/pages/module/skymap.astro | 1240 ---------
.../src/pages/user/forget-password.astro | 95 -
websrc/lithium-web/src/pages/user/login.astro | 123 -
.../lithium-web/src/pages/user/register.astro | 118 -
107 files changed, 4073 insertions(+), 12529 deletions(-)
create mode 100644 .github/workflows/windows-mingw.yml
create mode 100644 data/object.hpp
delete mode 100644 launcher/.gitignore
delete mode 100644 launcher/LICENSE
delete mode 100644 launcher/LithiumWebManagerApp-master.kdev4
delete mode 100644 launcher/LithiumWebManagerApp.kcfg
delete mode 100644 launcher/Options.kcfgc
delete mode 100644 launcher/README.md
delete mode 100644 launcher/cmake/modules/MacroBoolTo01.cmake
delete mode 100644 launcher/debian/CMakeCache.txt
delete mode 100644 launcher/debian/CMakeFiles/3.26.4/CMakeCCompiler.cmake
delete mode 100644 launcher/debian/CMakeFiles/3.26.4/CMakeCXXCompiler.cmake
delete mode 100755 launcher/debian/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_C.bin
delete mode 100755 launcher/debian/CMakeFiles/3.26.4/CMakeDetermineCompilerABI_CXX.bin
delete mode 100644 launcher/debian/CMakeFiles/3.26.4/CMakeSystem.cmake
delete mode 100644 launcher/debian/CMakeFiles/3.26.4/CompilerIdC/CMakeCCompilerId.c
delete mode 100644 launcher/debian/CMakeFiles/3.26.4/CompilerIdCXX/CMakeCXXCompilerId.cpp
delete mode 100644 launcher/debian/CMakeFiles/CMakeConfigureLog.yaml
delete mode 100644 launcher/debian/CMakeFiles/cmake.check_cache
delete mode 100644 launcher/debian/changelog
delete mode 100644 launcher/debian/compat
delete mode 100644 launcher/debian/control
delete mode 100644 launcher/debian/copyright
delete mode 100644 launcher/debian/rules
delete mode 100644 launcher/debian/version.h
delete mode 100644 launcher/icons/128-indi_logo.png
delete mode 100644 launcher/icons/INDIWebManagerApp.icns
delete mode 100644 launcher/icons/configure-dark.svg
delete mode 100644 launcher/icons/configure.svg
delete mode 100644 launcher/icons/edit-copy-dark.svg
delete mode 100644 launcher/icons/edit-copy.svg
delete mode 100644 launcher/icons/green.png
delete mode 100644 launcher/icons/media-playback-start-dark.svg
delete mode 100644 launcher/icons/media-playback-start.svg
delete mode 100644 launcher/icons/media-playback-stop-dark.svg
delete mode 100644 launcher/icons/media-playback-stop.svg
delete mode 100644 launcher/icons/red.png
delete mode 100644 launcher/images/configPage1.png
delete mode 100644 launcher/images/configPage2.png
delete mode 100644 launcher/images/indi_logo.png
delete mode 100644 launcher/images/linuxImage.png
delete mode 100644 launcher/images/macImage.png
delete mode 100644 launcher/images/macImageWithLog.png
delete mode 100644 launcher/images/webManager.png
create mode 100644 launcher/launcher.cpp
create mode 100644 launcher/launcher.hpp
create mode 100644 launcher/launcher.json
delete mode 100644 launcher/resources.qrc
delete mode 100644 launcher/src/main.cpp
delete mode 100644 launcher/src/mainwindow.cpp
delete mode 100644 launcher/src/mainwindow.h
delete mode 100644 launcher/src/mainwindow.ui
delete mode 100644 launcher/src/opsconfiguration.cpp
delete mode 100644 launcher/src/opsconfiguration.h
delete mode 100644 launcher/src/opsconfiguration.ui
delete mode 100644 launcher/src/opsmanager.cpp
delete mode 100644 launcher/src/opsmanager.h
delete mode 100644 launcher/src/opsmanager.ui
delete mode 100644 launcher/src/version.h.cmake
create mode 100644 launcher/terminal.cpp
create mode 100644 launcher/terminal.hpp
create mode 100644 src/script/addon/driver.hpp
create mode 100644 src/script/chaiscript.cpp
create mode 100644 src/script/chaiscript.hpp
create mode 100644 src/script/python.cpp
create mode 100644 src/script/python.hpp
create mode 100644 src/script/sheller.cpp
create mode 100644 src/script/sheller.hpp
create mode 100644 websrc/cobalt-web/src/pages/dashboard/CameraView.tsx
create mode 100644 websrc/cobalt-web/src/pages/dashboard/CaptureButton.tsx
create mode 100644 websrc/cobalt-web/src/pages/dashboard/FloatingUI.tsx
create mode 100644 websrc/cobalt-web/src/pages/dashboard/Sidebar.tsx
create mode 100644 websrc/cobalt-web/src/pages/dashboard/Toolbar.tsx
create mode 100644 websrc/cobalt-web/src/pages/dashboard/style.tsx
delete mode 100644 websrc/cobalt-web/src/pages/home/style.less
delete mode 100644 websrc/lithium-web/public/css/skymap/aladin.min.css
delete mode 100644 websrc/lithium-web/public/css/skymap/skymap.css
create mode 100644 websrc/lithium-web/public/js/bootstrap.bundle.min.js
create mode 100644 websrc/lithium-web/public/js/jquery.min.js
create mode 100644 websrc/lithium-web/public/js/jquery.overlayScrollbars.min.js
delete mode 100644 websrc/lithium-web/public/js/skymap/aladin.min.js
delete mode 100644 websrc/lithium-web/public/js/skymap/anime.min.js
delete mode 100644 websrc/lithium-web/public/js/skymap/skymap.js
create mode 100644 websrc/lithium-web/src/components/LanguagePicker.astro
delete mode 100644 websrc/lithium-web/src/components/_loadding.astro
create mode 100644 websrc/lithium-web/src/i18n/ui.ts
create mode 100644 websrc/lithium-web/src/i18n/utils.ts
create mode 100644 websrc/lithium-web/src/pages/en/help/bugreport.astro
create mode 100644 websrc/lithium-web/src/pages/en/help/faq.astro
create mode 100644 websrc/lithium-web/src/pages/en/help/license.astro
delete mode 100644 websrc/lithium-web/src/pages/module/skymap.astro
delete mode 100644 websrc/lithium-web/src/pages/user/forget-password.astro
delete mode 100644 websrc/lithium-web/src/pages/user/login.astro
delete mode 100644 websrc/lithium-web/src/pages/user/register.astro
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 4e9fe33d..1afa87a0 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -40,6 +40,9 @@ jobs:
steps:
+ - name: Get submodles
+ run: git submodule update --init --recursive
+
- name: Update the build system
run: sudo apt-get update && sudo apt-get upgrade -y
@@ -81,3 +84,8 @@ jobs:
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v3
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml
new file mode 100644
index 00000000..ff9dc472
--- /dev/null
+++ b/.github/workflows/windows-mingw.yml
@@ -0,0 +1,64 @@
+name: MinGW
+
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - 'master'
+ pull_request:
+ branches:
+ - 'master'
+
+env:
+ # Path to the solution file relative to the root of the project.
+ SOLUTION_FILE_PATH: .
+
+ # Configuration type to build.
+ # You can convert this to a build matrix if you need coverage of multiple configuration types.
+ # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
+ BUILD_CONFIGURATION: Debug
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: windows-latest
+
+ strategy:
+ matrix:
+ include:
+ - { sys: mingw64, env: x86_64 }
+
+ defaults:
+ run:
+ shell: msys2 {0}
+
+ steps:
+ - uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{matrix.sys}}
+ update: true
+ install: >-
+ mingw-w64-${{matrix.env}}-openssl
+
+ base-devel
+ mingw-w64-${{matrix.env}}-cmake
+ mingw-w64-${{matrix.env}}-gcc
+ mingw-w64-${{matrix.env}}-libnova
+ mingw-w64-${{matrix.env}}-dlfcn
+ mingw-w64-${{matrix.env}}-cfitsio
+ mingw-w64-${{matrix.env}}-fmt
+ mingw-w64-${{matrix.env}}-zlib
+ mingw-w64-${{matrix.env}}-libzip
+ zlib-devel
+
+ - name: Get INDI Sources
+ uses: actions/checkout@v3
+
+ - name: Build INDI Core
+ run: |
+ mkdir build
+ cd build
+ cmake .. -DINDI_BUILD_SERVER=OFF -DINDI_BUILD_DRIVERS=OFF
+ cmake --build .
\ No newline at end of file
diff --git a/README.md b/README.md
index 827e32ce..d2ac890d 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,9 @@ Lithium
+[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d3fed47a38e642a390d8ee506dc0acb3)](https://app.codacy.com/gh/ElementAstro/Lithium/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
+
+
## Introduction
Lithium, a lively and lightweight astrophotography terminal.
@@ -195,7 +198,7 @@ pacman -S mingw-w64-x86_64-libnova
pacman -S make # 注意添加对应的目录,否则会当场爆炸
```
-#### Ubuntu/Debian (不需要INDI库)
+#### Ubuntu/Debian/Other Linux
```shell
sudo apt-get update && sudo apt-get upgrade -y
diff --git a/data/createdb.cpp b/data/createdb.cpp
index e0be5e11..ef9b8f90 100644
--- a/data/createdb.cpp
+++ b/data/createdb.cpp
@@ -1,13 +1,31 @@
+/*
+ * createdb.cpp
+ *
+ * Copyright (C) 2023-2024 Max Qian
+ */
+
+/*************************************************
+
+Date: 2023-7-13
+
+Description: A simple database creation tool
+
+**************************************************/
+
#include
#include
#include
#include
#include
-#include