mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
Merge remote-tracking branch 'origin/next' into brian/rfm22_FHSS
This commit is contained in:
commit
948038f655
120
Makefile
120
Makefile
@ -24,14 +24,27 @@
|
||||
# existance by each sub-make.
|
||||
export OPENPILOT_IS_COOL := Fuck Yeah!
|
||||
|
||||
# Set up a default goal
|
||||
.DEFAULT_GOAL := help
|
||||
# It is possible to set OPENPILOT_DL_DIR and/or OPENPILOT_TOOLS_DIR environment
|
||||
# variables to override local tools download and installation directorys. So the
|
||||
# same toolchains can be used for all working copies. Particularly useful for CI
|
||||
# server build agents, but also for local installations.
|
||||
#
|
||||
# If no OPENPILOT_* variables found, makefile internal DL_DIR and TOOLS_DIR paths
|
||||
# will be used. They still can be overriden by the make command line parameters:
|
||||
# make DL_DIR=/path/to/download/directory TOOLS_DIR=/path/to/tools/directory targets...
|
||||
|
||||
# Function for converting Windows style slashes into Unix style
|
||||
slashfix = $(subst \,/,$(1))
|
||||
|
||||
# Function for converting an absolute path to one relative
|
||||
# to the top of the source tree
|
||||
toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1)))
|
||||
|
||||
# Set up some macros for common directories within the tree
|
||||
export ROOT_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
export TOOLS_DIR := $(ROOT_DIR)/tools
|
||||
export DL_DIR := $(if $(OPENPILOT_DL_DIR),$(call slashfix,$(OPENPILOT_DL_DIR)),$(ROOT_DIR)/downloads)
|
||||
export TOOLS_DIR := $(if $(OPENPILOT_TOOLS_DIR),$(call slashfix,$(OPENPILOT_TOOLS_DIR)),$(ROOT_DIR)/tools)
|
||||
export BUILD_DIR := $(ROOT_DIR)/build
|
||||
export DL_DIR := $(ROOT_DIR)/downloads
|
||||
export PACKAGE_DIR := $(ROOT_DIR)/build/package
|
||||
|
||||
# Set up default build configurations (debug | release)
|
||||
@ -40,15 +53,11 @@ UAVOGEN_BUILD_CONF := release
|
||||
ANDROIDGCS_BUILD_CONF := debug
|
||||
GOOGLE_API_VERSION := 14
|
||||
|
||||
# Function for converting an absolute path to one relative
|
||||
# to the top of the source tree.
|
||||
toprel = $(subst $(realpath $(ROOT_DIR))/,,$(abspath $(1)))
|
||||
|
||||
# Clean out undesirable variables from the environment and command-line
|
||||
# to remove the chance that they will cause problems with our build
|
||||
define SANITIZE_VAR
|
||||
$(if $(filter-out undefined,$(origin $(1))),
|
||||
$(info *NOTE* Sanitized $(2) variable '$(1)' from $(origin $(1)))
|
||||
$(info $(EMPTY) NOTE Sanitized $(2) variable '$(1)' from $(origin $(1)))
|
||||
MAKEOVERRIDES = $(filter-out $(1)=%,$(MAKEOVERRIDES))
|
||||
override $(1) :=
|
||||
unexport $(1)
|
||||
@ -102,6 +111,7 @@ export ANT := ant
|
||||
export JAVAC := javac
|
||||
export JAR := jar
|
||||
export GIT := git
|
||||
export CURL := curl
|
||||
export PYTHON := python
|
||||
export INSTALL := install
|
||||
|
||||
@ -110,64 +120,25 @@ export VERSION_INFO := $(PYTHON) "$(ROOT_DIR)/make/scripts/version-info.py" --pa
|
||||
|
||||
# Test if quotes are needed for the echo-command
|
||||
ifeq (${shell $(ECHO) "test"}, test)
|
||||
export QUOTE := '
|
||||
export QUOTE := '
|
||||
# This line is just to clear out the single quote above '
|
||||
else
|
||||
export QUOTE :=
|
||||
endif
|
||||
|
||||
# The tools.mk uses wget to fetch tarballs or packages
|
||||
ifeq ($(shell [ -x "$(TOOLS_DIR)/bin/wget" ] && $(ECHO) "exists"), exists)
|
||||
WGET := $(TOOLS_DIR)/bin/wget
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
WGET ?= wget
|
||||
export QUOTE :=
|
||||
endif
|
||||
|
||||
# Include tools installers
|
||||
include $(ROOT_DIR)/make/tools.mk
|
||||
|
||||
# Set up paths to tools
|
||||
ifeq ($(shell [ -d "$(QT_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
QMAKE := $(QT_SDK_QMAKE_PATH)
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
QMAKE ?= qmake
|
||||
endif
|
||||
|
||||
ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
export ARM_SDK_PREFIX ?= arm-none-eabi-
|
||||
endif
|
||||
|
||||
ifeq ($(shell [ -d "$(OPENOCD_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export OPENOCD := $(OPENOCD_DIR)/bin/openocd
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
export OPENOCD ?= openocd
|
||||
endif
|
||||
|
||||
ifeq ($(shell [ -d "$(ANDROID_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
ANDROID := $(ANDROID_SDK_DIR)/tools/android
|
||||
ANDROID_DX := $(ANDROID_SDK_DIR)/platform-tools/dx
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
ANDROID ?= android
|
||||
ANDROID_DX ?= dx
|
||||
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 +177,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 +222,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 +481,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 +490,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 +499,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)"
|
||||
|
||||
################################
|
||||
#
|
||||
@ -755,7 +721,7 @@ $(foreach ut, $(ALL_UNITTESTS), $(eval $(call UT_TEMPLATE,$(ut))))
|
||||
# output is interleaved with the rest of the make output.
|
||||
ifneq ($(strip $(filter all_ut_run,$(MAKECMDGOALS))),)
|
||||
.NOTPARALLEL:
|
||||
$(info *NOTE* Parallel make disabled by all_ut_run target so we have sane console output)
|
||||
$(info $(EMPTY) NOTE Parallel make disabled by all_ut_run target so we have sane console output)
|
||||
endif
|
||||
|
||||
##############################
|
||||
@ -771,8 +737,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 := \
|
||||
<!DOCTYPE RCC><RCC version="1.0"> \
|
||||
@ -789,8 +755,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
|
||||
|
||||
@ -869,6 +835,8 @@ build-info:
|
||||
#
|
||||
##############################
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@$(ECHO)
|
||||
@ -884,6 +852,12 @@ help:
|
||||
@$(ECHO) " stm32flash_install - Install the stm32flash tool for unbricking F1-based boards"
|
||||
@$(ECHO) " dfuutil_install - Install the dfu-util tool for unbricking F4-based boards"
|
||||
@$(ECHO) " android_sdk_install - Install the Android SDK tools"
|
||||
@$(ECHO) " all_sdk_install - Install all of above (platform-dependent)"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Other tool options are:"
|
||||
@$(ECHO) " <tool>_version - Display <tool> version"
|
||||
@$(ECHO) " <tool>_clean - Remove installed <tool>"
|
||||
@$(ECHO) " <tool>_distclean - Remove downloaded <tool> distribution file(s)"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " [Big Hammer]"
|
||||
@$(ECHO) " all - Generate UAVObjects, build openpilot firmware and gcs"
|
||||
@ -895,7 +869,7 @@ help:
|
||||
@$(ECHO) " all_clean - Remove your build directory ($(BUILD_DIR))"
|
||||
@$(ECHO) " all_flight_clean - Remove all firmware, bootloaders and bootloader updaters"
|
||||
@$(ECHO) " all_fw_clean - Remove firmware for all boards"
|
||||
@$(ECHO) " all_bl_clean - Remove bootlaoders for all boards"
|
||||
@$(ECHO) " all_bl_clean - Remove bootloaders for all boards"
|
||||
@$(ECHO) " all_bu_clean - Remove bootloader updaters for all boards"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " all_<board> - Build all available images for <board>"
|
||||
@ -970,7 +944,7 @@ help:
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Hint: Add V=1 to your command line to see verbose build output."
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Note: All tools will be installed into $(TOOLS_DIR)"
|
||||
@$(ECHO) " All build output will be placed in $(BUILD_DIR)"
|
||||
@$(ECHO) " Package will be placed into $(PACKAGE_DIR)"
|
||||
@$(ECHO) " Notes: All tool distribution files will be downloaded into $(DL_DIR)"
|
||||
@$(ECHO) " All tools will be installed into $(TOOLS_DIR)"
|
||||
@$(ECHO) " All build output will be placed in $(BUILD_DIR)"
|
||||
@$(ECHO)
|
||||
|
@ -12,7 +12,7 @@ LINKER_SCRIPTS_PATH = $(PIOS_DEVLIB)
|
||||
CDEFS += -DSTM32F10X -DSTM32F10X_$(MODEL)
|
||||
CDEFS += -DUSE_STDPERIPH_DRIVER
|
||||
CDEFS += -DARM_MATH_CM3
|
||||
ARCHFLAGS += -mcpu=cortex-m3
|
||||
ARCHFLAGS += -mcpu=cortex-m3 --specs=nano.specs
|
||||
|
||||
# Board-specific startup files
|
||||
ASRC += $(PIOS_DEVLIB)startup_stm32f10x_$(MODEL)$(MODEL_SUFFIX).S
|
||||
|
@ -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 <top>/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 <top>/build/ground
|
||||
#
|
||||
# <top> = 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 <top>/build
|
||||
# Here <top> = 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
|
||||
|
@ -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}.")
|
||||
|
@ -6,15 +6,21 @@ SUBDIRS = openpilotgcs/translations
|
||||
DATACOLLECTIONS = dials models pfd sounds diagrams mapicons stylesheets default_configurations
|
||||
|
||||
equals(copydata, 1) {
|
||||
for(dir, DATACOLLECTIONS) {
|
||||
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) {
|
||||
macx:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
||||
win32:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
||||
unix:data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
||||
unix:data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
||||
}
|
||||
}
|
||||
|
||||
for(dir, DATACOLLECTIONS) {
|
||||
exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) {
|
||||
# Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used
|
||||
# reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator).
|
||||
# So undocumented QMAKE_SH variable is used to find out the real environment.
|
||||
!isEmpty(QMAKE_SH) {
|
||||
# sh environment (including Windows bash)
|
||||
data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
||||
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline()
|
||||
} else {
|
||||
# native Windows cmd environment
|
||||
data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline()
|
||||
}
|
||||
}
|
||||
}
|
||||
data_copy.target = FORCE
|
||||
QMAKE_EXTRA_TARGETS += data_copy
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <QPainter>
|
||||
#include <extensionsystem/pluginspec.h>
|
||||
|
||||
#include "../../../../build/ground/openpilotgcs/gcsversioninfo.h"
|
||||
#include "../gcs_version_info.h"
|
||||
|
||||
class GCSSplashScreen : public QSplashScreen
|
||||
{
|
||||
|
@ -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\" \
|
||||
|
6
ground/openpilotgcs/src/gcs_version_info.h
Normal file
6
ground/openpilotgcs/src/gcs_version_info.h
Normal file
@ -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"
|
@ -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"
|
||||
|
||||
|
@ -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 <QtGui/QDialog>
|
||||
|
||||
|
@ -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.
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <extensionsystem/iplugin.h>
|
||||
#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
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
}
|
||||
|
@ -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 <coreplugin/coreconstants.h>
|
||||
#include <QDebug>
|
||||
#include "flightstatus.h"
|
||||
|
@ -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
|
@ -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 {
|
||||
|
209
make/tools.mk
209
make/tools.mk
@ -1,11 +1,162 @@
|
||||
###############################################################
|
||||
#
|
||||
# Installers for tools required by the ground and flight builds
|
||||
# Installers for tools required by the OpenPilot build system.
|
||||
# Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org
|
||||
#
|
||||
# NOTE: These are not tied to the default goals
|
||||
# and must be invoked manually
|
||||
# NOTE: install targets are not tied to the default goals and must
|
||||
# be invoked manually. But tool paths set by this file are used
|
||||
# across the build system.
|
||||
#
|
||||
###############################################################
|
||||
# Ready to use:
|
||||
# arm_sdk_install
|
||||
#
|
||||
# TODO:
|
||||
# wget_win_install
|
||||
# make_win_install
|
||||
# qt_sdk_install
|
||||
# openocd_install
|
||||
# ftd2xx_install
|
||||
# libusb_win_install
|
||||
# openocd_git_win_install
|
||||
# openocd_git_install
|
||||
# stm32flash_install
|
||||
# dfuutil_install
|
||||
# android_sdk_install
|
||||
# gtest_install
|
||||
#
|
||||
# TODO:
|
||||
# help in the top Makefile
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ifndef OPENPILOT_IS_COOL
|
||||
$(error $(notdir $(lastword $(MAKEFILE_LIST))) should be included by the top level Makefile)
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# Toolchain URLs and directories
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Linux)
|
||||
ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-linux.tar.bz2
|
||||
else ifeq ($(UNAME), Darwin)
|
||||
ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-mac.tar.bz2
|
||||
else ifeq ($(UNAME), Windows)
|
||||
ARM_SDK_URL := http://wiki.openpilot.org/download/attachments/18612236/gcc-arm-none-eabi-4_7-2013q1-20130313-windows.tar.bz2
|
||||
endif
|
||||
|
||||
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_7-2013q1
|
||||
|
||||
##############################
|
||||
#
|
||||
# All toolchains available for the platform
|
||||
#
|
||||
##############################
|
||||
|
||||
ALL_SDK_TARGETS := arm_sdk
|
||||
|
||||
.PHONY: all_sdk_install all_sdk_clean all_sdk_distclean all_sdk_version
|
||||
all_sdk_install: $(addsuffix _install,$(ALL_SDK_TARGETS))
|
||||
all_sdk_clean: $(addsuffix _clean,$(ALL_SDK_TARGETS))
|
||||
all_sdk_distclean: $(addsuffix _distclean,$(ALL_SDK_TARGETS))
|
||||
all_sdk_version: $(addsuffix _version,$(ALL_SDK_TARGETS))
|
||||
|
||||
##############################
|
||||
#
|
||||
# Misc settings
|
||||
#
|
||||
##############################
|
||||
|
||||
# Define messages
|
||||
MSG_DOWNLOADING = $(QUOTE) DOWNLOAD $(QUOTE)
|
||||
MSG_EXTRACTING = $(QUOTE) EXTRACT $(QUOTE)
|
||||
MSG_INSTALLING = $(QUOTE) INSTALL $(QUOTE)
|
||||
MSG_CLEANING = $(QUOTE) CLEAN $(QUOTE)
|
||||
MSG_DISTCLEANING = $(QUOTE) DISTCLEAN $(QUOTE)
|
||||
|
||||
# Verbosity level
|
||||
ifeq ($(V), 1)
|
||||
CURL_OPTIONS :=
|
||||
else
|
||||
# CURL_OPTIONS := --silent
|
||||
endif
|
||||
|
||||
# MSYS tar workaround
|
||||
ifeq ($(UNAME), Windows)
|
||||
TAR_OPTIONS := --force-local
|
||||
else
|
||||
TAR_OPTIONS :=
|
||||
endif
|
||||
|
||||
# Disable parallel make for sdk install targets to ensure ordered dependences
|
||||
# like 'arm_sdk_clean | $(DL_DIR) $(TOOLS_DIR)'. They may fail otherwise being
|
||||
# run in parallel
|
||||
ifneq ($(strip $(filter $(addsuffix _install,all_sdk $(ALL_SDK_TARGETS)),$(MAKECMDGOALS))),)
|
||||
.NOTPARALLEL:
|
||||
$(info $(EMPTY) NOTE Parallel make disabled by some of sdk install targets)
|
||||
$(info $(EMPTY) NOTE If some of install/extract targets failed, try 'make *_distclean' first)
|
||||
$(info $(EMPTY) NOTE Use all_sdk_version to check toolchain versions)
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# ARM SDK
|
||||
#
|
||||
##############################
|
||||
|
||||
ARM_SDK_FILE := $(notdir $(ARM_SDK_URL))
|
||||
|
||||
.PHONY: arm_sdk_install
|
||||
arm_sdk_install: arm_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
|
||||
@$(ECHO) $(MSG_DOWNLOADING) $(call toprel, $(DL_DIR)/$(ARM_SDK_FILE))
|
||||
$(V1) $(CURL) $(CURL_OPTIONS) \
|
||||
$(if $(shell [ -f "$(DL_DIR)/$(ARM_SDK_FILE)" ] && $(ECHO) "exists"),-z "$(DL_DIR)/$(ARM_SDK_FILE)",) \
|
||||
-o "$(DL_DIR)/$(ARM_SDK_FILE)" \
|
||||
"$(ARM_SDK_URL)"
|
||||
@$(ECHO) $(MSG_EXTRACTING) $(call toprel, $(ARM_SDK_DIR))
|
||||
$(V1) $(TAR) $(TAR_OPTIONS) -C $(call toprel, $(TOOLS_DIR)) -xjf $(call toprel, $(DL_DIR)/$(ARM_SDK_FILE))
|
||||
|
||||
.PHONY: arm_sdk_clean
|
||||
arm_sdk_clean:
|
||||
@$(ECHO) $(MSG_CLEANING) $(call toprel, $(ARM_SDK_DIR))
|
||||
$(V1) [ ! -d "$(ARM_SDK_DIR)" ] || $(RM) -r "$(ARM_SDK_DIR)"
|
||||
|
||||
.PHONY: arm_sdk_distclean
|
||||
arm_sdk_distclean:
|
||||
@$(ECHO) $(MSG_DISTCLEANING) $(call toprel, $@)
|
||||
$(V1) [ ! -f "$(DL_DIR)/$(ARM_SDK_FILE)" ] || $(RM) "$(DL_DIR)/$(ARM_SDK_FILE)"
|
||||
|
||||
.PHONY: arm_sdk_version
|
||||
arm_sdk_version:
|
||||
$(V1) $(ARM_SDK_PREFIX)gcc --version | head -n1
|
||||
|
||||
ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
# $(info $(EMPTY) WARNING $(call toprel, $(ARM_SDK_DIR)) not found (make arm_sdk_install), using system PATH)
|
||||
export ARM_SDK_PREFIX ?= arm-none-eabi-
|
||||
endif
|
||||
|
||||
##############################
|
||||
#
|
||||
# TODO: code below is not revised yet
|
||||
#
|
||||
##############################
|
||||
|
||||
# Set up QT toolchain
|
||||
QT_SDK_DIR := $(TOOLS_DIR)/qtsdk-v1.2.1
|
||||
@ -44,24 +195,6 @@ qt_sdk_install: qt_sdk_clean
|
||||
qt_sdk_clean:
|
||||
$(V1) [ ! -d "$(QT_SDK_DIR)" ] || $(RM) -rf $(QT_SDK_DIR)
|
||||
|
||||
# Set up ARM (STM32) SDK
|
||||
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_6-2012q4
|
||||
|
||||
.PHONY: arm_sdk_install
|
||||
arm_sdk_install: ARM_SDK_URL := https://launchpad.net/gcc-arm-embedded/4.6/4.6-2012-q4-update/+download/gcc-arm-none-eabi-4_6-2012q4-20121016.tar.bz2
|
||||
arm_sdk_install: ARM_SDK_FILE := $(notdir $(ARM_SDK_URL))
|
||||
# order-only prereq on directory existance:
|
||||
arm_sdk_install: | $(DL_DIR) $(TOOLS_DIR)
|
||||
arm_sdk_install: arm_sdk_clean
|
||||
# download the source only if it's newer than what we already have
|
||||
$(V1) $(WGET) --no-check-certificate -N -P "$(DL_DIR)" "$(ARM_SDK_URL)"
|
||||
|
||||
# binary only release so just extract it
|
||||
$(V1) tar -C $(TOOLS_DIR) -xjf "$(DL_DIR)/$(ARM_SDK_FILE)"
|
||||
|
||||
.PHONY: arm_sdk_clean
|
||||
arm_sdk_clean:
|
||||
$(V1) [ ! -d "$(ARM_SDK_DIR)" ] || $(RM) -r $(ARM_SDK_DIR)
|
||||
|
||||
# Set up openocd tools
|
||||
OPENOCD_DIR := $(TOOLS_DIR)/openocd
|
||||
@ -340,3 +473,33 @@ gtest_install: gtest_clean
|
||||
gtest_clean:
|
||||
$(V0) @echo " CLEAN $(GTEST_DIR)"
|
||||
$(V1) [ ! -d "$(GTEST_DIR)" ] || $(RM) -rf "$(GTEST_DIR)"
|
||||
|
||||
##############################
|
||||
#
|
||||
# TODO: these defines will go to tool install sections
|
||||
#
|
||||
##############################
|
||||
|
||||
# Set up paths to tools
|
||||
ifeq ($(shell [ -d "$(QT_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
QMAKE := $(QT_SDK_QMAKE_PATH)
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
QMAKE ?= qmake
|
||||
endif
|
||||
|
||||
ifeq ($(shell [ -d "$(OPENOCD_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
export OPENOCD := $(OPENOCD_DIR)/bin/openocd
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
export OPENOCD ?= openocd
|
||||
endif
|
||||
|
||||
ifeq ($(shell [ -d "$(ANDROID_SDK_DIR)" ] && $(ECHO) "exists"), exists)
|
||||
ANDROID := $(ANDROID_SDK_DIR)/tools/android
|
||||
ANDROID_DX := $(ANDROID_SDK_DIR)/platform-tools/dx
|
||||
else
|
||||
# not installed, hope it's in the path...
|
||||
ANDROID ?= android
|
||||
ANDROID_DX ?= dx
|
||||
endif
|
||||
|
@ -15,6 +15,10 @@ rem Based on the msys.bat file from the MSYS package
|
||||
rem http://www.mingw.org/wiki/msys
|
||||
rem
|
||||
|
||||
rem Shared directories for toolchains
|
||||
rem set OPENPILOT_DL_DIR=C:/OpenPilot/downloads
|
||||
rem set OPENPILOT_TOOLS_DIR=C:/OpenPilot/tools
|
||||
|
||||
rem this should let run MSYS shell on x64
|
||||
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
|
||||
SET COMSPEC=%WINDIR%\SysWOW64\cmd.exe
|
||||
@ -53,13 +57,13 @@ rem --------------------------------------------------------------------------
|
||||
set NOT_FOUND=
|
||||
set PATH_DIRS=
|
||||
|
||||
call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe
|
||||
call :which QTMINGW "C:\QtSDK\mingw\bin" mingw32-make.exe
|
||||
call :which QTSDK "C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin" qmake.exe
|
||||
call :which CODESOURCERY "%ProgramFiles%\CodeSourcery\Sourcery G++ Lite\bin" cs-make.exe
|
||||
call :which PYTHON "C:\Python27" python.exe
|
||||
call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe
|
||||
call :which OPENOCDBIN "C:\OpenOCD\0.4.0\bin" openocd.exe
|
||||
rem Replace %ProgramFiles% by %ProgramFiles(x86)% for 64bit system
|
||||
call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe
|
||||
call :which QTMINGW "C:\QtSDK\mingw\bin" mingw32-make.exe
|
||||
call :which QTSDK "C:\QtSDK\Desktop\Qt\4.8.1\mingw\bin" qmake.exe
|
||||
call :which ARMGCC "C:\OpenPilot\gcc-arm-none-eabi-4_6-2012q4\bin" arm-none-eabi-gcc.exe
|
||||
call :which PYTHON "C:\Python27" python.exe
|
||||
call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe
|
||||
|
||||
if "%NOT_FOUND%" == "" goto set_path
|
||||
|
||||
|
@ -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:
|
||||
|
@ -33,11 +33,10 @@ install:
|
||||
dh_installdirs
|
||||
dh_installudev --priority=45
|
||||
# Add here commands to install the package into debian/<packagename>
|
||||
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
|
||||
|
@ -4,25 +4,38 @@ 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_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"
|
||||
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"
|
||||
|
||||
OSG_EXTRA="libosgViewer.90.dylib"
|
||||
|
||||
if [ -z "${QT_DIR}" ]
|
||||
then
|
||||
# QT_DIR is empty, then we have (presumably):
|
||||
QT_FRAMEWORKS="/Library/Frameworks"
|
||||
QT_PLUGINS="/Developer/Applications/Qt/plugins"
|
||||
else
|
||||
# Typical Nokia SDK paths
|
||||
QT_FRAMEWORKS="${QT_DIR}"
|
||||
QT_PLUGINS="${QT_DIR}/../plugins"
|
||||
QT_DIR="${QT_DIR}/"
|
||||
fi
|
||||
|
||||
echo "Qt library directory is \"${QT_DIR}\""
|
||||
|
||||
echo "Running macdeployqt"
|
||||
macdeployqt "${APP}"
|
||||
|
||||
echo "Processing Qt libraries in $1"
|
||||
echo "Processing Qt libraries in ${APP}"
|
||||
for f in "${PLUGINS}/"*.dylib "${OP_PLUGINS}/"*.dylib
|
||||
do
|
||||
for g in $QT_LIBS
|
||||
# Only process plain files
|
||||
[ ! -L "${f}" ] && for g in $QT_LIBS
|
||||
do
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}/${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${f}"
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${f}"
|
||||
done
|
||||
done
|
||||
|
||||
@ -31,70 +44,71 @@ echo "Copying other libraries that were missed"
|
||||
for f in ${QT_LIBS}
|
||||
do
|
||||
echo "Copying ${f}"
|
||||
cp -r "${QT_DIR}/${f}.framework" "${APP}/Contents/Frameworks/"
|
||||
cp -a "${QT_FRAMEWORKS}/${f}.framework" "${APP}/Contents/Frameworks/"
|
||||
|
||||
echo "Changing package identification of ${f}"
|
||||
install_name_tool -id \
|
||||
@executable_path/../Frameworks/${f}.framework/Versions/4/${f} \
|
||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
||||
@executable_path/../Frameworks/${f}.framework/Versions/4/${f} \
|
||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
||||
|
||||
rm "${APP}/Contents/Frameworks/${f}.framework/${f}"
|
||||
|
||||
echo "Changing package linkages"
|
||||
for g in $QT_LIBS
|
||||
do
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}/${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${APP}/Contents/Frameworks/${f}.framework/Versions/4/${f}"
|
||||
done
|
||||
done
|
||||
|
||||
for f in ${QT_EXTRA}
|
||||
do
|
||||
echo "Copying package ${f}"
|
||||
cp "${QT_DIR}/../plugins/${f}" "${APP}/Contents/Plugins/${f}"
|
||||
echo "Changing package identification of ${f}"
|
||||
install_name_tool -id \
|
||||
@executable_path/../Plugins/${f} \
|
||||
"${PLUGINS}/${f}"
|
||||
|
||||
echo "Changing package linkages"
|
||||
for g in $QT_LIBS
|
||||
do
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}/${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${APP}/Contents/Plugins/${f}"
|
||||
done
|
||||
echo "Copying package ${f}"
|
||||
d=$(dirname ${f})
|
||||
[ ! -d "${APP}/Contents/Plugins/${d}" ] && mkdir "${APP}/Contents/Plugins/${d}"
|
||||
cp "${QT_PLUGINS}/${f}" "${APP}/Contents/Plugins/${f}"
|
||||
echo "Changing package identification of ${f}"
|
||||
install_name_tool -id \
|
||||
@executable_path/../Plugins/${f} \
|
||||
"${PLUGINS}/${f}"
|
||||
|
||||
echo "Changing package linkages"
|
||||
for g in $QT_LIBS
|
||||
do
|
||||
install_name_tool -change \
|
||||
"${QT_DIR}${g}.framework/Versions/4/${g}" \
|
||||
@executable_path/../Frameworks/${g}.framework/Versions/4/${g} \
|
||||
"${APP}/Contents/Plugins/${f}"
|
||||
done
|
||||
done
|
||||
|
||||
echo "Copying SDL"
|
||||
cp -r "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"
|
||||
cp -a "/Library/Frameworks/SDL.framework" "${APP}/Contents/Frameworks/"
|
||||
|
||||
echo "Changing package identification of SDL"
|
||||
install_name_tool -id \
|
||||
@executable_path/../Frameworks/SDL.framework/SDL \
|
||||
"${APP}/Contents/Frameworks/SDL.framework/SDL"
|
||||
@executable_path/../Frameworks/SDL.framework/SDL \
|
||||
"${APP}/Contents/Frameworks/SDL.framework/SDL"
|
||||
install_name_tool -change \
|
||||
@rpath/SDL.framework/Versions/A/SDL \
|
||||
"@executable_path/../Frameworks/SDL.framework/SDL" \
|
||||
"${APP}/Contents/Plugins/libsdlgamepad.1.dylib"
|
||||
@rpath/SDL.framework/Versions/A/SDL \
|
||||
"@executable_path/../Frameworks/SDL.framework/SDL" \
|
||||
"${APP}/Contents/Plugins/libsdlgamepad.1.dylib"
|
||||
|
||||
# echo "Copying OSG libraries"
|
||||
# for f in ${OSG_EXTRA}
|
||||
# do
|
||||
# echo "Copying library ${f}"
|
||||
# cp /usr/local/lib/{$f} "${APP}/Contents/Plugins/${f}"
|
||||
# echo "Changing package identification of ${f}
|
||||
# install_name_tool -id \
|
||||
# @executable_path/../Frameworks/SDL.framework/Versions/A/SDL \
|
||||
# "${APP}/Contents/Frameworks/SDL.framework/Versions/A/SDL"
|
||||
#done
|
||||
|
||||
# deleting unnecessary files
|
||||
|
||||
echo "Copying OSG libraries"
|
||||
for f in ${OSG_EXTRA}
|
||||
do
|
||||
echo "Copying library ${f}
|
||||
cp /usr/local/lib/{$f} "${APP}/Contents/Plugins/${f}"
|
||||
echo "Changing package identification of ${f}
|
||||
install_name_tool -id \
|
||||
@executable_path/../Frameworks/SDL.framework/Versions/A/SDL \
|
||||
"${APP}/Contents/Frameworks/SDL.framework/Versions/A/SDL"
|
||||
done
|
||||
|
||||
echo "Deleting unnecessary files"
|
||||
find "${APP}/Contents/Frameworks" -iname "current" -exec rm -rf \{\} \;
|
||||
find "${APP}/Contents/Frameworks" -iname "4.0" -exec rm -rf \{\} \;
|
||||
# find "${APP}/Contents/Frameworks" -iname "current" -exec rm -rf \{\} \;
|
||||
# find "${APP}/Contents/Frameworks" -iname "4.0" -exec rm -rf \{\} \;
|
||||
find "${APP}/Contents/Frameworks" -iname "*_debug" -exec rm -rf \{\} \;
|
||||
|
@ -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"
|
||||
@ -14,18 +14,18 @@ rm -f "${TEMP_FILE}"
|
||||
rm -f "${OUT_FILE}"
|
||||
|
||||
hdiutil convert "${ROOT_DIR}/package/osx/OpenPilot.dmg" \
|
||||
-format UDRW -o "${TEMP_FILE}"
|
||||
device=$(hdiutil attach "${TEMP_FILE}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
-format UDRW -o "${TEMP_FILE}"
|
||||
device=$(hdiutil attach "${TEMP_FILE}" | \
|
||||
egrep '^/dev/' | sed 1q | awk '{print $1}')
|
||||
|
||||
# packaging goes here
|
||||
cp -r "${APP_PATH}" "/Volumes/${VOL_NAME}"
|
||||
cp -a "${APP_PATH}" "/Volumes/${VOL_NAME}"
|
||||
ls "${FW_DIR}" | xargs -n 1 -I {} cp "${FW_DIR}/{}" "/Volumes/${VOL_NAME}/Firmware"
|
||||
cp "${BUILD_DIR}/uavobject-synthetics/matlab/OPLogConvert.m" "/Volumes/${VOL_NAME}/Utilities"
|
||||
cp "${ROOT_DIR}/HISTORY.txt" "/Volumes/${VOL_NAME}"
|
||||
|
||||
"${ROOT_DIR}/package/osx/libraries" \
|
||||
"/Volumes/${VOL_NAME}/OpenPilot GCS.app" || exit 1
|
||||
"/Volumes/${VOL_NAME}/OpenPilot GCS.app" || exit 1
|
||||
|
||||
hdiutil detach ${device}
|
||||
|
||||
|
@ -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}"
|
||||
|
@ -3,7 +3,7 @@
|
||||
<description>Battery status information.</description>
|
||||
<field name="Voltage" units="V" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="Current" units="A" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="BoardSupplyVoltage"units="V" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="BoardSupplyVoltage" units="V" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="PeakCurrent" units="A" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="AvgCurrent" units="A" type="float" elements="1" defaultvalue="0.0"/>
|
||||
<field name="ConsumedEnergy" units="mAh" type="float" elements="1" defaultvalue="0.0"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user