diff --git a/Makefile b/Makefile index 3d8b4542a..0b5c4457c 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ # existance by each sub-make. export TOP_LEVEL_MAKEFILE := TRUE -# It is possible to set OPENPILOT_DL_DIR and/or OPENPILOT_TOOLS_DIR environment +# It is possible to set DL_DIR and/or 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. @@ -43,11 +43,14 @@ 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 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 PACKAGE_DIR := $(ROOT_DIR)/build/package export DIST_DIR := $(ROOT_DIR)/build/dist +override DL_DIR := $(if $(DL_DIR),$(call slashfix,$(DL_DIR)),$(ROOT_DIR)/downloads) +override TOOLS_DIR := $(if $(TOOLS_DIR),$(call slashfix,$(TOOLS_DIR)),$(ROOT_DIR)/tools) + +export DL_DIR +export TOOLS_DIR DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) @@ -1033,7 +1036,7 @@ help: @$(ECHO) " All build output will be placed in $(BUILD_DIR)" @$(ECHO) @$(ECHO) " Tool download and install directories can be changed using environment variables:" - @$(ECHO) " OPENPILOT_DL_DIR full path to downloads directory [downloads if not set]" - @$(ECHO) " OPENPILOT_TOOLS_DIR full path to installed tools directory [tools if not set]" + @$(ECHO) " DL_DIR full path to downloads directory [downloads if not set]" + @$(ECHO) " TOOLS_DIR full path to installed tools directory [tools if not set]" @$(ECHO) " More info: http://wiki.openpilot.org/display/Doc/OpenPilot+Build+System+Overview" @$(ECHO) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index caecdbf50..826d8811c 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -118,13 +118,8 @@ isEmpty(GCS_BUILD_TREE) { # Find the tools directory, # try from Makefile (not run by Qt Creator), -TOOLS_DIR = $$(TOOLS_DIR) -isEmpty(TOOLS_DIR) { - # check for custom enviroment variable, - TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) - # fallback to default location. - isEmpty(TOOLS_DIR):TOOLS_DIR = $$clean_path($$ROOT_DIR/tools) -} +isEmtpy(TOOLS_DIR):TOOLS_DIR = $$(TOOLS_DIR) +isEmtpy(TOOLS_DIR):TOOLS_DIR = $$clean_path($$ROOT_DIR/tools) # Set the default name of the application isEmpty(GCS_SMALL_NAME):GCS_SMALL_NAME = gcs diff --git a/ground/openpilotgcs/src/python.pri b/ground/openpilotgcs/src/python.pri index 5835bcbf8..0476fae2a 100644 --- a/ground/openpilotgcs/src/python.pri +++ b/ground/openpilotgcs/src/python.pri @@ -4,9 +4,9 @@ PYTHON_DIR = qt-5.4.1/Tools/mingw491_32/opt/bin # Search the python using environment override first -OPENPILOT_TOOLS_DIR = $$(OPENPILOT_TOOLS_DIR) -!isEmpty(OPENPILOT_TOOLS_DIR):exists($$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python*) { - PYTHON = \"$$OPENPILOT_TOOLS_DIR/$$PYTHON_DIR/python\" +TOOLS_DIR = $$(TOOLS_DIR) +!isEmpty(TOOLS_DIR):exists($$TOOLS_DIR/$$PYTHON_DIR/python*) { + PYTHON = \"$$TOOLS_DIR/$$PYTHON_DIR/python\" } else { # If not found, search the predefined tools path exists($$ROOT_DIR/tools/$$PYTHON_DIR/python*) { diff --git a/make/winx86/cmd/sh.cmd b/make/winx86/cmd/sh.cmd index dbffc479c..053ec3238 100644 --- a/make/winx86/cmd/sh.cmd +++ b/make/winx86/cmd/sh.cmd @@ -16,8 +16,8 @@ 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 set DL_DIR=C:/LibrePilot/downloads +rem set TOOLS_DIR=C:/LibrePilot/tools rem this should let run MSYS shell on x64 if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( diff --git a/package/Linux.mk b/package/Linux.mk index 13dc27b58..40b32bb23 100644 --- a/package/Linux.mk +++ b/package/Linux.mk @@ -78,7 +78,7 @@ $(DEB_PACKAGE_DIR): $(DEB_ORIG_SRC) debian | $(PACKAGE_DIR) endif # Debian based distro? ############################## # -# Install OpenPilot +# Install Linux Target # ############################## enable-udev-rules ?= no @@ -104,9 +104,11 @@ install: $(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/lib/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir) $(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir) $(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/gcs.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop - $(V1) sed -i -e 's/gcs/$(GCS_SMALL_NAME)/g;s/GCS/$(GCS_BIG_NAME)/g;s/org/$(ORG_SMALL_NAME)/g;s/ORG/$(ORG_BIG_NAME)/g' $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop + $(V1) $(INSTALL) -T $(ROOT_DIR)/ground/openpilotgcs/src/plugins/coreplugin/images/$(ORG_SMALL_NAME)_logo_128.png \ + $(DESTDIR)$(datadir)/pixmaps/$(ORG_SMALL_NAME).png - $(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/openpilot.png $(DESTDIR)$(datadir)/pixmaps/$(ORG_SMALL_NAME).png + $(V1) sed -i -e 's/gcs/$(GCS_SMALL_NAME)/g;s/GCS/$(GCS_BIG_NAME)/g;s/org/$(ORG_SMALL_NAME)/g;s/ORG/$(ORG_BIG_NAME)/g' \ + $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop ifneq ($(enable-udev-rules), no) $(V1) $(MKDIR) -p $(DESTDIR)$(udevrulesdir) diff --git a/package/linux/openpilot.png b/package/linux/openpilot.png deleted file mode 100644 index e9c4ee868..000000000 Binary files a/package/linux/openpilot.png and /dev/null differ