Skip to content

Commit

Permalink
Merge branch 'master' into stagecolors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 29, 2024
2 parents e490a6a + 370437d commit 6cc7209
Show file tree
Hide file tree
Showing 117 changed files with 6,631 additions and 1,652 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,37 @@ jobs:
- name: Configure for QT5 build
if: ${{ matrix.task == 'compile-qt5' }}
run: |
${QMAKE} QMAKE_CXX="${CXX}" QMAKE_CC="${CC}" QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" CONFIG+=appimage FORCECONFIG=release
# force a release build
sed -i -e 's/Debug/Release/g' CMakeLists.txt
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="$QTDIR/lib/cmake/" -Dappimage=ON -DINSTALL_ROOT=${INSTALL_ROOT} ..
- name: Configure for QT5QML build
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
$QMAKE QMAKE_CXX="$CXX" QMAKE_CC="$CC" QMAKE_LINK="$CXX" QMAKE_LINK_SHLIB="$CXX" CONFIG+=appimage CONFIG+=qmlui FORCECONFIG=release
# force a release build
sed -i -e 's/Debug/Release/g' CMakeLists.txt
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH="$QTDIR/lib/cmake/" -Dqmlui=ON -Dappimage=ON -DINSTALL_ROOT=${INSTALL_ROOT} ..
- name: Configure for QT5 coverage build
if: ${{ matrix.task == 'coverage-qt5' }}
run: |
$QMAKE QMAKE_CXX="$CXX" QMAKE_CC="$CC" QMAKE_LINK="$CXX" QMAKE_LINK_SHLIB="$CXX" CONFIG+=coverage
#QMAKE_CXXFLAGS+="-fno-sized-deallocation"
- name: Build
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: cd build && make -j $NPROC

- name: Build Coverage
if: ${{ startsWith( matrix.task, 'coverage') }}
run: make -j $NPROC

- name: Test
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: make check
run: cd build && make check

- name: Test with Coverage
if: ${{ startsWith( matrix.task, 'coverage') }}
Expand All @@ -185,9 +197,10 @@ jobs:
- name: Install
if: ${{ ! startsWith( matrix.task, 'coverage') }}
run: |
cd build
make INSTALL_ROOT=${INSTALL_ROOT} install
cp -v resources/icons/svg/qlcplus.svg ${INSTALL_ROOT}
cp -v platforms/linux/qlcplus.desktop ${INSTALL_ROOT}
cp -v ../resources/icons/svg/qlcplus.svg ${INSTALL_ROOT}
cp -v ../platforms/linux/qlcplus.desktop ${INSTALL_ROOT}
- name: Adapt qlcplus for AppImage (qt5)
if: ${{ matrix.task == 'compile-qt5' }}
Expand Down Expand Up @@ -258,7 +271,7 @@ jobs:
strategy:
fail-fast: false
matrix:
task: [compile-qt5, compile-qt5-32bit, compile-qt5qml]
task: [compile-qt5, compile-qt5qml]
env:
CI_REPO_SLUG: ${{ github.repository }}
CI_BRANCH: ${{ github.head_ref }}
Expand Down Expand Up @@ -492,7 +505,7 @@ jobs:
path: ${{matrix.task}}-${{env.OUTFILE}}

build-macos:
runs-on: macos-12
runs-on: macos-13
name: QLCplus macOS ${{matrix.task}}
strategy:
fail-fast: false
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,12 @@ INCLUDE(CPack)

# Leave this on the last row of this file
add_subdirectory(platforms)

# HELPER: PRINT ALL VARIABLES KNOWN BY CMAKE

#message("QTDIR: ${QT_DIR}")
#get_cmake_property(_variableNames VARIABLES)
#list (SORT _variableNames)
#foreach (_variableName ${_variableNames})
# message(STATUS "${_variableName}=${${_variableName}}")
#endforeach()
50 changes: 30 additions & 20 deletions create-appimage-cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
set -e

TARGET_DIR=$HOME/qlcplus.AppDir
CMAKE_OPTS=""

# Compile translations
./translate.sh "qmlui"
if [ "$1" == "qmlui" ]; then
./translate.sh "qmlui"
CMAKE_OPTS="-Dqmlui=ON"
else
./translate.sh "ui"
fi

# Build
if [ -d build ]; then
Expand All @@ -22,9 +27,9 @@ mkdir build
cd build

if [ -n "$QTDIR" ]; then
cmake -DCMAKE_PREFIX_PATH="$QTDIR/lib/cmake/" -Dqmlui=ON -Dappimage=ON -DINSTALL_ROOT=$TARGET_DIR ..
cmake -DCMAKE_PREFIX_PATH="$QTDIR/lib/cmake/" $CMAKE_OPTS -Dappimage=ON -DINSTALL_ROOT=$TARGET_DIR ..
else
cmake -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/cmake/Qt5" -Dqmlui=ON -Dappimage=ON -DINSTALL_ROOT=$TARGET_DIR ..
cmake -DCMAKE_PREFIX_PATH="/usr/lib/x86_64-linux-gnu/cmake/Qt5" $CMAKE_OPTS -Dappimage=ON -DINSTALL_ROOT=$TARGET_DIR ..
fi

NUM_CPUS=$(nproc) || true
Expand All @@ -40,30 +45,35 @@ if [ ! -d "$TARGET_DIR" ]; then
fi
make install

strip $TARGET_DIR/usr/bin/qlcplus-qml
# see variables.pri, where to find the LIBSDIR
find $TARGET_DIR/usr/lib/ -name 'libqlcplusengine.so*' -exec strip -v {} \;

# FIXME: no rpath or runpath tag found.
chrpath -r "../lib" $TARGET_DIR/usr/bin/qlcplus-qml || true
if [ "$1" == "qmlui" ]; then
strip $TARGET_DIR/usr/bin/qlcplus-qml
# FIXME: no rpath or runpath tag found.
chrpath -r "../lib" $TARGET_DIR/usr/bin/qlcplus-qml || true

pushd $TARGET_DIR/usr/bin
find . -name plugins.qmltypes -type f -delete
find . -name *.qmlc -type f -delete
rm -rf QtQuick/Extras QtQuick/Particles.2 QtQuick/XmlListModel
rm -rf QtQuick/Controls.2/designer QtQuick/Controls.2/Material
rm -rf QtQuick/Controls.2/Universal QtQuick/Controls.2/Fusion
rm -rf QtQuick/Controls.2/Imagine QtQuick/Controls.2/Scene2D
popd
sed -i -e 's/Exec=qlcplus --open %f/Exec=qlcplus-qml/g' $TARGET_DIR/qlcplus.desktop
else
strip $TARGET_DIR/usr/bin/qlcplus
chrpath -r "../lib" $TARGET_DIR/usr/bin/qlcplus || true
sed -i -e 's/Exec=qlcplus --open %f/Exec=qlcplus/g' $TARGET_DIR/qlcplus.desktop
fi

pushd $TARGET_DIR/usr/bin
find . -name plugins.qmltypes -type f -delete
find . -name *.qmlc -type f -delete
rm -rf QtQuick/Extras QtQuick/Particles.2 QtQuick/XmlListModel
rm -rf QtQuick/Controls.2/designer QtQuick/Controls.2/Material
rm -rf QtQuick/Controls.2/Universal QtQuick/Controls.2/Fusion
rm -rf QtQuick/Controls.2/Imagine QtQuick/Controls.2/Scene2D
popd
cp -v ../resources/icons/svg/qlcplus.svg $TARGET_DIR
cp -v ../platforms/linux/qlcplus.desktop $TARGET_DIR

# There might be a new version of the tool available.
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 -O $TARGET_DIR/AppRun
chmod a+x $TARGET_DIR/AppRun

cp -v ../resources/icons/svg/qlcplus.svg $TARGET_DIR
cp -v ../platforms/linux/qlcplus.desktop $TARGET_DIR
sed -i -e 's/Exec=qlcplus --open %f/Exec=qlcplus-qml/g' $TARGET_DIR/qlcplus.desktop

# There might be a new version of the tool available.
wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /tmp/appimagetool-x86_64.AppImage
chmod a+x /tmp/appimagetool-x86_64.AppImage
Expand Down
30 changes: 25 additions & 5 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,37 @@ qlcplus (4.13.2) stable; urgency=low

* engine: fix flashing fade out
* engine: add stopOnExit, waitFunctionStart and waitFunctionStop commands to Script - see documentation (thanks to ldebs)
* UI: adjust audio volume on video intensity change
* UI/Fixture Manager: limit the number of RGB panel columns for RGBW to avoid crash
* UI/Show Manager: show step notes on the timeline (thanks to anarchid)
* UI/Show Manager: handle CTRL+mouse wheel to zoom in/out
* Virtual Console/Slider: send feedback on override button press
* Virtual Console/Sped Dial: fix foreground color setting on Windows
* Plugins/OS2L: fix receiving multiple messages at once
* Web Access: reworked websocket implementation
* Web Access: fix grand master stopping running functions
* Web Access: fix simple desk not resetting the current universe
* Web Access: add widget ID to getWidgetType and getWidgetStatus response
* RGB scripts: added 'Sine Wave' script
* RGB scripts: fix Vertical Fall not allowing changing color when cloned
* New fixtures: GLP Impression X5, Ayrton Rivale Profile (thanks to Masatoshi Fujino)
* New fixtures: GLP Impression X5, Ayrton Rivale Profile, Ayrton Kyalami (thanks to Masatoshi Fujino)
* New fixture: Eurolite LED Mini Strobe Cluster SMD 48 (thanks to Oliver)
* New fixture: Ayra Compar Kit 3 (thanks to Robert)
* New fixtures: Acme Pixel Line IP, Ayrton Domino LT (thanks to Yestalgia)
* New fixture: GLP JDC1 (thanks to Flo Edelmann)
* New fixture: Shehds 2 Eyes 200W LED COB Cool Warm White (thanks to Devsider)

-- Massimo Callegari <[email protected]> Sun, 24 Nov 2024 18:19:20 +0200
* New fixture: Ayra ERO Micro Beam FX (thanks to Gianni)
* New fixture: Shehds LED Wall Wash 18x18W RGBWA+UV (thanks to Fede79)
* New fixture: Shehds LED Beam 12x12W RGBW (thanks to Lukas Hanisch)
* New fixture: Chauvet EVE P-160 RGBW (thanks to Max Wheatley)
* New fixture: Stairville Wild Wash 132 LED CW (thanks to e-shock)
* New fixture: Showtec Luna Par 120 Q4, Showtec Phantom 180 Wash, Stairville Infinite Pixel 250
* New fixture: Ghost Lumy (thanks to Manu)
* New fixture: Shehds LED 200W RGB FLASH, GalaxyJet LED Beam 300W Beam&Spot&Wash, Constellaser 12W Waterproof Scan Laser (thanks to Tóth János)
* New fixture: Chauvet Ovation H-605FC (thanks to Ken Coughlin)
* New fixture: Martin smartMAC (thanks to Mads Vejrup)

-- Massimo Callegari <[email protected]> Sun, 29 Dec 2024 18:19:20 +0200

qlcplus (4.13.1) stable; urgency=low

Expand All @@ -34,17 +51,20 @@ qlcplus (4.13.1) stable; urgency=low
* New fixtures: beamZ BAC500 and BAC506 (thanks to Olivier Michel)
* New fixtures: American DJ Par Z4, beamZ SB400, OXO ColorBeam 7 FCW IR, Pro-Lights Pixie Spot (thanks to Dmitry Kolesnikov)
* New fixtures: BoomToneDJ LED PAR 7X10W 5in1, BoomToneDJ Maxi Spot 60, Mac Mah FLAT PAR 7x12W 6in1, Eurolite LED PIX-16 QCL Bar (thanks to Cédric Monféfoul)
* New fixture: Showtec ACT PC 60 RGBW (thanks to Michel Sliepenbeek)
* New fixtures: Showtec ACT PC 60 RGBW, Ibiza Star Beam (thanks to Michel Sliepenbeek)
* New fixtures: Robe LEDBeam 350, Robe LEDBeam 350 RGBA, Briteq COB Blinder 2x100W, Ayrton MiniPanel FX (thanks to Giacomo Gorini)
* New fixture: Elation ELED B48 (thanks to Xoneoo)
* New fixture: beamZ PS10W (thanks to Jesper Korsen)
* New fixtures: Ayra ComPar 10 and ERO 406 (thanks to René Knuvers)
* New fixtures: Mac Mah Moving-FX Bar, Varytec LED Pad Bar Compact ST RGB, Laserworld EL-400RGB MK2 (thanks to Clément Delabroye)
* New fixtures: Electroconcept Club Scan 30, Club Scan 120, LED Blinder, Profile 120 Spot LED, Micro Spot 60 LED (thanks to Clément Delabroye)
* New fixture: Ayrton Mistral (thanks to Masatoshi Fujino)
* New fixture: Chauvet COLORtube 3.0 EQ Controller (thanks to Fede79)
* New fixtures: Chauvet COLORtube 3.0 EQ Controller, Martin MAC 2000 Wash (thanks to Fede79)
* New fixture: Shehds Big Bee Eyes LED Wash 19x40W RGBW (thanks to István Király)
* New fixture: Fun-Generation Mr. Beam 120 W (thanks to Mariano)
* New fixture: UKing 36W PAR UV ZQ01087 (thanks to Lance Moore)
* New fixture: Showtec Club Par 12-4 RGBW (thanks to Simon Dovicovic)
* New fixture: Fun-Generation PicoWash 40Z Pixel Quad LED (thanks to Kristers)

-- Massimo Callegari <[email protected]> Thu, 30 May 2024 18:19:20 +0200

Expand Down
5 changes: 5 additions & 0 deletions engine/src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,11 @@ QList<Fixture*> const& Doc::fixtures() const
return m_fixturesListCache;
}

int Doc::fixturesCount() const
{
return m_fixtures.count();
}

Fixture* Doc::fixture(quint32 id) const
{
return m_fixtures.value(id, NULL);
Expand Down
7 changes: 7 additions & 0 deletions engine/src/doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,13 @@ class Doc : public QObject
*/
QList<Fixture*> const& fixtures() const;

/**
* Get the number of fixtures currently added to the project
*
* @return The number of fixtures
*/
int fixturesCount() const;

/**
* Get the fixture that occupies the given DMX address. If multiple fixtures
* occupy the same address, the one that has been last modified is returned.
Expand Down
6 changes: 3 additions & 3 deletions engine/src/fixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ QVector <quint32> Fixture::cmyChannels(int head) const
return m_fixtureMode->heads().at(head).cmyChannels();
}

QList<SceneValue> Fixture::positionToValues(int type, int degrees, bool isRelative)
QList<SceneValue> Fixture::positionToValues(int type, float degrees, bool isRelative)
{
QList<SceneValue> posList;
// cache a list of channels processed, to avoid duplicates
Expand Down Expand Up @@ -1041,7 +1041,7 @@ bool Fixture::loadXML(QXmlStreamReader &xmlDoc, Doc *doc,
{
modeName = xmlDoc.readElementText();
}
else if (xmlDoc.name() == KXMLQLCPhysicalDimensionsWeight)
else if (xmlDoc.name() == KXMLQLCPhysicalDimensionsWidth)
{
width = xmlDoc.readElementText().toUInt();
}
Expand Down Expand Up @@ -1260,7 +1260,7 @@ bool Fixture::saveXML(QXmlStreamWriter *doc) const
/* RGB Panel physical dimensions */
if (m_fixtureDef != NULL && m_fixtureDef->model() == KXMLFixtureRGBPanel && m_fixtureMode != NULL)
{
doc->writeTextElement(KXMLQLCPhysicalDimensionsWeight,
doc->writeTextElement(KXMLQLCPhysicalDimensionsWidth,
QString::number(m_fixtureMode->physical().width()));

doc->writeTextElement(KXMLQLCPhysicalDimensionsHeight,
Expand Down
2 changes: 1 addition & 1 deletion engine/src/fixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class Fixture : public QObject

/** Return a list of DMX values based on the given position degrees
* and the provided type (Pan or Tilt) */
QList<SceneValue> positionToValues(int type, int degrees, bool isRelative = false);
QList<SceneValue> positionToValues(int type, float degrees, bool isRelative = false);

/** Return a list of DMX values based on the given zoom degrees */
QList<SceneValue> zoomToValues(float degrees, bool isRelative);
Expand Down
9 changes: 7 additions & 2 deletions engine/src/genericfader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,20 @@ void GenericFader::write(Universe *universe)

//qDebug() << "[GenericFader] writing channels: " << this << m_channels.count();

// iterate through all the channels handled by this fader
QMutableHashIterator <quint32,FadeChannel> it(m_channels);
while (it.hasNext() == true)
{
FadeChannel& fc(it.next().value());
int flags = fc.flags();
int address = int(fc.addressInUniverse());
quint32 address = fc.addressInUniverse();
int channelCount = fc.channelCount();

// iterate through all the channels handled by this fader
if (address == QLCChannel::invalid())
{
qWarning() << "Invalid channel found";
continue;
}

if (flags & FadeChannel::SetTarget)
{
Expand Down
13 changes: 5 additions & 8 deletions engine/src/keypadparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ QList<SceneValue> KeyPadParser::parseCommand(Doc *doc, QString command,
QByteArray &uniData)
{
QList<SceneValue> values;
if (doc == NULL)
if (doc == NULL || command.isEmpty())
return values;

QStringList tokens = command.split(" ");
Expand Down Expand Up @@ -61,16 +61,12 @@ QList<SceneValue> KeyPadParser::parseCommand(Doc *doc, QString command,
}
else if (token == "FULL")
{
if (lastCommand == CommandAT)
toValue = 255;

toValue = 255;
lastCommand = CommandFULL;
}
else if (token == "ZERO")
{
if (lastCommand == CommandAT)
toValue = 0;

toValue = 0;
lastCommand = CommandZERO;
}
else if (token == "BY")
Expand All @@ -89,7 +85,6 @@ QList<SceneValue> KeyPadParser::parseCommand(Doc *doc, QString command,
{
lastCommand = CommandPlusPercent;
}

else if (token == "-%")
{
lastCommand = CommandMinusPercent;
Expand Down Expand Up @@ -119,6 +114,8 @@ QList<SceneValue> KeyPadParser::parseCommand(Doc *doc, QString command,

fromChannel = number;
toChannel = fromChannel;
fromValue = uchar(uniData.at(number - 1));
toValue = fromValue;
channelSet = true;
break;
case CommandAT:
Expand Down
8 changes: 5 additions & 3 deletions engine/src/mastertimer-win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
*/

// Let's assume we have at least W2K (http://msdn.microsoft.com/en-us/library/Aa383745)
#define _WIN32_WINNT 0x05000000
#define _WIN32_WINDOWS 0x05000000
#define WINVER 0x05000000
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x05000000
#define _WIN32_WINDOWS 0x05000000
#define WINVER 0x05000000
#endif

#include <QDebug>

Expand Down
9 changes: 2 additions & 7 deletions engine/src/mastertimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,8 @@ void MasterTimer::fadeAndStopAll(int timeout)

QList<Universe *> universes = doc->inputOutputMap()->claimUniverses();
foreach (Universe *universe, universes)
{
foreach (QSharedPointer<GenericFader> fader, universe->faders())
{
if (!fader.isNull() && fader->parentFunctionID() != Function::invalidId())
fader->setFadeOut(true, uint(timeout));
}
}
universe->setFaderFadeOut(timeout);

doc->inputOutputMap()->releaseUniverses();
}

Expand Down
Loading

0 comments on commit 6cc7209

Please sign in to comment.