mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
package: auto-generate Qt resource file for OPFW images
This commit is contained in:
parent
4edf78d1cd
commit
4eb485bdde
5
Makefile
5
Makefile
@ -750,6 +750,11 @@ sim_win32_%: uavobjects_flight
|
||||
# Packaging components
|
||||
#
|
||||
##############################
|
||||
|
||||
.PHONY: package
|
||||
package:
|
||||
$(V1) cd $@ && $(MAKE) --no-print-directory $@
|
||||
|
||||
.PHONY: package_resources
|
||||
package_resources:
|
||||
$(V1) cd package && $(MAKE) --no-print-directory opfw_resource
|
||||
|
@ -129,4 +129,19 @@ ifeq ($(UNAME), Darwin)
|
||||
PLATFORM := osx
|
||||
endif
|
||||
|
||||
toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1)))
|
||||
OPFW_FILES := $(foreach fw_targ, $(FW_TARGETS), $(call toprel, $(BUILD_DIR)/$(fw_targ)/$(fw_targ).opfw))
|
||||
OPFW_CONTENTS := \
|
||||
<!DOCTYPE RCC><RCC version="1.0"> \
|
||||
<qresource> \
|
||||
$(foreach fw_file, $(OPFW_FILES), <file>$(fw_file)</file>) \
|
||||
</qresource> \
|
||||
</RCC>
|
||||
|
||||
.PHONY: opfw_resource
|
||||
opfw_resource:
|
||||
@echo Generating OPFW resource file $(call toprel, $(BUILD_DIR)/ground/$@)
|
||||
$(V1) mkdir -p $(BUILD_DIR)/ground/$@
|
||||
$(V1) echo '$(OPFW_CONTENTS)' > $(BUILD_DIR)/ground/$@/opfw_resource.qrc
|
||||
|
||||
include $(WHEREAMI)/Makefile.$(PLATFORM)
|
||||
|
Loading…
Reference in New Issue
Block a user