Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,47 @@ jobs:
working-directory: build
run: ctest --output-on-failure

# CI on Linux (Qt6)
ci-linux-qt6-nogui:
name: "Linux (amd64; qt6; no GUI)"
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.actor, 'transifex')"

steps:
- name: Install dependencies
run: |
sudo apt remove php* -y
sudo apt update
# using force-overwrite due to
# https://github.com/actions/virtual-environments/issues/2703
#sudo ACCEPT_EULA=Y apt upgrade -o Dpkg::Options::="--force-overwrite" --yes
sudo apt install -y qt6-base-private-dev qt6-multimedia-dev qt6-positioning-dev qt6-tools-dev qt6-tools-dev-tools qt6-base-dev-tools qt6-qpa-plugins \
qt6-image-formats-plugins qt6-l10n-tools qt6-webengine-dev qt6-webengine-dev-tools libqt6charts6-dev libqt6charts6 libqt6opengl6-dev \
libqt6positioning6-plugins libqt6serialport6-dev qt6-base-dev libqt6webenginecore6-bin libqt6webengine6-data libexiv2-dev libnlopt-cxx-dev \
zlib1g-dev libgl1-mesa-dev libdrm-dev libglx-dev libxkbcommon-x11-dev libgps-dev libmd4c-dev libmd4c-html0-dev qt6-svg-dev libqt6svgwidgets6 \
libqt6texttospeech6 qt6-speech-dev qt6-speech-speechd-plugin qt6-speech-flite-plugin \
flite speech-dispatcher speech-dispatcher-flite speech-dispatcher-espeak-ng

- name: Checkout repository
uses: actions/checkout@v5

- name: Configure CMake
shell: bash
run: |
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTELLARIUM_RELEASE_BUILD=Off -DENABLE_TESTING=On -DSTELLARIUM_GUI_MODE=None "${{ github.workspace }}"

- name: Compile
working-directory: build
run: make -j ${{env.parallel_processes}}

- name: Run unit tests
uses: coactions/setup-xvfb@v1
with:
working-directory: build
run: ctest --output-on-failure

# CI on macOS (Qt6)
ci-macos-silicon-qt6:
name: "macOS (arm64; qt6)"
Expand Down
10 changes: 10 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,16 @@ the default target - in our case, building Stellarium, its tests, the localizati
| package | Create a binary packages for distributions on linux/UNIX
| installer | Create a binary packages for distributions on Windows


### GUI-less Stellarium

If you run Stellarium in an environment that should never show a GUI dialog or information text output panel to an auditorium, you can build a version without interface.
This is not intended to be controlled directly then, but by means of the RemoteControl Web interface, or just by scripting.
Note that even information text output requires the User Interface, but the information about the selected object will be displayed in the web interface.
To build this lightweight version that also lacks a few GUI-heavy plugins, call any cmake run with the argument `STELLARIUM_GUI_MODE="None"`.

This is also starting point for experimenting with alternative GUI solutions.

Thanks!

\- *The Stellarium development team*
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ ADD_PLUGIN(EquationOfTime 1)
ADD_PLUGIN(MeteorShowers 1)
ADD_PLUGIN(MosaicCamera 1)
ADD_PLUGIN(NavStars 1)
ADD_PLUGIN(NebulaTextures 1)
ADD_PLUGIN(Novae 1)
ADD_PLUGIN(Observability 1)
ADD_PLUGIN(Oculars 1)
Expand All @@ -583,14 +582,19 @@ ENDIF()
ADD_PLUGIN(RemoteSync 1)
ADD_PLUGIN(Satellites 1)
ADD_PLUGIN(Scenery3d 1)
ADD_PLUGIN(SkyCultureMaker 1)
ADD_PLUGIN(SolarSystemEditor 1)
ADD_PLUGIN(Supernovae 1)
ADD_PLUGIN(LensDistortionEstimator 1)
# Candidate to removing as an archaic plugin
ADD_PLUGIN(TextUserInterface 1)
ADD_PLUGIN(TelescopeControl 1)
ADD_PLUGIN(TimeNavigator 1)
# These plugins are GUI heavy and just make no sense without:
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
ADD_PLUGIN(LensDistortionEstimator 1)
ADD_PLUGIN(NebulaTextures 1)
ADD_PLUGIN(SkyCultureMaker 1)
ADD_PLUGIN(SolarSystemEditor 1)
ADD_PLUGIN(TimeNavigator 1)
ENDIF()

ADD_PLUGIN(Vts 0)

########## Static plugins need to define includes and libraries
Expand Down
15 changes: 14 additions & 1 deletion plugins/AngleMeasure/src/AngleMeasure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ AngleMeasure::AngleMeasure()
, flagShowHorizontalStartSkylinked(false)
, flagShowHorizontalEndSkylinked(false)
, angleHorizontal(0.)
#ifndef NO_GUI
, toolbarButton(Q_NULLPTR)
#endif
{
startPoint.set(0.,0.,0.);
endPoint.set(0.,0.,0.);
Expand All @@ -98,7 +100,9 @@ AngleMeasure::AngleMeasure()

setObjectName("AngleMeasure");

#ifndef NO_GUI
configDialog = new AngleMeasureDialog();
#endif
conf = StelApp::getInstance().getSettings();

messageTimer = new QTimer(this);
Expand All @@ -110,14 +114,20 @@ AngleMeasure::AngleMeasure()

AngleMeasure::~AngleMeasure()
{
#ifndef NO_GUI
delete configDialog;
#endif
}

bool AngleMeasure::configureGui(bool show)
{
#ifdef NO_GUI
return false;
#else
if (show)
configDialog->setVisible(true);
return true;
#endif
}

//! Determine which "layer" the plugin's drawing will happen on.
Expand All @@ -141,13 +151,15 @@ void AngleMeasure::init()

// Create action for enable/disable & hook up signals
addAction("actionShow_Angle_Measure", N_("Angle Measure"), N_("Angle measure"), "enabled", "Ctrl+A");
#ifndef NO_GUI
addAction("actionShow_Angle_Measure_dialog", N_("Angle Measure"), N_("Angle measure settings"), configDialog, "visible" ); // no default hotkey

#endif
// Initialize the message strings and make sure they are translated when
// the language changes.
updateMessageText();
connect(&app, SIGNAL(languageChanged()), this, SLOT(updateMessageText()));

#ifndef NO_GUI
// Add a toolbar button
try
{
Expand All @@ -168,6 +180,7 @@ void AngleMeasure::init()
{
qWarning() << "Unable create toolbar button for AngleMeasure plugin: " << e.what();
}
#endif
}

// handle time updates
Expand Down
6 changes: 3 additions & 3 deletions plugins/AngleMeasure/src/AngleMeasure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ private slots:
Vec3d perp2EndPointHor;
double angleHorizontal;

#ifndef NO_GUI
AngleMeasureDialog* configDialog;
StelButton* toolbarButton;
#endif

void calculateEnds();
void calculateEndsOneLine(const Vec3d &start, const Vec3d &end, Vec3d &perp1Start, Vec3d &perp1End, Vec3d &perp2Start, Vec3d &perp2End, double &angleEquatorial);
Expand All @@ -219,9 +222,6 @@ private slots:
void drawOne(StelCore *core, const StelCore::FrameType frameType, const StelCore::RefractionMode refractionMode, const Vec3f txtColor, const Vec3f lineColor);

QSettings* conf;

// GUI
AngleMeasureDialog* configDialog;
};

#include <QObject>
Expand Down
12 changes: 10 additions & 2 deletions plugins/AngleMeasure/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,29 @@ LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
SET(AngleMeasure_SRCS
AngleMeasure.hpp
AngleMeasure.cpp
)
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
LIST(APPEND AngleMeasure_SRCS
gui/AngleMeasureDialog.hpp
gui/AngleMeasureDialog.cpp
)

SET(AngleMeasure_UIS
gui/angleMeasureDialog.ui
)
ENDIF (STELLARIUM_GUI_MODE STREQUAL "Standard")

################# compiles resources files ############
SET(AngleMeasure_RES ../AngleMeasure.qrc)
IF (${QT_VERSION_MAJOR} EQUAL "5")
QT5_WRAP_UI(AngleMeasure_UIS_H ${AngleMeasure_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT5_WRAP_UI(AngleMeasure_UIS_H ${AngleMeasure_UIS})
ENDIF()
QT5_ADD_RESOURCES(AngleMeasure_RES_CXX ${AngleMeasure_RES})
ELSE()
QT_WRAP_UI(AngleMeasure_UIS_H ${AngleMeasure_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT_WRAP_UI(AngleMeasure_UIS_H ${AngleMeasure_UIS})
ENDIF()
QT_ADD_RESOURCES(AngleMeasure_RES_CXX ${AngleMeasure_RES})
ENDIF()

Expand Down
13 changes: 12 additions & 1 deletion plugins/ArchaeoLines/src/ArchaeoLines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ ArchaeoLines::ArchaeoLines()
, flagShowCustomDeclination1(false)
, flagShowCustomDeclination2(false)
, lastJDE(0.0)
#ifndef NO_GUI
, toolbarButton(Q_NULLPTR)
#endif
{
setObjectName("ArchaeoLines");
core=StelApp::getInstance().getCore();
Expand Down Expand Up @@ -140,7 +142,9 @@ ArchaeoLines::ArchaeoLines()
customDeclination1Line = new ArchaeoLine(ArchaeoLine::CustomDeclination1, 0.0);
customDeclination2Line = new ArchaeoLine(ArchaeoLine::CustomDeclination2, 0.0);

#ifndef NO_GUI
configDialog = new ArchaeoLinesDialog();
#endif
conf = StelApp::getInstance().getSettings();

connect(core, SIGNAL(locationChanged(StelLocation)), this, SLOT(updateObserverLocation(StelLocation)));
Expand Down Expand Up @@ -180,14 +184,20 @@ ArchaeoLines::~ArchaeoLines()
delete customDeclination1Line; customDeclination1Line=Q_NULLPTR;
delete customDeclination2Line; customDeclination2Line=Q_NULLPTR;

#ifndef NO_GUI
delete configDialog; configDialog=Q_NULLPTR;
#endif
}

bool ArchaeoLines::configureGui(bool show)
{
#ifdef NO_GUI
return false;
#else
if (show)
configDialog->setVisible(true);
return true;
#endif
}

//! Determine which "layer" the plugin's drawing will happen on.
Expand Down Expand Up @@ -269,8 +279,8 @@ void ArchaeoLines::init()
// Create action for enable/disable & hook up signals
QString section=N_("ArchaeoLines");
addAction("actionShow_ArchaeoLines", section, N_("ArchaeoLines"), "enabled", "Ctrl+U");
#ifndef NO_GUI
addAction("actionShow_ArchaeoLines_dialog", section, N_("Show settings dialog"), configDialog, "visible", "Ctrl+Shift+U");

// Add a toolbar button
StelApp& app=StelApp::getInstance();
try
Expand All @@ -292,6 +302,7 @@ void ArchaeoLines::init()
{
qWarning() << "Unable to create toolbar button for ArchaeoLines plugin: " << e.what();
}
#endif
addAction("actionAL_showEquinoxLine", section, N_("Show Line for Equinox"), "flagShowEquinox" ); // No Shortcuts configured.
addAction("actionAL_showSolsticeLines", section, N_("Show Line for Solstices"), "flagShowSolstices" ); // No Shortcuts configured.
addAction("actionAL_showCrossquarterLines", section, N_("Show Line for Crossquarter"), "flagShowCrossquarters" ); // No Shortcuts configured.
Expand Down
10 changes: 5 additions & 5 deletions plugins/ArchaeoLines/src/ArchaeoLines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,15 +568,15 @@ private slots:
ArchaeoLine * customAltitude2Line;
ArchaeoLine * customDeclination1Line;
ArchaeoLine * customDeclination2Line;

StelButton* toolbarButton;

QSettings* conf;

// GUI
ArchaeoLinesDialog* configDialog;
StelCore* core; // used quite often, better keep a reference...
StelObjectMgr* objMgr;

#ifndef NO_GUI
ArchaeoLinesDialog* configDialog;
StelButton* toolbarButton;
#endif
};


Expand Down
12 changes: 10 additions & 2 deletions plugins/ArchaeoLines/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
SET(ArchaeoLines_SRCS
ArchaeoLines.hpp
ArchaeoLines.cpp
)
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
LIST(APPEND ArchaeoLines_SRCS
gui/ArchaeoLinesDialog.hpp
gui/ArchaeoLinesDialog.cpp
gui/ArchaeoLinesDialogLocations.hpp
Expand All @@ -14,14 +17,19 @@ SET(ArchaeoLines_UIS
gui/archaeoLinesDialog.ui
gui/archaeoLinesDialogLocations.ui
)
ENDIF (STELLARIUM_GUI_MODE STREQUAL "Standard")

################# compiles resources files ############
SET(ArchaeoLines_RES ../ArchaeoLines.qrc)
IF (${QT_VERSION_MAJOR} EQUAL "5")
QT5_WRAP_UI(ArchaeoLines_UIS_H ${ArchaeoLines_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT5_WRAP_UI(ArchaeoLines_UIS_H ${ArchaeoLines_UIS})
ENDIF()
QT5_ADD_RESOURCES(ArchaeoLines_RES_CXX ${ArchaeoLines_RES})
ELSE()
QT_WRAP_UI(ArchaeoLines_UIS_H ${ArchaeoLines_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT_WRAP_UI(ArchaeoLines_UIS_H ${ArchaeoLines_UIS})
ENDIF()
QT_ADD_RESOURCES(ArchaeoLines_RES_CXX ${ArchaeoLines_RES})
ENDIF()

Expand Down
4 changes: 4 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ IF(WIN32 AND NOT MSVC)
STRING(APPEND CMAKE_EXE_LINKER_FLAGS " -Wl,--enable-runtime-pseudo-reloc")
ENDIF()

IF (STELLARIUM_GUI_MODE STREQUAL "None")
ADD_DEFINITIONS(-DNO_GUI)
ENDIF()

ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_DLL)
ADD_DEFINITIONS(-D_REENTRANT)
Expand Down
20 changes: 14 additions & 6 deletions plugins/Calendars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src)
SET(Calendars_SRCS
Calendars.hpp
Calendars.cpp
gui/CalendarsDialog.hpp
gui/CalendarsDialog.cpp
gui/CalendarsInfoPanel.hpp
gui/CalendarsInfoPanel.cpp
Calendar.hpp
Calendar.cpp
EgyptianCalendar.hpp
Expand Down Expand Up @@ -85,19 +81,31 @@ SET(Calendars_SRCS
KoreanCalendar.cpp
VietnameseCalendar.hpp
VietnameseCalendar.cpp
gui/CalendarsInfoPanel.hpp
gui/CalendarsInfoPanel.cpp
)
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
LIST(APPEND Calendars_SRCS
gui/CalendarsDialog.hpp
gui/CalendarsDialog.cpp
)

SET(Calendars_UIS
gui/calendarsDialog.ui
)
ENDIF (STELLARIUM_GUI_MODE STREQUAL "Standard")

################# compiles resources files ############
SET(Calendars_RES ../resources/Calendars.qrc)
IF (${QT_VERSION_MAJOR} EQUAL "5")
QT5_WRAP_UI(Calendars_UIS_H ${Calendars_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT5_WRAP_UI(Calendars_UIS_H ${Calendars_UIS})
ENDIF()
QT5_ADD_RESOURCES(Calendars_RES_CXX ${Calendars_RES})
ELSE()
QT_WRAP_UI(Calendars_UIS_H ${Calendars_UIS})
IF (STELLARIUM_GUI_MODE STREQUAL "Standard")
QT_WRAP_UI(Calendars_UIS_H ${Calendars_UIS})
ENDIF()
QT_ADD_RESOURCES(Calendars_RES_CXX ${Calendars_RES})
ENDIF()

Expand Down
Loading
Loading