Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use common versioning #670

Merged
merged 15 commits into from
Mar 5, 2024
Merged
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
37 changes: 37 additions & 0 deletions .github/workflows/ubuntu22_build_test_qt6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ubuntu22_build_test_qt6

# @Rapha please keep this one without any packaging or similar ;)
# NOTE: This test only checks if the code in the repository builds under ubuntu x86 (dependencies installed)
# Which is - simply put - the most basic test. If this test fails, there is something wrong with the code.

on: [push]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
#runs-on: ubuntu-18.04
#runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5
modules: qtcharts

- name: Install non-qt dependencies
run: |
sudo ./install_qt6_build_dep.sh

- name: Build with CMake
run: |
./build_cmake.sh
51 changes: 38 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
cmake_minimum_required(VERSION 3.16)

project(QOpenHDProject VERSION 0.1 LANGUAGES CXX)
project(QOpenHDProject VERSION 0.1 LANGUAGES C CXX)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt6 6.5 REQUIRED COMPONENTS Core)
find_package(Qt6 6.5 REQUIRED COMPONENTS Quick)
find_package(Qt6 6.5 REQUIRED COMPONENTS Gui)
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets)
set(X_QT_VERSION 6.4)

qt_standard_project_setup(REQUIRES 6.5)

find_package(Qt6 ${X_QT_VERSION} REQUIRED COMPONENTS Core)
find_package(Qt6 ${X_QT_VERSION} REQUIRED COMPONENTS Quick)
find_package(Qt6 ${X_QT_VERSION} REQUIRED COMPONENTS Gui)
find_package(Qt6 ${X_QT_VERSION} REQUIRED COMPONENTS Widgets)

qt_standard_project_setup(REQUIRES ${X_QT_VERSION})

qt_add_executable(QOpenHDApp
app/main.cpp
Expand Down Expand Up @@ -64,13 +69,20 @@ qt_add_executable(QOpenHDApp
app/telemetry/settings/mavlinksettingsmodel.cpp
app/telemetry/settings/pollutionhelper.cpp
app/telemetry/settings/wblinksettingshelper.cpp
#
app/telemetry/tutil/geodesi_helper.cpp

###
#app/videostreaming/vscommon/custom/rawreceiver.cpp
#app/videostreaming/vscommon/rtp/rtpreceiver.cpp
#app/videostreaming/vscommon/rtp/ParseRTP.cpp
app/videostreaming/vscommon/decodingstatistcs.cpp
app/videostreaming/vscommon/decodingstatistcs.h
app/videostreaming/vscommon/audio_playback.cpp
app/videostreaming/vscommon/rtp/ParseRTP.cpp
app/videostreaming/vscommon/rtp/rtpreceiver.cpp
app/videostreaming/vscommon/udp/UDPReceiver.cpp
app/videostreaming/vscommon/decodingstatistcs.cpp

##
lib/geographiclib-c-2.0/src/geodesic.c
##
Expand All @@ -90,19 +102,32 @@ target_include_directories(QOpenHDApp PUBLIC app/telemetry/util)

target_include_directories(QOpenHDApp PUBLIC app/videostreaming/vscommon)
target_include_directories(QOpenHDApp PUBLIC lib)
target_include_directories(QOpenHDApp PUBLIC lib/geographiclib-c-2.0/src)

qt_add_qml_module(QOpenHDApp
URI QOpenHD
VERSION 1.0
QML_FILES
qml/MainX.qml
)
#qt_add_qml_module(QOpenHDApp
# URI hello
# VERSION 1.0
# QML_FILES
# qml/main.qml
# qml/ui/AnyParamBusyIndicator.qml
# qml/ui/HUDOverlayGrid.qml
# qml/ui/elements/
# qml/ui/sidebar/
# qml/ui/widgets/
#)
#qt6_add_resources(qml_QRC
# PREFIX "/"
# qml/qml.qrc)


target_link_libraries(QOpenHDApp
PRIVATE Qt6::Core Qt6::Quick Qt6::Gui Qt6::Widgets
)

include(lib/h264/h264.cmake)
include(app/videostreaming/avcodec/avcodec_video.cmake)
include(app/videostreaming/android/videostreamingandroid.cmake)

#include(GNUInstallDirs)
#install(TARGETS QOpenHD
# BUNDLE DESTINATION .
Expand Down
6 changes: 0 additions & 6 deletions QOpenHD.pro
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,6 @@ DISTFILES += \
android/res/values/libs.xml \
android/res/values/styles.xml \
android/src/QOpenHDActivity.java \
android/src/SurfaceTextureListener.java \
android/src/org/freedesktop/gstreamer/androidmedia/GstAhcCallback.java \
android/src/org/freedesktop/gstreamer/androidmedia/GstAhsCallback.java \
android/src/org/freedesktop/gstreamer/androidmedia/GstAmcOnFrameAvailableListener.java \
android/src/org/openhd/IsConnected.java \
android/src/org/openhd/LiveVideoPlayerWrapper.java \
qml/qtquickcontrols2.conf \
qml/ui/qmldir \

Expand Down
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<manifest package="com.openhd.openhd" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="v16" android:versionCode="16" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33"/>
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31"/>

<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
Expand Down
173 changes: 0 additions & 173 deletions android/src/org/openhd/IsConnected.java

This file was deleted.

49 changes: 0 additions & 49 deletions android/src/org/openhd/LiveVideoPlayerWrapper.java

This file was deleted.

3 changes: 0 additions & 3 deletions android/src/org/openhd/QOpenHDActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
import android.widget.RelativeLayout;
// Custom video surface end

import org.openhd.IsConnected;

public class QOpenHDActivity extends QtActivity {
private static QOpenHDActivity _instance = null;

Expand All @@ -39,7 +37,6 @@ public static void jniOnLoad() {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
IsConnected.m_stored_context= this;

// Init surface
/*surfaceView = new SurfaceView(this);
Expand Down
Loading
Loading