Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/chrysikos/indi
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysikos committed Jan 9, 2024
2 parents d172ff1 + 9de3343 commit 1e382fd
Show file tree
Hide file tree
Showing 267 changed files with 2,594 additions and 849 deletions.
7 changes: 5 additions & 2 deletions .github/docker/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM debian:latest

RUN cat /etc/os-release

WORKDIR /tmp

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
Expand All @@ -18,8 +20,9 @@ RUN git clone https://github.com/google/googletest.git googletest && \
# INDI 3rd Party
RUN apt-get install -y \
libftdi1-dev libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev \
libgps-dev libraw-dev libdc1394-22-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev
libgps-dev libraw-dev libdc1394-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev \
libzmq3-dev

# Install Qt5
RUN apt-get install -y \
Expand Down
5 changes: 4 additions & 1 deletion .github/docker/Dockerfile.debian-buster
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM debian:buster

RUN cat /etc/os-release

WORKDIR /tmp

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
Expand All @@ -19,7 +21,8 @@ RUN git clone https://github.com/google/googletest.git googletest && \
RUN apt-get install -y \
libftdi1-dev libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev \
libgps-dev libraw-dev libdc1394-22-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev \
libzmq3-dev

# Install Qt5
RUN apt-get install -y \
Expand Down
7 changes: 4 additions & 3 deletions .github/docker/Dockerfile.debian-i386
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM i386/debian
FROM i386/debian:latest

WORKDIR /tmp

Expand All @@ -18,8 +18,9 @@ RUN git clone https://github.com/google/googletest.git googletest && \
# INDI 3rd Party
RUN apt-get install -y \
libftdi1-dev libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev \
libgps-dev libraw-dev libdc1394-22-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev
libgps-dev libraw-dev libdc1394-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev \
libzmq3-dev

# Install Qt5
RUN apt-get install -y \
Expand Down
5 changes: 4 additions & 1 deletion .github/docker/Dockerfile.fedora
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM fedora:latest

RUN cat /etc/os-release

WORKDIR /tmp

RUN dnf -y upgrade && dnf -y install \
Expand All @@ -25,7 +27,8 @@ RUN dnf -y install \
ffmpeg-devel \
libftdi-devel \
gpsd-devel LibRaw-devel libdc1394-devel libgphoto2-devel \
boost-devel rtl-sdr-devel
boost-devel rtl-sdr-devel \
zeromq-devel

# Install Qt5
RUN dnf -y install \
Expand Down
5 changes: 4 additions & 1 deletion .github/docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:latest

RUN cat /etc/os-release

WORKDIR /tmp

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
Expand All @@ -19,7 +21,8 @@ RUN git clone https://github.com/google/googletest.git googletest && \
RUN apt-get install -y \
libftdi1-dev libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev \
libgps-dev libraw-dev libdc1394-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev \
libzmq3-dev

# Install Qt5
RUN apt-get install -y \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:

steps:
- name: Login to Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
file: ./.github/docker/Dockerfile.${{ matrix.container }}
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
uses: tj-actions/changed-files@v41

- name: Check codestyle of all changed files with suffix cpp,cxx,c,h
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-i386.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Get INDI Sources
uses: actions/checkout@v1
uses: actions/checkout@v1 # Only v1 is compatible because of the different arch

- name: Build INDI Core
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Get INDI Sources
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: 'indi'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-pyindi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Get INDI Sources
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: 'indi'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

steps:
- name: Get INDI Sources
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: 'indi'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Get INDI Sources
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: 'indi'

Expand Down
46 changes: 43 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ endif()
# #################################### INDI version ################################################
set(CMAKE_INDI_VERSION_MAJOR 2)
set(CMAKE_INDI_VERSION_MINOR 0)
set(CMAKE_INDI_VERSION_RELEASE 4)
set(CMAKE_INDI_VERSION_RELEASE 5)

set(INDI_SOVERSION ${CMAKE_INDI_VERSION_MAJOR})
set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}")
Expand Down Expand Up @@ -96,6 +96,10 @@ OPTION(INDI_BUILD_SHARED "Build shared library" ON)
OPTION(INDI_BUILD_STATIC "Build static library" ON)
OPTION(INDI_BUILD_XISF "Build XISF support" ON)

# System provided or bundled libs
OPTION(INDI_SYSTEM_HTTPLIB "Use system provided httplib" OFF)
OPTION(INDI_SYSTEM_JSONLIB "Use system provided json library" OFF)

if(UNIX AND NOT APPLE)
OPTION(INDI_SHARED_MEMORY "Build INDI with support for UNIX protocol with shared memory" ON)
else()
Expand Down Expand Up @@ -165,6 +169,32 @@ install(FILES
COMPONENT Devel
)

# ##################################################################################################
# #################################### bundled libs ##############################################
# ##################################################################################################
if(INDI_SYSTEM_HTTPLIB)
find_package(httplib REQUIRED)
include_directories(${HTTPLIB_INCLUDE_DIR})
set(SYSTEM_HTTPLIB 1)
message(STATUS "Using system provided httplib version ${HTTPLIB_VERSION}")
else()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/httplib)
set(SYSTEM_HTTPLIB 0)
message(STATUS "Using bundled httplib")
endif(INDI_SYSTEM_HTTPLIB)

if(INDI_SYSTEM_JSONLIB)
find_package(nlohmann_json REQUIRED)
set(SYSTEM_JSONLIB 1)
set(JSONLIB nlohmann_json::nlohmann_json)
add_definitions(-D_USE_SYSTEM_JSONLIB)
message(STATUS "Using system provided Niels Lohmann's json library")
else(INDI_SYSTEM_JSONLIB)
set(SYSTEM_JSONLIB 0)
set(JSONLIB "")
message(STATUS "Using bundled json library")
endif(INDI_SYSTEM_JSONLIB)

# ###################################################################################################
#
# Component : INDI Core
Expand Down Expand Up @@ -380,12 +410,22 @@ endif()
# Install common dev files for all except server
if(INDI_BUILD_DRIVERS OR INDI_BUILD_CLIENT OR INDI_BUILD_QT5_CLIENT)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/libs/json.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/httplib.h
${CMAKE_CURRENT_SOURCE_DIR}/libs/inicpp.h
${CMAKE_CURRENT_BINARY_DIR}/indiversion.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel
)
if(NOT SYSTEM_HTTPLIB)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/libs/httplib/httplib.h
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel
)
endif(NOT SYSTEM_HTTPLIB)
if(NOT SYSTEM_JSONLIB)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/libs/indijson.hpp
DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel
)
endif(NOT SYSTEM_JSONLIB)
endif(INDI_BUILD_DRIVERS OR INDI_BUILD_CLIENT OR INDI_BUILD_QT5_CLIENT)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
Expand Down
26 changes: 26 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
+ From 2.0.4 to 2.0.5

4729c8b1e 2023-11-25 Jasem Mutlaq Another attempt at fixing MINGW32. Needs to test with CYGWIN
a223fb69c 2023-11-25 Jasem Mutlaq Fix on MINGW
ddf44bde7 2023-11-25 Jasem Mutlaq Use _WIN32 as the standard preprocessor macro for Windows builds
b24472523 2023-11-09 Orestes Sanchez Snapcap driver with network connections (#1961)
d045d17f3 2023-11-08 Jasem Mutlaq Fix issue with reporting updated measurements due to creep in from cumulative threshold
d7c3b1b93 2023-11-02 James Amendolagine Added several missing commands: (#1957)
16fef45f2 2023-10-28 Jasem Mutlaq Escape backslashes in custom FITS values. Do not add TELESCOP keyword if already exists in custom headers
1a85d8117 2023-10-27 Alain On step work (#1958)
58ae68b81 2023-10-23 Alain Fixed 9 Stars Align (#1956)
408b89251 2023-10-19 James Amendolagine Handling tracking mode in the pegasus driver, and enable King mode. (#1954)
b01e72046 2023-10-11 Sonny Cavazos Update ioptronv3driver.cpp (#1952)
d670b6acf 2023-10-10 Ladislav Heller Windows/Cygwin support (#1950)
63757a06e 2023-10-10 Jasem Mutlaq Remove old package name. Fixes #1949
7f9f9645f 2023-10-10 Jasem Mutlaq Fix issue with temperature update. Fixes #1951
bff9ddf06 2023-10-04 Jasem Mutlaq Do not turn cooler on if target temperature is higher than current
7eb84626f 2023-10-09 Jasem Mutlaq Set park type per dome type
b38785840 2023-10-06 Mattia Verga Option to use system provided httplib (#1946)
ef37011d0 2023-10-06 Paweł Soja Fix PyIndi build fail - revert code formatting changes (#1948)
ac22c6c11 2023-10-05 Jasem Mutlaq Add option to toggle between dome and rolloff types
769623ac3 2023-10-02 Jasem Mutlaq Add one more check to ensure minimum count is met (#1903)
f5ad7924f 2023-10-02 Jasem Mutlaq Remove all scope configuration from INDI::Telescope class as it was already moved to INDI::CCD class in prior releases and what is left in INDI::Tel..
6f156b476 2023-10-01 Jasem Mutlaq Only start if period is not zero
f81ced61d 2023-09-30 d33psky Fix issue 1938 (#1945)

+ From 2.0.3 to 2.0.4

be521c4f3 2023-09-30 anjok Openastrotech (#1943)
Expand Down
74 changes: 74 additions & 0 deletions README.Cygwin
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Build and install INDI on Windows/Cygwin platform
=================================================

Install Cygwin and the required packages
------------------------------------
Download Cygwin setup executable from [cygwin.com](https://cygwin.com/setup-x86_64.exe). It provides a GUI wizard to support the installation but probably it is faster to install it via the command line to a predefined location and a preselected list of required packages:

> setup-x86_64.exe -q -v -R "C:\cygwin" -O -s "https://cygwin.mirror.constant.com/" -l "%Temp%\CygwinPackages" -P aalib-devel -P autoconf -P automake -P cmake -P curl -P gcc-g++ -P gettext -P gettext-devel -P git -P help2man -P libboost-devel -P libcfitsio-devel -P libcurl-devel -P libev-devel -P libexif-devel -P libffi-devel -P libfftw3-devel -P libftdi1-devel -P libgd-devel -P libgsl-devel -P libiconv -P libiconv-devel -P libintl-devel -P libjpeg-devel -P libkrb5-devel -P liblapack-devel -P libpng-devel -P libpng16-devel -P libpopt-devel -P libraw-devel -P libtheora-devel -P libtiff-devel -P libtool -P libusb-devel -P libusb0 -P libusb-win32 -P libxml2-devel -P m4 -P make -P mc -P procps-ng -P texi2html -P texinfo -P wget -P zlib-devel

The above command line installs the Cygwin environment and required packages silently to the _C:\cygwin_ folder while downloading packages from the preselected mirror _https://cygwin.mirror.constant.com/_ to the current user's _TEMP_ folder.

Note:
The latest versions of Cygwin installers support only 64-bit versions of Windows 7 and newer!

Once Cygwin is installed, a shortcut icon to _Cygwin Terminal_ is created on the user's Desktop. It is recommended to run Cygwin Terminal with elevated privileges (by right-clicking and _Run as Administrator_).

Build and install libnova
-------------------------
Since the [libnova](https://gitlab.com/libnova/libnova) is not prebuilt for Cygwin, but required for INDI, we have to build it manually:

> git clone https://gitlab.com/libnova/libnova.git

> cd ./libnova

> ./autogen.sh

> ./configure --prefix=/usr

> make

> make install

Once built & installed, INDI should find its headers and library.

Build and install INDI
----------------------

This is similar to what happens in Linux environments:


> git clone https://github.com/indilib/indi.git

> cd ./indi

> mkdir _build && cd _build

> export CXXFLAGS="-std=c++17 -I/usr/lib/gcc/x86_64-pc-cygwin/11/include/c++"

> cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..

> make -j 4

> make install

Build and install indiweb manager
----------------------------------
Indiweb Manager is a python web application that requires the _psutil_ python package. In cygwin environment, we have to manually build this requirement package:

> git clone -b cygwin/v3 https://github.com/embray/psutil.git

> cd ./psutil

> pip3 install -e .

Once _psutil_ is installed we can easily install indiweb:

> pip3 install indiweb

Finally, run it:
> indi-web -v

Test using clients like KSTARS
------------------------------
Once INDI & indiweb manager are installed, all the simulator devices should work out-of-the-box using KSTARS/EKOS.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ sudo apt-get install -y \
libusb-dev \
zlib1g-dev \
libftdi-dev \
libgsl0-dev \
libjpeg-dev \
libkrb5-dev \
libnova-dev \
Expand Down Expand Up @@ -257,7 +256,7 @@ You can base a new driver from an existing driver. Look in either the examples o

# Unit tests

In order to run the unit test suite you must first install the [Google Test Framework](https://github.com/google/googletest). You will need to build and install this from source code as Google does not recommend package managers for distributing distros.(This is because each build system is often unique and a one size fits all aproach does not work well).
In order to run the unit test suite you must first install the [Google Test Framework](https://github.com/google/googletest). You will need to build and install this from source code as Google does not recommend package managers for distributing distros.(This is because each build system is often unique and a one size fits all approach does not work well).

Once you have the Google Test Framework installed follow this alternative build sequence:-

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
libindi (2.0.5) focal; urgency=medium

* Minor release.

-- Jasem Mutlaq <[email protected]> Fri, 1 Dec 2023 10:00:00 +0300

libindi (2.0.4) focal; urgency=medium

* Minor release.
Expand Down
Loading

0 comments on commit 1e382fd

Please sign in to comment.