mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
package: now it is called 'make package' instead of 'make release'
This commit is contained in:
parent
3547e48e4d
commit
3dec910954
6
Makefile
6
Makefile
@ -457,9 +457,9 @@ sim_win32_%: uavobjects_flight
|
||||
|
||||
##############################
|
||||
#
|
||||
# Release packaging components
|
||||
# Packaging components
|
||||
#
|
||||
##############################
|
||||
.PHONY: release
|
||||
release:
|
||||
.PHONY: package
|
||||
package:
|
||||
$(V1) cd $@ && $(MAKE) --no-print-directory $@
|
||||
|
@ -14,9 +14,9 @@ ROOT_DIR := $(realpath $(WHEREAMI)/../)
|
||||
# Set up some macros
|
||||
BUILD_DIR := $(ROOT_DIR)/build
|
||||
VERSION_CMD := python $(ROOT_DIR)/make/scripts/version-info.py --path="$(ROOT_DIR)"
|
||||
RELEASE_LBL := $(shell $(VERSION_CMD) --format=\$${DATE}-\$${TAG_OR_HASH8}\$${DIRTY})
|
||||
RELEASE_DIR := $(BUILD_DIR)/release-$(RELEASE_LBL)
|
||||
FW_DIR := $(RELEASE_DIR)/firmware-$(RELEASE_LBL)
|
||||
PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${DATE}-\$${TAG_OR_HASH8}\$${DIRTY})
|
||||
PACKAGE_DIR := $(BUILD_DIR)/package-$(PACKAGE_LBL)
|
||||
FW_DIR := $(PACKAGE_DIR)/firmware-$(PACKAGE_LBL)
|
||||
BL_DIR := $(FW_DIR)/bootloaders
|
||||
BU_DIR := $(FW_DIR)/bootloader-updaters
|
||||
FE_DIR := $(FW_DIR)/flash-erase-tools
|
||||
@ -52,11 +52,11 @@ help:
|
||||
@echo " Here is a summary of the available targets:"
|
||||
@echo
|
||||
@echo " [Packaging]"
|
||||
@echo " release - Build and package the OpenPilot distributable"
|
||||
@echo " release_flight - Build and package the OpenPilot flight firmware only"
|
||||
@echo " package - Build and package the OpenPilot distributable"
|
||||
@echo " package_flight - Build and package the OpenPilot flight firmware only"
|
||||
@echo
|
||||
@echo " Notes:"
|
||||
@echo " - package will be placed in $(RELEASE_DIR)"
|
||||
@echo " - package will be placed in $(PACKAGE_DIR)"
|
||||
@echo
|
||||
@echo " - the build directory will be removed first on every run unless one"
|
||||
@echo " of CLEAN_BUILD=NO or CLEAN_BUILD=NEVER options is defined."
|
||||
@ -101,19 +101,19 @@ endif
|
||||
endef
|
||||
|
||||
# Firmware for different input drivers
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_common,uavobjects,$(FW_DIR),,-$(RELEASE_LBL),,,$(FW_TARGETS_COMMON),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_pwm,uavobjects,$(FW_DIR),,-pwm-$(RELEASE_LBL),,clean,$(FW_TARGETS_INPUT),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_spektrum,uavobjects,$(FW_DIR),,-spektrum-$(RELEASE_LBL),USE_SPEKTRUM=YES,clean,$(FW_TARGETS_INPUT),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_ppm,uavobjects,$(FW_DIR),,-ppm-$(RELEASE_LBL),USE_PPM=YES,clean,$(FW_TARGETS_INPUT),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_common,uavobjects,$(FW_DIR),,-$(PACKAGE_LBL),,,$(FW_TARGETS_COMMON),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_pwm,uavobjects,$(FW_DIR),,-pwm-$(PACKAGE_LBL),,clean,$(FW_TARGETS_INPUT),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_spektrum,uavobjects,$(FW_DIR),,-spektrum-$(PACKAGE_LBL),USE_SPEKTRUM=YES,clean,$(FW_TARGETS_INPUT),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_ppm,uavobjects,$(FW_DIR),,-ppm-$(PACKAGE_LBL),USE_PPM=YES,clean,$(FW_TARGETS_INPUT),install))
|
||||
|
||||
# Bootloaders (change 'install' to 'bin' if you don't want to install bootloaders)
|
||||
$(eval $(call INSTALL_TEMPLATE,all_bl,uavobjects,$(BL_DIR),,-$(RELEASE_LBL),,,$(BL_TARGETS),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,all_bl,uavobjects,$(BL_DIR),,-$(PACKAGE_LBL),,,$(BL_TARGETS),install))
|
||||
|
||||
# Bootloader updaters
|
||||
$(eval $(call INSTALL_TEMPLATE,all_bu,all_bl,$(BU_DIR),,-$(RELEASE_LBL),,,$(BU_TARGETS),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,all_bu,all_bl,$(BU_DIR),,-$(PACKAGE_LBL),,,$(BU_TARGETS),install))
|
||||
|
||||
# CopterControl flash eraser tool
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_tools,uavobjects,$(FE_DIR),,-flash-erase-$(RELEASE_LBL),ERASE_FLASH=YES,clean,$(FW_TARGETS_TOOLS),install))
|
||||
$(eval $(call INSTALL_TEMPLATE,fw_tools,uavobjects,$(FE_DIR),,-flash-erase-$(PACKAGE_LBL),ERASE_FLASH=YES,clean,$(FW_TARGETS_TOOLS),install))
|
||||
|
||||
# Order-only dependencies
|
||||
# They are bit complicated to support parallel (-j) builds and to create
|
||||
@ -127,17 +127,17 @@ fw_ppm: | fw_spektrum # ordered build
|
||||
|
||||
fw_tools: | fw_spektrum # ordered build, replace fw_spektrum by fw_ppm if uncommented below
|
||||
|
||||
release_fw: | fw_common fw_pwm fw_spektrum # fw_ppm
|
||||
package_fw: | fw_common fw_pwm fw_spektrum # fw_ppm
|
||||
|
||||
release_bu: | all_bu
|
||||
package_bu: | all_bu
|
||||
|
||||
release_flight: | release_fw release_bu fw_tools
|
||||
package_flight: | package_fw package_bu fw_tools
|
||||
|
||||
release_ground: | ground_package
|
||||
package_ground: | ground_package
|
||||
|
||||
release: | release_flight release_ground
|
||||
package: | package_flight package_ground
|
||||
|
||||
.PHONY: help uavobjects all_clean release release_flight release_fw release_bu release_ground
|
||||
.PHONY: help uavobjects all_clean package package_flight package_fw package_bu package_ground
|
||||
|
||||
# Decide on a verbosity level based on the V= parameter
|
||||
export AT := @
|
20
package/Makefile.osx
Normal file
20
package/Makefile.osx
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# MacOSX-specific packaging
|
||||
#
|
||||
|
||||
osx_package: gcs package_flight
|
||||
( \
|
||||
ROOT_DIR="$(ROOT_DIR)" \
|
||||
BUILD_DIR="$(BUILD_DIR)" \
|
||||
PACKAGE_LBL="$(PACKAGE_LBL)" \
|
||||
PACKAGE_DIR="$(PACKAGE_DIR)" \
|
||||
FW_DIR="$(FW_DIR)" \
|
||||
"$(ROOT_DIR)/package/osx/package" \
|
||||
)
|
||||
|
||||
gcs: uavobjects
|
||||
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
|
||||
|
||||
ground_package: | osx_package
|
||||
|
||||
.PHONY: gcs ground_package osx_package
|
@ -4,19 +4,22 @@
|
||||
|
||||
NSIS_CMD := makensis.exe
|
||||
NSIS_OPTS := /V3
|
||||
NSIS_DIR := $(ROOT_DIR)/release/winx86
|
||||
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
|
||||
|
||||
package: gcs release_flight
|
||||
mkdir -p "$(dir $(NSIS_HEADER))"
|
||||
win_package: gcs package_flight
|
||||
$(V1) mkdir -p "$(dir $(NSIS_HEADER))"
|
||||
$(VERSION_CMD) --template="$(NSIS_TEMPLATE)" --outfile="$(NSIS_HEADER)"
|
||||
$(V1) echo "Building Windows installer, please wait..."
|
||||
$(V1) echo "If you have a script error in line 1 - use Unicode NSIS 2.46+"
|
||||
$(V1) echo " http://www.scratchpaper.com"
|
||||
$(NSIS_CMD) $(NSIS_OPTS) $(NSIS_SCRIPT)
|
||||
|
||||
gcs: uavobjects
|
||||
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
|
||||
|
||||
ground_package: | package
|
||||
ground_package: | win_package
|
||||
|
||||
.PHONY: gcs ground_package package
|
||||
.PHONY: gcs ground_package win_package
|
@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# the following environment variables must be set
|
||||
: ${ROOT_DIR?} ${BUILD_DIR?} ${RELEASE_LBL?} ${RELEASE_DIR?} ${FW_DIR?}
|
||||
: ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${FW_DIR?}
|
||||
|
||||
# more variables
|
||||
APP_PATH="${BUILD_DIR}/ground/openpilotgcs/bin/OpenPilot GCS.app"
|
||||
TEMP_FILE="${RELEASE_DIR}/OpenPilot-temp.dmg"
|
||||
OUT_FILE="${RELEASE_DIR}/OpenPilot-${RELEASE_LBL}.dmg"
|
||||
TEMP_FILE="${PACKAGE_DIR}/OpenPilot-temp.dmg"
|
||||
OUT_FILE="${PACKAGE_DIR}/OpenPilot-${PACKAGE_LBL}.dmg"
|
||||
VOL_NAME="OpenPilot"
|
||||
|
||||
# prepare the stage
|
||||
rm -f "${TEMP_FILE}"
|
||||
rm -f "${OUT_FILE}"
|
||||
|
||||
hdiutil convert "${ROOT_DIR}/release/osx/OpenPilot.dmg" \
|
||||
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}')
|
||||
@ -22,7 +22,7 @@ device=$(hdiutil attach "${TEMP_FILE}" | \
|
||||
cp -r "${APP_PATH}" "/Volumes/${VOL_NAME}"
|
||||
cp -r "${FW_DIR}" "/Volumes/${VOL_NAME}/firmware"
|
||||
|
||||
"${ROOT_DIR}/release/osx/libraries" \
|
||||
"${ROOT_DIR}/package/osx/libraries" \
|
||||
"/Volumes/${VOL_NAME}/OpenPilot GCS.app" || exit 1
|
||||
|
||||
hdiutil detach ${device}
|
@ -50,17 +50,17 @@
|
||||
!define INSTALLER_NAME "OpenPilot GCS Installer"
|
||||
|
||||
; Read automatically generated version info
|
||||
; !define RELEASE_LBL "${DATE}-${TAG_OR_HASH8}"
|
||||
; !define RELEASE_DIR "..\..\build\release-$${RELEASE_LBL}"
|
||||
; !define OUT_FILE "OpenPilotGCS-$${RELEASE_LBL}-install.exe"
|
||||
; !define FIRMWARE_DIR "firmware-$${RELEASE_LBL}"
|
||||
; !define PACKAGE_LBL "${DATE}-${TAG_OR_HASH8}"
|
||||
; !define PACKAGE_DIR "..\..\build\package-$${PACKAGE_LBL}"
|
||||
; !define OUT_FILE "OpenPilotGCS-$${PACKAGE_LBL}-install.exe"
|
||||
; !define FIRMWARE_DIR "firmware-$${PACKAGE_LBL}"
|
||||
; !define PRODUCT_VERSION "0.0.0.0"
|
||||
; !define FILE_VERSION "${TAG_OR_BRANCH}:${HASH8} ${DATETIME}"
|
||||
; !define BUILD_DESCRIPTION "${TAG_OR_BRANCH}:${HASH8} built using ${ORIGIN} as origin, committed ${DATETIME} as ${HASH}"
|
||||
!include "${GCS_BUILD_TREE}\openpilotgcs.nsh"
|
||||
|
||||
Name "${PRODUCT_NAME}"
|
||||
OutFile "${RELEASE_DIR}\${OUT_FILE}"
|
||||
OutFile "${PACKAGE_DIR}\${OUT_FILE}"
|
||||
|
||||
VIProductVersion ${PRODUCT_VERSION}
|
||||
VIAddVersionKey "ProductName" "${INSTALLER_NAME}"
|
||||
@ -185,7 +185,7 @@ SectionEnd
|
||||
|
||||
Section "Firmware" InSecFirmware
|
||||
SetOutPath "$INSTDIR\firmware\${FIRMWARE_DIR}"
|
||||
File /r "${RELEASE_DIR}\${FIRMWARE_DIR}\*"
|
||||
File /r "${PACKAGE_DIR}\${FIRMWARE_DIR}\*"
|
||||
SectionEnd
|
||||
|
||||
Section "Shortcuts" InSecShortcuts
|
@ -12,10 +12,10 @@
|
||||
#
|
||||
|
||||
; Some names, paths and constants
|
||||
!define RELEASE_LBL "${DATE}-${TAG_OR_HASH8}${DIRTY}"
|
||||
!define RELEASE_DIR "..\..\build\release-$${RELEASE_LBL}"
|
||||
!define OUT_FILE "OpenPilot-$${RELEASE_LBL}-install.exe"
|
||||
!define FIRMWARE_DIR "firmware-$${RELEASE_LBL}"
|
||||
!define PACKAGE_LBL "${DATE}-${TAG_OR_HASH8}${DIRTY}"
|
||||
!define PACKAGE_DIR "..\..\build\package-$${PACKAGE_LBL}"
|
||||
!define OUT_FILE "OpenPilot-$${PACKAGE_LBL}-install.exe"
|
||||
!define FIRMWARE_DIR "firmware-$${PACKAGE_LBL}"
|
||||
|
||||
; Installer version info
|
||||
!define PRODUCT_VERSION "0.0.0.0"
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
@ -1,20 +0,0 @@
|
||||
#
|
||||
# MacOSX-specific packaging
|
||||
#
|
||||
|
||||
package: gcs release_flight
|
||||
( \
|
||||
ROOT_DIR="$(ROOT_DIR)" \
|
||||
BUILD_DIR="$(BUILD_DIR)" \
|
||||
RELEASE_LBL="$(RELEASE_LBL)" \
|
||||
RELEASE_DIR="$(RELEASE_DIR)" \
|
||||
FW_DIR="$(FW_DIR)" \
|
||||
"$(ROOT_DIR)/release/osx/package" \
|
||||
)
|
||||
|
||||
gcs: uavobjects
|
||||
$(V1) $(MAKE) -C $(ROOT_DIR) GCS_BUILD_CONF=release $@
|
||||
|
||||
ground_package: | package
|
||||
|
||||
.PHONY: gcs ground_package package
|
Loading…
x
Reference in New Issue
Block a user