From 3e815ca8d581ada3716cf9a3506ae620e42fa26a Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sat, 30 Mar 2013 17:33:38 +0200 Subject: [PATCH 1/2] build: get rid of build/ground subdirectory, fix qt-creator builds This changeset: - moves all ground targets one level up, under build directory. The build/ground was created as a workaround, now unnecessary; - fixes QtCreator builds, they are separated from command line builds; - moves GCS autogenerated files into openpilotgcs-synthetics directory. The resulting build subdirectory now looks like: build openpilotgcs <- Qt-Creator build directory openpilotgcs-synthetics <- version-info and opfw_resource openpilotgcs_debug openpilotgcs_release <- Makefile build directory uavobject-synthetics uavobjgenerator NOTE: you should update the shadow build path in QtCreator to build, not build/ground as before. +review OPReview --- Makefile | 31 +++++------ ground/ground.pro | 53 ++++++++++--------- ground/openpilotgcs/copydata.pro | 3 +- ground/openpilotgcs/openpilotgcs.pro | 5 ++ ground/openpilotgcs/src/app/gcssplashscreen.h | 2 +- .../openpilotgcs/src/app/gcsversioninfo.pri | 8 +-- ground/openpilotgcs/src/gcs_version_info.h | 6 +++ .../src/plugins/coreplugin/authorsdialog.cpp | 3 +- .../src/plugins/coreplugin/versiondialog.h | 3 +- .../uavobjects/uavobjects_dependencies.pri | 2 +- .../uavsettingsimportexport.h | 2 +- .../uavsettingsimportexportfactory.h | 2 +- .../src/plugins/uploader/uploader.pro | 6 ++- .../plugins/uploader/uploadergadgetwidget.cpp | 2 +- .../uavobject-synthetics.pro} | 32 ++++++----- ground/uavobjgenerator/uavobjgenerator.pro | 8 +-- ...template.h => gcs_version_info_template.h} | 0 package/Windows.mk | 2 +- package/linux/deb_common/rules | 9 ++-- package/osx/libraries | 2 +- package/osx/package | 2 +- package/winx86/openpilotgcs.nsi | 4 +- 22 files changed, 99 insertions(+), 88 deletions(-) create mode 100644 ground/openpilotgcs/src/gcs_version_info.h rename ground/{uavobjects/uavobjects.pro => uavobject-synthetics/uavobject-synthetics.pro} (52%) rename make/templates/{gcsversioninfotemplate.h => gcs_version_info_template.h} (100%) diff --git a/Makefile b/Makefile index 057d7f2f4..175faa090 100644 --- a/Makefile +++ b/Makefile @@ -161,13 +161,13 @@ endif # We almost need to consider autoconf/automake instead of this ifeq ($(UNAME), Linux) QT_SPEC = linux-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/ground/uavobjgenerator/uavobjgenerator" + UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator" else ifeq ($(UNAME), Darwin) QT_SPEC = macx-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/ground/uavobjgenerator/uavobjgenerator" + UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/uavobjgenerator" else QT_SPEC = win32-g++ - UAVOBJGENERATOR = "$(BUILD_DIR)/ground/uavobjgenerator/$(UAVOGEN_BUILD_CONF)/uavobjgenerator.exe" + UAVOBJGENERATOR = "$(BUILD_DIR)/uavobjgenerator/$(UAVOGEN_BUILD_CONF)/uavobjgenerator.exe" endif ############################## @@ -206,8 +206,8 @@ endif .PHONY: uavobjgenerator uavobjgenerator: - $(V1) $(MKDIR) -p $(BUILD_DIR)/ground/$@ - $(V1) ( cd $(BUILD_DIR)/ground/$@ && \ + $(V1) $(MKDIR) -p $(BUILD_DIR)/$@ + $(V1) ( cd $(BUILD_DIR)/$@ && \ $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro -spec $(QT_SPEC) -r CONFIG+="$(UAVOGEN_BUILD_CONF) $(UAVOGEN_SILENT)" && \ $(MAKE) --no-print-directory -w ; \ ) @@ -251,6 +251,7 @@ export OPUAVTALK := $(ROOT_DIR)/flight/targets/UAVTalk export HWDEFS := $(ROOT_DIR)/flight/targets/board_hw_defs export DOXYGENDIR := $(ROOT_DIR)/flight/Doc/Doxygen export OPUAVSYNTHDIR := $(BUILD_DIR)/uavobject-synthetics/flight +export OPGCSSYNTHDIR := $(BUILD_DIR)/openpilotgcs-synthetics # Define supported board lists ALL_BOARDS := coptercontrol pipxtreme revolution revomini osd simposix @@ -509,7 +510,6 @@ all_ground: openpilotgcs .PHONY: gcs gcs_clean gcs_all_clean gcs: openpilotgcs gcs_clean: openpilotgcs_clean -gcs_all_clean: openpilotgcs_all_clean ifeq ($(V), 1) GCS_SILENT := @@ -519,8 +519,8 @@ endif .PHONY: openpilotgcs openpilotgcs: uavobjects_gcs - $(V1) $(MKDIR) -p $(BUILD_DIR)/ground/$@/$(GCS_BUILD_CONF) - $(V1) ( cd $(BUILD_DIR)/ground/$@/$(GCS_BUILD_CONF) && \ + $(V1) $(MKDIR) -p $(BUILD_DIR)/$@_$(GCS_BUILD_CONF) + $(V1) ( cd $(BUILD_DIR)/$@_$(GCS_BUILD_CONF) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+="$(GCS_BUILD_CONF) $(GCS_SILENT)" $(GCS_QMAKE_OPTS) && \ $(MAKE) -w ; \ ) @@ -528,12 +528,7 @@ openpilotgcs: uavobjects_gcs .PHONY: openpilotgcs_clean openpilotgcs_clean: $(V0) @$(ECHO) " CLEAN $@" - $(V1) [ ! -d "$(BUILD_DIR)/ground/openpilotgcs/$(GCS_BUILD_CONF)" ] || $(RM) -r "$(BUILD_DIR)/ground/openpilotgcs/$(GCS_BUILD_CONF)" - -.PHONY: openpilotgcs_all_clean -openpilotgcs_all_clean: - $(V0) @$(ECHO) " CLEAN $@" - $(V1) [ ! -d "$(BUILD_DIR)/ground/openpilotgcs" ] || $(RM) -r "$(BUILD_DIR)/ground/openpilotgcs" + $(V1) [ ! -d "$(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)" ] || $(RM) -r "$(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)" ################################ # @@ -771,8 +766,8 @@ PACKAGE_ELF_TARGETS := $(filter fw_simposix, $(FW_TARGETS)) # Rules to generate GCS resources used to embed firmware binaries into the GCS. # They are used later by the vehicle setup wizard to update board firmware. # To open a firmware image use ":/firmware/fw_coptercontrol.opfw" -OPFW_RESOURCE := $(BUILD_DIR)/ground/opfw_resource/opfw_resource.qrc -OPFW_RESOURCE_PREFIX := ../../../ +OPFW_RESOURCE := $(OPGCSSYNTHDIR)/opfw_resource.qrc +OPFW_RESOURCE_PREFIX := ../../ OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(call toprel, $(BUILD_DIR)/$(fw_targ)/$(fw_targ).opfw)) OPFW_CONTENTS := \ \ @@ -789,8 +784,8 @@ $(OPFW_RESOURCE): $(FW_TARGETS) $(V1) $(MKDIR) -p $(dir $@) $(V1) $(ECHO) $(QUOTE)$(OPFW_CONTENTS)$(QUOTE) > $@ -# If opfw_resource is requested, GCS should depend on it -ifneq ($(strip $(filter opfw_resource,$(MAKECMDGOALS))),) +# If opfw_resource or all are requested, GCS should depend on the resource +ifneq ($(strip $(filter opfw_resource all,$(MAKECMDGOALS))),) $(eval openpilotgcs: | opfw_resource) endif diff --git a/ground/ground.pro b/ground/ground.pro index 3d7aeef0f..e443006ec 100644 --- a/ground/ground.pro +++ b/ground/ground.pro @@ -1,48 +1,51 @@ # -# Top level Qt-Creator project file +# Top level Qt-Creator project file for OpenPilot GCS +# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org # - # This meta-project allows qt-creator users to open and configure a -# single project and to build all required software to produce a GCS. -# This includes regenerating all uavobject output. +# single project and build all required software to produce the GCS. +# This includes regenerating all uavobject-synthetic files. # -# NOTE: to use this meta-project, you MUST perform these steps once +# NOTE: to use this meta-project you MUST perform these steps once # for each source tree checkout: # - Open /ground/ground.pro in qt-creator # - Select the "Projects" tab -# - Under Build Settings/General heading, click "Show Details" -# - Activate "Shadow Build" -# - Set your Build Directory to /build/ground -# -# = the full path to the base of your git source tree which +# - Under Build Settings/General heading activate "Shadow build" +# - Set "Build directory" below to /build +# Here = the full path to the base of your git source tree which # should contain "flight", "ground", etc. - -# There is a small problem with dependencies. qmake needs synthetic +# +# NOTE: only debug qt-creator builds are supported on Windows. +# Release builds may fail because it seems that qt-creator does not +# define QTMINGW variable used to copy MinGW DLLs in release builds. +# +# There is a minor problem with dependencies. qmake needs synthetic # files when it generates GCS Makefiles. But we do not have -# uavobjgenerator at that time (on the 1st build). So we use the -# following trick: at make stage in uavobjects we rerun qmake for -# openpilotgcs.pro and regenerate GCS Makefiles using just built -# synthetic files. It takes some extra time but solves the -# dependency problem. +# uavobjgenerator built yet. So we use the following trick: at make +# stage in uavobject-synthetics we rerun qmake for openpilotgcs.pro +# and regenerate GCS Makefiles using just built synthetic files. +# It takes some extra time but solves the dependency problem. +# +# Please note that this meta-project is only intended to be used by +# qt-creator users. Top level Makefile handles all dependencies itself +# and does not use ground.pro. -# Please note that this meta-project intended only for qt-creator -# users. Top level Makefile handles all dependencies itself and -# doesn't use ground.pro. +message("Make sure you have shadow build path set as noted in ground.pro. Build will fail otherwise") TEMPLATE = subdirs SUBDIRS = \ sub_openpilotgcs \ - sub_uavobjects \ + sub_uavobject-synthetics \ sub_uavobjgenerator # uavobjgenerator sub_uavobjgenerator.subdir = uavobjgenerator -# uavobjects -sub_uavobjects.subdir = uavobjects -sub_uavobjects.depends = sub_uavobjgenerator +# uavobject-synthetics +sub_uavobject-synthetics.subdir = uavobject-synthetics +sub_uavobject-synthetics.depends = sub_uavobjgenerator # openpilotgcs sub_openpilotgcs.subdir = openpilotgcs -sub_openpilotgcs.depends = sub_uavobjects +sub_openpilotgcs.depends = sub_uavobject-synthetics diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro index 23a3d5ba6..13b0db555 100644 --- a/ground/openpilotgcs/copydata.pro +++ b/ground/openpilotgcs/copydata.pro @@ -21,7 +21,8 @@ equals(copydata, 1) { QtXml4.dll \ QtDeclarative4.dll \ QtXmlPatterns4.dll \ - QtScript4.dll + QtScript4.dll \ + QtWebKit4.dll for(dll, QT_DLLS) { data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() } diff --git a/ground/openpilotgcs/openpilotgcs.pro b/ground/openpilotgcs/openpilotgcs.pro index df6b0cf86..a7cd0735a 100644 --- a/ground/openpilotgcs/openpilotgcs.pro +++ b/ground/openpilotgcs/openpilotgcs.pro @@ -1,3 +1,8 @@ +# +# Qmake project for the OpenPilot GCS. +# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org +# + #version check qt contains(QT_VERSION, ^4\\.[0-5]\\..*) { message("Cannot build OpenPilot GCS with Qt version $${QT_VERSION}.") diff --git a/ground/openpilotgcs/src/app/gcssplashscreen.h b/ground/openpilotgcs/src/app/gcssplashscreen.h index a7e4c35d5..6c04e2367 100644 --- a/ground/openpilotgcs/src/app/gcssplashscreen.h +++ b/ground/openpilotgcs/src/app/gcssplashscreen.h @@ -33,7 +33,7 @@ #include #include -#include "../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../gcs_version_info.h" class GCSSplashScreen : public QSplashScreen { diff --git a/ground/openpilotgcs/src/app/gcsversioninfo.pri b/ground/openpilotgcs/src/app/gcsversioninfo.pri index c052a0d31..b6197b96b 100644 --- a/ground/openpilotgcs/src/app/gcsversioninfo.pri +++ b/ground/openpilotgcs/src/app/gcsversioninfo.pri @@ -8,15 +8,17 @@ # Since debug_and_release option is set, we need this !debug_and_release|build_pass { ROOT_DIR = $$GCS_SOURCE_TREE/../.. - VERSION_INFO_HEADER = $$GCS_BUILD_TREE/../gcsversioninfo.h + VERSION_INFO_DIR = $$GCS_BUILD_TREE/../openpilotgcs-synthetics + VERSION_INFO_HEADER = $$VERSION_INFO_DIR/gcs_version_info.h VERSION_INFO_SCRIPT = $$ROOT_DIR/make/scripts/version-info.py - VERSION_INFO_TEMPLATE = $$ROOT_DIR/make/templates/gcsversioninfotemplate.h + VERSION_INFO_TEMPLATE = $$ROOT_DIR/make/templates/gcs_version_info_template.h VERSION_INFO_COMMAND = python \"$$VERSION_INFO_SCRIPT\" UAVO_DEF_PATH = $$ROOT_DIR/shared/uavobjectdefinition # Create custom version_info target which generates a header version_info.target = $$VERSION_INFO_HEADER - version_info.commands = $$VERSION_INFO_COMMAND \ + version_info.commands = -$(MKDIR) $$targetPath($$VERSION_INFO_DIR) $$addNewline() + version_info.commands += $$VERSION_INFO_COMMAND \ --path=\"$$GCS_SOURCE_TREE\" \ --template=\"$$VERSION_INFO_TEMPLATE\" \ --uavodir=\"$$UAVO_DEF_PATH\" \ diff --git a/ground/openpilotgcs/src/gcs_version_info.h b/ground/openpilotgcs/src/gcs_version_info.h new file mode 100644 index 000000000..0f4be3102 --- /dev/null +++ b/ground/openpilotgcs/src/gcs_version_info.h @@ -0,0 +1,6 @@ +// +// This file includes autogenerated version info header used by other plugins. +// The autogenerated file is build by app/gcsversioninfo.pri. +// + +#include "../../../build/openpilotgcs-synthetics/gcs_version_info.h" diff --git a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp index 0978a4638..c65e87d3d 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp +++ b/ground/openpilotgcs/src/plugins/coreplugin/authorsdialog.cpp @@ -28,8 +28,7 @@ #include "authorsdialog.h" -// autogenerated version info string -#include "../../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../../gcs_version_info.h" #include "coreconstants.h" #include "icore.h" diff --git a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h index ab6ec24d2..2e3696039 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/versiondialog.h @@ -29,8 +29,7 @@ #ifndef VERSIONDIALOG_H #define VERSIONDIALOG_H -// autogenerated version info string -#include "../../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../../gcs_version_info.h" #include diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri index c6a079a29..9cf42e484 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects_dependencies.pri @@ -2,7 +2,7 @@ include(../../plugins/coreplugin/coreplugin.pri) include(../../libs/utils/utils.pri) # Provide the path to the auto-generated uavobject source files for the GCS. -UAVOBJECT_SYNTHETICS=$${GCS_BUILD_TREE}/../../../uavobject-synthetics/gcs +UAVOBJECT_SYNTHETICS=$${GCS_BUILD_TREE}/../uavobject-synthetics/gcs #message(UAVOBJECT_SYNTHETICS is $$UAVOBJECT_SYNTHETICS) # Add the include path to the auto-generated uavobject include files. diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h index a63454153..bf36a67e3 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexport.h @@ -30,7 +30,7 @@ #include #include "uavobjectutil/uavobjectutilmanager.h" #include "uavsettingsimportexport_global.h" -#include "../../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../../gcs_version_info.h" #include "uavsettingsimportexportfactory.h" class UAVSETTINGSIMPORTEXPORT_EXPORT UAVSettingsImportExportPlugin : public ExtensionSystem::IPlugin { diff --git a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h index 20b474dd6..aa07d62e1 100644 --- a/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h +++ b/ground/openpilotgcs/src/plugins/uavsettingsimportexport/uavsettingsimportexportfactory.h @@ -28,7 +28,7 @@ #define UAVSETTINGSIMPORTEXPORTFACTORY_H #include "uavsettingsimportexport_global.h" #include "uavobjectutil/uavobjectutilmanager.h" -#include "../../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../../gcs_version_info.h" class UAVSETTINGSIMPORTEXPORT_EXPORT UAVSettingsImportExportFactory : public QObject { Q_OBJECT diff --git a/ground/openpilotgcs/src/plugins/uploader/uploader.pro b/ground/openpilotgcs/src/plugins/uploader/uploader.pro index 2518c214b..6a1c17407 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploader.pro +++ b/ground/openpilotgcs/src/plugins/uploader/uploader.pro @@ -46,6 +46,8 @@ FORMS += \ RESOURCES += \ uploader.qrc -exists( ../../../../../build/ground/opfw_resource/opfw_resource.qrc ) { -RESOURCES += ../../../../build/ground/opfw_resource/opfw_resource.qrc +exists( ../../../../../build/openpilotgcs-synthetics/opfw_resource.qrc ) { + RESOURCES += ../../../../../build/openpilotgcs-synthetics/opfw_resource.qrc +} else { + message("opfw_resource.qrc is not available, automatic firmware upgrades are disabled") } diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index 2dd5ce8ea..706cce1fe 100755 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -25,7 +25,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "uploadergadgetwidget.h" -#include "../../../../../build/ground/openpilotgcs/gcsversioninfo.h" +#include "../../gcs_version_info.h" #include #include #include "flightstatus.h" diff --git a/ground/uavobjects/uavobjects.pro b/ground/uavobject-synthetics/uavobject-synthetics.pro similarity index 52% rename from ground/uavobjects/uavobjects.pro rename to ground/uavobject-synthetics/uavobject-synthetics.pro index 5a256ba3d..1f974ae80 100644 --- a/ground/uavobjects/uavobjects.pro +++ b/ground/uavobject-synthetics/uavobject-synthetics.pro @@ -1,7 +1,6 @@ # # Qmake project for UAVObjects generation. -# -# TODO: provide some dependencies (now it builds every time) +# Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org # TEMPLATE = subdirs @@ -39,31 +38,30 @@ win32 { # Windows sometimes remembers working directory changed from Makefile, sometimes not. # That's why pushd/popd is used here - to make sure that we know current directory. - uavobjects.commands += -$(MKDIR) $$targetPath(../../uavobject-synthetics) $$addNewline() - - uavobjects.commands += pushd $$targetPath(../../uavobject-synthetics) && - uavobjects.commands += $$targetPath(../ground/uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator) - uavobjects.commands += -gcs -flight -python -matlab + uavobjects.commands += -$(MKDIR) $$targetPath(../uavobject-synthetics) $$addNewline() + uavobjects.commands += pushd $$targetPath(../uavobject-synthetics) && + uavobjects.commands += $$targetPath(../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator) uavobjects.commands += $$targetPath(../../shared/uavobjectdefinition) uavobjects.commands += $$targetPath(../..) && uavobjects.commands += popd $$addNewline() - uavobjects.commands += pushd $$targetPath(../../ground/openpilotgcs) && + uavobjects.commands += -$(MKDIR) $$targetPath(../openpilotgcs) $$addNewline() + uavobjects.commands += pushd $$targetPath(../openpilotgcs) && uavobjects.commands += $(QMAKE) -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r - uavobjects.commands += $$targetPath(../../../ground/openpilotgcs/)openpilotgcs.pro && + uavobjects.commands += $$targetPath(../../ground/openpilotgcs/)openpilotgcs.pro && uavobjects.commands += popd $$addNewline() } !win32 { - uavobjects.commands += $(MKDIR) -p ../../uavobject-synthetics $$addNewline() + uavobjects.commands += $(MKDIR) -p ../uavobject-synthetics $$addNewline() + uavobjects.commands += cd ../uavobject-synthetics && + uavobjects.commands += ../uavobjgenerator/uavobjgenerator + uavobjects.commands += ../../shared/uavobjectdefinition ../.. && - uavobjects.commands += cd ../../uavobject-synthetics && - uavobjects.commands += ../ground/uavobjgenerator/uavobjgenerator - uavobjects.commands += -gcs -flight -python -matlab ../../shared/uavobjectdefinition ../.. && - - uavobjects.commands += cd ../ground/openpilotgcs && - uavobjects.commands += $(QMAKE) ../../../ground/openpilotgcs/openpilotgcs.pro - uavobjects.commands += -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r $$addNewline() + uavobjects.commands += $(MKDIR) -p ../openpilotgcs $$addNewline() + uavobjects.commands += cd ../openpilotgcs && + uavobjects.commands += $(QMAKE) ../../ground/openpilotgcs/openpilotgcs.pro + uavobjects.commands += -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r $$addNewline() } uavobjects.target = FORCE diff --git a/ground/uavobjgenerator/uavobjgenerator.pro b/ground/uavobjgenerator/uavobjgenerator.pro index 6554741fb..59bca6ba3 100644 --- a/ground/uavobjgenerator/uavobjgenerator.pro +++ b/ground/uavobjgenerator/uavobjgenerator.pro @@ -1,6 +1,8 @@ -# ------------------------------------------------- -# Project created by QtCreator 2010-03-21T20:44:17 -# ------------------------------------------------- +# +# Qmake project for UAVObjGenerator. +# Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org +# + QT += xml QT -= gui macx { diff --git a/make/templates/gcsversioninfotemplate.h b/make/templates/gcs_version_info_template.h similarity index 100% rename from make/templates/gcsversioninfotemplate.h rename to make/templates/gcs_version_info_template.h diff --git a/package/Windows.mk b/package/Windows.mk index ec2c3c955..41d0a982a 100644 --- a/package/Windows.mk +++ b/package/Windows.mk @@ -14,7 +14,7 @@ NSIS_OPTS := /V3 NSIS_DIR := $(ROOT_DIR)/package/winx86 NSIS_SCRIPT := $(NSIS_DIR)/openpilotgcs.nsi NSIS_TEMPLATE := $(NSIS_DIR)/openpilotgcs.tpl -NSIS_HEADER := $(BUILD_DIR)/ground/openpilotgcs/openpilotgcs.nsh +NSIS_HEADER := $(OPGCSSYNTHDIR)/openpilotgcs.nsh .PHONY: package package: diff --git a/package/linux/deb_common/rules b/package/linux/deb_common/rules index 4f0fcdf26..5b0fa10ac 100644 --- a/package/linux/deb_common/rules +++ b/package/linux/deb_common/rules @@ -33,11 +33,10 @@ install: dh_installdirs dh_installudev --priority=45 # Add here commands to install the package into debian/ - cp -arp build/ground/openpilotgcs/release/bin debian/openpilot/usr/local/OpenPilot - cp -arp build/ground/openpilotgcs/release/lib debian/openpilot/usr/local/OpenPilot - cp -arp build/ground/openpilotgcs/release/share debian/openpilot/usr/local/OpenPilot - cp -arp build/ground/openpilotgcs/release/.obj debian/openpilot/usr/local/OpenPilot - cp -arp build/ground/openpilotgcs/gcsversioninfo.h debian/openpilot/usr/local/OpenPilot + cp -arp build/openpilotgcs_release/bin debian/openpilot/usr/local/OpenPilot + cp -arp build/openpilotgcs_release/lib debian/openpilot/usr/local/OpenPilot + cp -arp build/openpilotgcs_release/share debian/openpilot/usr/local/OpenPilot + cp -arp build/openpilotgcs_release/.obj debian/openpilot/usr/local/OpenPilot cp -arp package/linux/openpilot.desktop debian/openpilot/usr/share/applications cp -arp package/linux/openpilot.png debian/openpilot/usr/share/pixmaps cp -arp package/linux/openpilot_menu.png debian/openpilot/usr/share/pixmaps diff --git a/package/osx/libraries b/package/osx/libraries index 5e0d28aed..7a4989d95 100755 --- a/package/osx/libraries +++ b/package/osx/libraries @@ -3,7 +3,7 @@ APP="${1?}" PLUGINS="${APP}/Contents/Plugins" OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot" -QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon" +QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript QtWebKit phonon" QT_DIR=$(otool -L "${APP}/Contents/MacOS/OpenPilot GCS" | sed -n -e 's/\/QtCore\.framework.*//p' | sed -n -E 's:^.::p') QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib codecs/libqcncodecs.dylib codecs/libqjpcodecs.dylib codecs/libqkrcodecs.dylib codecs/libqtwcodecs.dylib graphicssystems/libqtracegraphicssystem.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib imageformats/libqsvg.dylib qmltooling/libqmldbg_inspector.dylib qmltooling/libqmldbg_tcp.dylib graphicssystems/libqglgraphicssystem.dylib sqldrivers/libqsqlodbc.dylib sqldrivers/libqsqlpsql.dylib sqldrivers/libqsqlite.dylib imageformats/libqtga.dylib iconengines/libqsvgicon.dylib" diff --git a/package/osx/package b/package/osx/package index 0faf1c618..cfa23c431 100755 --- a/package/osx/package +++ b/package/osx/package @@ -4,7 +4,7 @@ : ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${FW_DIR?} ${PACKAGE_NAME?} ${PACKAGE_SEP?} # more variables -APP_PATH="${BUILD_DIR}/ground/openpilotgcs/release/bin/OpenPilot GCS.app" +APP_PATH="${BUILD_DIR}/openpilotgcs_release/bin/OpenPilot GCS.app" TEMP_FILE="${PACKAGE_DIR}/OpenPilot-temp.dmg" OUT_FILE="${PACKAGE_DIR}/../${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}${PACKAGE_SEP}osx.dmg" VOL_NAME="OpenPilot" diff --git a/package/winx86/openpilotgcs.nsi b/package/winx86/openpilotgcs.nsi index 7d6dbbc69..ea682d6a9 100644 --- a/package/winx86/openpilotgcs.nsi +++ b/package/winx86/openpilotgcs.nsi @@ -36,7 +36,7 @@ ; Tree root locations (relative to this script location) !define PROJECT_ROOT "..\.." !define NSIS_DATA_TREE "." - !define GCS_BUILD_TREE "..\..\build\ground\openpilotgcs\release" + !define GCS_BUILD_TREE "..\..\build\openpilotgcs_release" !define UAVO_SYNTH_TREE "..\..\build\uavobject-synthetics" !define AEROSIMRC_TREE "${GCS_BUILD_TREE}\misc\AeroSIM-RC" @@ -61,7 +61,7 @@ ; !define PRODUCT_VERSION "0.0.0.0" ; !define FILE_VERSION "${TAG_OR_BRANCH}:${HASH8} ${DATETIME}" ; !define BUILD_DESCRIPTION "${TAG_OR_BRANCH}:${HASH8} built from ${ORIGIN}, committed ${DATETIME} as ${HASH}" - !include "${GCS_BUILD_TREE}\..\openpilotgcs.nsh" + !include "${GCS_BUILD_TREE}\..\openpilotgcs-synthetics\openpilotgcs.nsh" Name "${PRODUCT_NAME}" OutFile "${PACKAGE_DIR}\..\${OUT_FILE}" From 80e668411fca3037bd0513c428117c21fef94385 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Sun, 31 Mar 2013 18:06:43 +0200 Subject: [PATCH 2/2] build: remove extra libs, they are not used de-facto +review OPReview-429 --- ground/openpilotgcs/copydata.pro | 3 +-- package/osx/libraries | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro index 13b0db555..23a3d5ba6 100644 --- a/ground/openpilotgcs/copydata.pro +++ b/ground/openpilotgcs/copydata.pro @@ -21,8 +21,7 @@ equals(copydata, 1) { QtXml4.dll \ QtDeclarative4.dll \ QtXmlPatterns4.dll \ - QtScript4.dll \ - QtWebKit4.dll + QtScript4.dll for(dll, QT_DLLS) { data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() } diff --git a/package/osx/libraries b/package/osx/libraries index 7a4989d95..5e0d28aed 100755 --- a/package/osx/libraries +++ b/package/osx/libraries @@ -3,7 +3,7 @@ APP="${1?}" PLUGINS="${APP}/Contents/Plugins" OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot" -QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript QtWebKit phonon" +QT_LIBS="QtDeclarative QtXmlPatterns QtGui QtTest QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon" QT_DIR=$(otool -L "${APP}/Contents/MacOS/OpenPilot GCS" | sed -n -e 's/\/QtCore\.framework.*//p' | sed -n -E 's:^.::p') QT_EXTRA="accessible/libqtaccessiblewidgets.dylib bearer/libqgenericbearer.dylib codecs/libqcncodecs.dylib codecs/libqjpcodecs.dylib codecs/libqkrcodecs.dylib codecs/libqtwcodecs.dylib graphicssystems/libqtracegraphicssystem.dylib imageformats/libqgif.dylib imageformats/libqico.dylib imageformats/libqjpeg.dylib imageformats/libqmng.dylib imageformats/libqtiff.dylib imageformats/libqsvg.dylib qmltooling/libqmldbg_inspector.dylib qmltooling/libqmldbg_tcp.dylib graphicssystems/libqglgraphicssystem.dylib sqldrivers/libqsqlodbc.dylib sqldrivers/libqsqlpsql.dylib sqldrivers/libqsqlite.dylib imageformats/libqtga.dylib iconengines/libqsvgicon.dylib"