Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
42 changes: 34 additions & 8 deletions .github/workflows/qt-linux.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,59 @@
# Build a Qt project on Ubuntu
name: Build on Ubuntu (old)
name: Build on Ubuntu

on:
push:
branches: [ develop ]
branches: [ dev ]
pull_request:
branches: [ develop ]
branches: [ dev ]

jobs:
build:
if: false # Disable for now

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
cache: true
version: '5.12.12'
host: 'linux'
target: 'desktop'
modules: 'gui core serialport network opengl xml'
install-deps: true
modules: 'qtwebengine'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
liblo-dev liblo-tools \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-bad \
gstreamer1.0-libav \
gstreamer1.0-vaapi \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-base-apps \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
gstreamer1.0-x \
gstreamer1.0-tools

- name: qmake
run: qmake .

- name: make
run: make
run: make -j$(nproc)

- name: make check
run: make check

- uses: actions/upload-artifact@v7
with:
name: linux-build
path: mapmap

# - name: make distcheck
# run: make distcheck
92 changes: 84 additions & 8 deletions .github/workflows/qt-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,106 @@ name: Build on macOS

on:
push:
branches: [ develop ]
branches: [ dev ]
pull_request:
branches: [ develop ]
branches: [ dev ]

jobs:
build:
if: false # Disable for now

if: false # ARM64 cannot build QT5 apps
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6

- name: Cache Homebrew
id: cache-brew
uses: actions/cache/restore@v5
with:
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar/pkg-config
/opt/homebrew/Cellar/gstreamer
/opt/homebrew/Cellar/gst-plugins-base
/opt/homebrew/Cellar/gst-plugins-good
/opt/homebrew/Cellar/gst-plugins-bad
/opt/homebrew/Cellar/gst-plugins-ugly
/opt/homebrew/Cellar/gst-libav
/opt/homebrew/Cellar/orc
key: brew-gstreamer-${{ runner.os }}-v1

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
cache: true
version: '5.12.12'
host: 'mac'
target: 'desktop'
modules: 'gui core serialport network opengl xml'
install-deps: true
modules: 'qtwebengine'

- name: Install dependencies
if: steps.cache-brew.outputs.cache-hit != 'true'
run: |
brew install pkg-config orc \
gstreamer \
gst-plugins-base \
gst-plugins-good \
gst-plugins-bad \
gst-plugins-ugly \
gst-libav

- name: Set environment
run: |
GST_PC=$(find /opt/homebrew/Cellar/gstreamer -name '*.pc' | head -1 | xargs dirname)
ORC_PC=$(find /opt/homebrew/Cellar/orc -name '*.pc' 2>/dev/null | head -1 | xargs dirname)
echo "PKG_CONFIG_PATH=${GST_PC}:${ORC_PC}:${PKG_CONFIG_PATH:-}" >> $GITHUB_ENV

- name: Fake GStreamer framework
run: |
GST_CELLAR=$(find /opt/homebrew/Cellar/gstreamer -maxdepth 1 -mindepth 1 -type d | head -1)
sudo mkdir -p "/Library/Frameworks/GStreamer.framework/Versions/1.0"
sudo ln -sf "${GST_CELLAR}/lib/libgstreamer-1.0.dylib" "/Library/Frameworks/GStreamer.framework/GStreamer"
sudo ln -sf "${GST_CELLAR}/lib/libgstreamer-1.0.dylib" "/Library/Frameworks/GStreamer.framework/Versions/1.0/GStreamer"
sudo mkdir -p "/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers"
sudo ln -sf "${GST_CELLAR}/include/gstreamer-1.0/gst" "/Library/Frameworks/GStreamer.framework/Versions/1.0/Headers/gst"

- name: qmake
run: qmake .
run: |
GST_FLAGS=$(pkg-config --cflags gstreamer-1.0 gstreamer-app-1.0 gstreamer-pbutils-1.0)
GST_LIBS=$(pkg-config --libs gstreamer-1.0 gstreamer-app-1.0 gstreamer-pbutils-1.0)
qmake . \
"QMAKE_CXXFLAGS+=${GST_FLAGS}" \
"QMAKE_LFLAGS+=${GST_LIBS}" \
"LIBS-=-F /Library/Frameworks/ -framework GStreamer" \
"LIBS-=-framework OpenGL -framework GLUT"

- name: make
run: make
run: make -j$(sysctl -n hw.logicalcpu)

- name: make check
run: make check

- uses: actions/upload-artifact@v4
with:
name: macos-build
path: MapMap

# - name: make distcheck
# run: make distcheck

- name: Always cache brew
if: always() && steps.cache-brew.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
key: ${{ steps.cache-brew.outputs.cache-primary-key }}
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar/pkg-config
/opt/homebrew/Cellar/gstreamer
/opt/homebrew/Cellar/gst-plugins-base
/opt/homebrew/Cellar/gst-plugins-good
/opt/homebrew/Cellar/gst-plugins-bad
/opt/homebrew/Cellar/gst-plugins-ugly
/opt/homebrew/Cellar/gst-libav
/opt/homebrew/Cellar/orc
65 changes: 54 additions & 11 deletions .github/workflows/qt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,75 @@ name: Build on Windows

on:
push:
branches: [ develop ]
branches: [ dev ]
pull_request:
branches: [ develop ]
branches: [ dev ]

jobs:
build:
if: false # Disable for now

runs-on: windows-2019
runs-on: windows-2022

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v4
with:
cache: true
version: '5.12.12'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2017_64'
modules: 'gui core serialport network opengl xml'
install-deps: true
modules: 'qtwebengine'

- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
sdk: 10.0.22621.0

- name: Cache GStreamer
id: cache-gstreamer
uses: actions/cache/restore@v5
with:
path: C:\Program Files\gstreamer
key: gstreamer-1.0-msvc-x86_64
- name: Install GStreamer
if: steps.cache-gstreamer.outputs.cache-hit != 'true'
run: choco install gstreamer gstreamer-devel -y
- name: Set GStreamer env
run: echo "GSTREAMER_1_0_ROOT_X86=C:\Program Files\gstreamer\1.0\msvc_x86_64" >> $env:GITHUB_ENV

- name: qmake
run: qmake .
run: qmake . -spec win32-msvc

- name: make
run: make
run: nmake

- name: make check
run: make check
run: nmake check

- name: Deploy Qt
run: windeployqt --release --no-system-d3d-compiler "MapMap\MapMap.exe"

- name: Copy GStreamer DLLs
run: |
Copy-Item "C:\Program Files\gstreamer\1.0\msvc_x86_64\bin\*.dll" -Destination "MapMap\" -Force
New-Item -ItemType Directory -Force -Path "MapMap\plugins"
Copy-Item "C:\Program Files\gstreamer\1.0\msvc_x86_64\lib\gstreamer-1.0\*.dll" -Destination "MapMap\plugins\" -Force

- uses: actions/upload-artifact@v7
with:
name: windows-build
path: MapMap/

# - name: make distcheck
# run: make distcheck

- name: Always cache gstreamer
if: always() && steps.cache-gstreamer.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
key: ${{ steps.cache-gstreamer.outputs.cache-primary-key }}
path: C:\Program Files\gstreamer
12 changes: 9 additions & 3 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name: Build on Ubuntu

on:
push:
branches: [ develop, master ]
branches: [ dev, master ]
pull_request:
branches: [ develop, master ]
branches: [ dev, master ]

jobs:
build:
if: false # does not need to be ran
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -52,3 +53,8 @@ jobs:

- name: Run tests
run: make check || true

- uses: actions/upload-artifact@v4
with:
name: linux-build
path: mapmap
9 changes: 9 additions & 0 deletions mapmap.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ VERSION = 0.6.3
TARGET = mapmap

DEFINES += UNICODE QT_THREAD_SUPPORT QT_CORE_LIB QT_GUI_LIB QT_MESSAGELOGCONTEXT
win32: DEFINES += NOMINMAX WIN32_LEAN_AND_MEAN QOSC_LIBRARY

include(src/core/core.pri)
include(src/shape/shape.pri)
Expand Down Expand Up @@ -56,6 +57,14 @@ unix:!macx {
QMAKE_CXXFLAGS += -D_GLIBCXX_USE_CXX11_ABI=0
QMAKE_CXXFLAGS += -Wno-expansion-to-defined
}
win32 {
GSTREAMER_ROOT = $$(GSTREAMER_1_0_ROOT_MSVC_X86_64)
INCLUDEPATH += $$GSTREAMER_ROOT/include/gstreamer-1.0
INCLUDEPATH += $$GSTREAMER_ROOT/include/glib-2.0
INCLUDEPATH += $$GSTREAMER_ROOT/lib/glib-2.0/include
LIBS += -L$$GSTREAMER_ROOT/lib -lgstreamer-1.0 -lglib-2.0 -lgobject-2.0
QMAKE_CXXFLAGS += /FI"windows.h"
}

CONFIG -= qtquickcompiler

Expand Down
2 changes: 1 addition & 1 deletion src/gui/ShapeGraphicsItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ void MeshTextureGraphicsItem::_buildCacheQuadItem(CacheQuadItem& item, const Qua
//
if (stop)
{
item.subQuads.append( (CacheQuadMapping){ inputQuad, outputQuad } );
item.subQuads.append({inputQuad, outputQuad});
}
else // subdivide
{
Expand Down
19 changes: 10 additions & 9 deletions src/src.pri
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ macx {
# Windows-specific:
win32 {
DEFINES += WIN32
TARGET = ../../../MapMap/MapMap # Just for release
TARGET = ../MapMap/MapMap # Just for release
GST_HOME = $$quote($$(GSTREAMER_1_0_ROOT_X86))
isEmpty(GST_HOME) {
message(\"GSTREAMER_1_0_ROOT_X86\" not detected ...)
Expand All @@ -65,14 +65,15 @@ win32 {
$${GST_HOME}/lib/glib-2.0/include \
$${GST_HOME}/include/gstreamer-1.0

LIBS += $${GST_HOME}/lib/gstapp-1.0.lib \
$${GST_HOME}/lib/gstbase-1.0.lib \
$${GST_HOME}/lib/gstpbutils-1.0.lib \
$${GST_HOME}/lib/gstreamer-1.0.lib \
$${GST_HOME}/lib/gobject-2.0.lib \
$${GST_HOME}/lib/glib-2.0.lib \
$${GST_HOME}/lib/gstaudio-1.0.lib \
$${GST_HOME}/lib/gstvideo-1.0.lib \
LIBS += -L"$${GST_HOME}/lib" \
-lgstapp-1.0 \
-lgstbase-1.0 \
-lgstpbutils-1.0 \
-lgstreamer-1.0 \
-lgobject-2.0 \
-lglib-2.0 \
-lgstaudio-1.0 \
-lgstvideo-1.0 \
-lopengl32

CONFIG -= debug
Expand Down