Skip to content

Commit 286db5d

Browse files
committed
Simplify Custom Build Integration
1 parent eee119e commit 286db5d

14 files changed

Lines changed: 89 additions & 864 deletions

custom-example/CMakeLists.txt

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,8 @@ if(ANDROID)
3232
endif()
3333
endif()
3434

35-
find_package(Python3 REQUIRED)
36-
execute_process(
37-
COMMAND ${Python3_EXECUTABLE}
38-
RESULT_VARIABLE PYTHON_RESULT
39-
OUTPUT_VARIABLE PYTHON_OUTPUT
40-
ERROR_VARIABLE PYTHON_ERROR
41-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
42-
INPUT_FILE updateqrc.py
43-
OUTPUT_STRIP_TRAILING_WHITESPACE
44-
)
45-
cmake_print_variables(PYTHON_RESULT PYTHON_OUTPUT PYTHON_ERROR)
46-
4735
# Our own, custom resources
4836
list(APPEND CUSTOM_RESOURCES
49-
${CMAKE_CURRENT_SOURCE_DIR}/qgcimages.qrc
50-
${CMAKE_CURRENT_SOURCE_DIR}/qgcresources.qrc
51-
${CMAKE_CURRENT_SOURCE_DIR}/qgroundcontrol.qrc
5237
${CMAKE_CURRENT_SOURCE_DIR}/custom.qrc
5338
)
5439
set(QGC_RESOURCES ${QGC_RESOURCES} ${CUSTOM_RESOURCES} CACHE STRING "Paths to .qrc Resources" FORCE)
@@ -78,23 +63,3 @@ set(CUSTOM_DIRECTORIES
7863
${CMAKE_CURRENT_SOURCE_DIR}/src/FirmwarePlugin
7964
CACHE INTERNAL "" FORCE
8065
)
81-
82-
# file(GLOB_RECURSE QML_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/res/*.qml)
83-
# file(GLOB QML_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/res/Images/*.*)
84-
# qt_add_qml_module(CustomPlugin
85-
# URI QGroundControl.CustomPlugin
86-
# VERSION 1.0
87-
# RESOURCE_PREFIX "/"
88-
# QML_FILES ${QML_SOURCES}
89-
# RESOURCES ${QML_RESOURCES}
90-
# OUTPUT_TARGETS CustomPlugin_targets
91-
# IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY}
92-
# IMPORTS
93-
# QtQuick
94-
# QtQuick.Controls
95-
# QtQuick.Layouts
96-
# QGroundControl
97-
# QGroundControl.Controls
98-
# QGroundControl.Palette
99-
# QGroundControl.ScreenTools
100-
# )

custom-example/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ To build this sample custom version:
77
* Clean you build directory of any previous build
88
* Rename the directory from `custom-example` to `custom`
99
* Change to the `custom` directory
10-
* Run `python updateqrc.py`
1110
* Build QGC
1211

1312
![Custom Build Screenshot](README.jpg)
@@ -23,5 +22,3 @@ The main features of this example:
2322
* Customizes portions of the interface such as you can see in the above screenshot which shows a custom instrument widget replacing the standard QGC ui.
2423
* It also overrides various QGC Application settings to hide some settings the users shouldn't modify as well as adjusting defaults for others.
2524
* The source code is fully commented to explain what and why it is doing things.
26-
27-
> Important Note: This custom build is not automatically built each time regular QGC code changes. This can mean that it may fall out of date with the latest changes in QGC code. This can show up as the `python updateqrc.py` steps failing due to upstream resource changes. Or possibly fail to compile because the plugin mechanism for custom builds has changed. If this happens please notify the QGC devs and they will bring it up to date. Or even better, submit a pull for the fix yourself!

custom-example/custom.qrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<file alias="dronecode-black.svg">res/Images/dronecode-black.svg</file>
1616
<file alias="dronecode-white.svg">res/Images/dronecode-white.svg</file>
1717
</qresource>
18-
<qresource prefix="/qmlimages">
18+
<qresource prefix="Custom/qmlimages">
1919
<file alias="PaperPlane.svg">res/Images/CustomVehicleIcon.svg</file>
2020
</qresource>
2121
<qresource prefix="/Custom/Widgets">
@@ -29,12 +29,12 @@
2929
<file alias="Custom/Widgets/CustomVehicleButton.qml">res/Custom/Widgets/CustomVehicleButton.qml</file>
3030
<file alias="Custom/Widgets/qmldir">res/Custom/Widgets/qmldir</file>
3131
</qresource>
32-
<qresource prefix="/qml">
32+
<qresource prefix="/Custom/qml">
3333
<file alias="QGroundControl/FlightDisplay/CustomGuidedActionsController.qml">src/CustomGuidedActionsController.qml</file>
3434
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">src/FlyViewCustomLayer.qml</file>
3535
<file alias="QGroundControl/FlightDisplay/FlyViewToolStripActionList.qml">src/FlyViewToolStripActionList.qml</file>
3636
</qresource>
37-
<qresource prefix="/res">
37+
<qresource prefix="Custom/res">
3838
<file alias="QGCLogoFull.svg">res/QGCLogoFull.svg</file>
3939
<file alias="qgroundcontrol.ico">res/icons/custom_qgroundcontrol.ico</file>
4040
</qresource>

custom-example/qgcimages.exclusion

Lines changed: 0 additions & 2 deletions
This file was deleted.

custom-example/qgcimages.qrc

Lines changed: 0 additions & 217 deletions
This file was deleted.

custom-example/qgcresources.exclusion

Lines changed: 0 additions & 3 deletions
This file was deleted.

custom-example/qgcresources.qrc

Lines changed: 0 additions & 113 deletions
This file was deleted.

custom-example/qgroundcontrol.exclusion

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)