mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
following op-11400 qt 531 upgrade branch. Recommit mac tools.mk changes
This commit is contained in:
parent
2e7eea7383
commit
7cd4164358
@ -76,7 +76,12 @@ ifeq ($(UNAME), Linux)
|
||||
else ifeq ($(UNAME), Darwin)
|
||||
ARM_SDK_URL := https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-mac.tar.bz2
|
||||
ARM_SDK_MD5_URL:= https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-mac.tar.bz2/+md5
|
||||
QT_SDK_URL := "Please install native Qt 5.3.x SDK using package manager"
|
||||
QT_SDK_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-mac-x64-clang-5.3.1.dmg
|
||||
QT_SDK_MD5_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-mac-x64-clang-5.3.1.dmg.md5
|
||||
QT_SDK_ARCH := clang_64
|
||||
QT_SDK_MAINTENANCE_TOOL := /Volumes/qt-opensource-mac-x64-clang-5.3.1/qt-opensource-mac-x64-clang-5.3.1.app/Contents/MacOS/qt-opensource-mac-x64-clang-5.3.1
|
||||
QT_SDK_MOUNT_DIR := /Volumes/qt-opensource-mac-x64-clang-5.3.1
|
||||
QT_SDK_INSTALLER_DAT := /Volumes/qt-opensource-mac-x64-clang-5.3.1/qt-opensource-mac-x64-clang-5.3.1.app/Contents/Resources/installer.dat
|
||||
UNCRUSTIFY_URL := http://wiki.openpilot.org/download/attachments/18612236/uncrustify-0.60.tar.gz
|
||||
DOXYGEN_URL := http://wiki.openpilot.org/download/attachments/18612236/doxygen-1.8.3.1.src.tar.gz
|
||||
else ifeq ($(UNAME), Windows)
|
||||
@ -467,6 +472,79 @@ qt_sdk_distclean:
|
||||
|
||||
endef
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
# Mac QT install template
|
||||
# $(1) = tool temp extract/build directory
|
||||
# $(2) = tool install directory
|
||||
# $(3) = tool distribution URL
|
||||
# $(4) = tool distribution .md5 URL
|
||||
# $(5) = tool distribution file
|
||||
# $(6) = QT architecture
|
||||
# $(7) = optional extra build recipes template
|
||||
# $(8) = optional extra clean recipes template
|
||||
#
|
||||
##############################
|
||||
|
||||
define MAC_QT_INSTALL_TEMPLATE
|
||||
|
||||
.PHONY: $(addprefix qt_sdk_, install clean distclean)
|
||||
|
||||
qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
|
||||
$(V1) if ! $(SEVENZIP) >/dev/null 2>&1; then \
|
||||
$(ECHO) $(MSG_NOTICE) "Please install the p7zip for your distribution. i.e.: sudo brew install p7zip." && \
|
||||
exit 1; \
|
||||
fi
|
||||
$(call DOWNLOAD_TEMPLATE,$(3),$(5),"$(4)")
|
||||
# Mount .dmg file
|
||||
$(V1) hdiutil attach -nobrowse $(DL_DIR)/$(5)
|
||||
# Explode .dmg file into install packages
|
||||
@$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(1))
|
||||
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(1)))
|
||||
$(V1) $(QT_SDK_MAINTENANCE_TOOL) --dump-binary-data -i $(QT_SDK_INSTALLER_DAT) -o $(1)
|
||||
# Extract packages under tool directory
|
||||
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(2)))
|
||||
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0qt-project-url.7z" | grep -v Extracting
|
||||
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt/5.3.1ThirdPartySoftware_Listing.7z" | grep -v Extracting
|
||||
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0readme.7z" | grep -v Extracting
|
||||
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.$(6)/5.3.1-0qt5_essentials.7z" | grep -v Extracting
|
||||
# $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.$(6).essentials/5.3.1icu_path_patcher.sh.7z" | grep -v Extracting
|
||||
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.$(6)/5.3.1-0qt5_addons.7z" | grep -v Extracting
|
||||
# go to OpenPilot/tools/5.3.1/gcc_64 and call patcher.sh
|
||||
@$(ECHO)
|
||||
@$(ECHO) "Running patcher in" $$(call toprel, $(QT_SDK_PREFIX))
|
||||
$(V1) $(CD) $(QT_SDK_PREFIX)
|
||||
# $(V1) "$(QT_SDK_PREFIX)/patcher.sh" $(QT_SDK_PREFIX)
|
||||
# call qmake patcher
|
||||
@$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX))
|
||||
$(V1) $(QT_SDK_MAINTENANCE_TOOL) --runoperation QtPatch linux $(QT_SDK_PREFIX) qt5
|
||||
|
||||
#Unmount the .dmg file
|
||||
$(V1) hdiutil detach $(QT_SDK_MOUNT_DIR)
|
||||
|
||||
# Execute post build templates
|
||||
$(7)
|
||||
|
||||
# Clean up temporary files
|
||||
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
|
||||
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
|
||||
|
||||
qt_sdk_clean:
|
||||
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
|
||||
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
|
||||
@$(ECHO) $(MSG_CLEANING) $$(call toprel, "$(2)")
|
||||
$(V1) [ ! -d "$(2)" ] || $(RM) -rf "$(2)"
|
||||
|
||||
$(8)
|
||||
|
||||
qt_sdk_distclean:
|
||||
@$(ECHO) $(MSG_DISTCLEANING) $$(call toprel, $(DL_DIR)/$(5))
|
||||
$(V1) [ ! -f "$(DL_DIR)/$(5)" ] || $(RM) "$(DL_DIR)/$(5)"
|
||||
$(V1) [ ! -f "$(DL_DIR)/$(5).md5" ] || $(RM) "$(DL_DIR)/$(5).md5"
|
||||
|
||||
endef
|
||||
|
||||
##############################
|
||||
#
|
||||
# ARM SDK
|
||||
@ -504,8 +582,6 @@ endef
|
||||
#
|
||||
# Qt SDK
|
||||
#
|
||||
# Mac OS X: user should install native Qt SDK package
|
||||
#
|
||||
##############################
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
@ -529,6 +605,12 @@ QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.3/$(QT_SDK_ARCH)"
|
||||
QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD
|
||||
$(eval $(call LINUX_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH)))
|
||||
|
||||
else ifeq ($(UNAME), Darwin)
|
||||
|
||||
QT_SDK_PREFIX := "$(QT_SDK_DIR)/5.3/$(QT_SDK_ARCH)"
|
||||
QT_BUILD_DIR := $(BUILD_DIR)/QT_BUILD
|
||||
$(eval $(call MAC_QT_INSTALL_TEMPLATE,$(QT_BUILD_DIR),$(QT_SDK_DIR),$(QT_SDK_URL),$(QT_SDK_MD5_URL),$(notdir $(QT_SDK_URL)),$(QT_SDK_ARCH)))
|
||||
|
||||
else
|
||||
|
||||
QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user