diff --git a/package/Makefile b/package/Makefile index 495431da8..d2e603386 100644 --- a/package/Makefile +++ b/package/Makefile @@ -16,6 +16,8 @@ BUILD_DIR := $(ROOT_DIR)/build VERSION_CMD := python $(ROOT_DIR)/make/scripts/version-info.py --path="$(ROOT_DIR)" PACKAGE_LBL := $(shell $(VERSION_CMD) --format=\$${LABEL}) PACKAGE_DIR := $(BUILD_DIR)/package-$(PACKAGE_LBL) +PACKAGE_NAME := OpenPilot +PACKAGE_SEP := - FW_DIR := $(PACKAGE_DIR)/firmware-$(PACKAGE_LBL) BL_DIR := $(FW_DIR)/bootloaders BU_DIR := $(FW_DIR)/bootloader-updaters diff --git a/package/Makefile.linux b/package/Makefile.linux index 0809bdb80..d57d6dacf 100644 --- a/package/Makefile.linux +++ b/package/Makefile.linux @@ -29,6 +29,7 @@ DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR) DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES) endif DEB_PACKAGE_NAME := openpilot_$(PACKAGE_LBL)_$(DEB_PLATFORM) +FULL_PACKAGE_NAME := $(PACKAGE_NAME)$(PACKAGE_SEP)$(PACKAGE_LBL)$(PACKAGE_SEP)$(DEB_PLATFORM) ALL_DEB_FILES = $(foreach f, $(DEB_CFG_CMN_FILES), $(DEB_BUILD_DIR)/$(f)) ALL_DEB_FILES += $(foreach f, $(DEB_MACHINE_FILES), $(DEB_BUILD_DIR)/$(f)) @@ -39,8 +40,8 @@ linux_deb_package: $(ALL_DEB_FILES) gcs package_flight $(V1) $(shell echo $(FW_DIR) > $(BUILD_DIR)/package_dir) $(V1) sed -i -e "$(SED_SCRIPT)" $(DEB_BUILD_DIR)/changelog $(V1) cd .. && dpkg-buildpackage -b -us -uc - $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR) - $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR) + $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).deb $(BUILD_DIR)/$(FULL_PACKAGE_NAME).deb + $(V1) mv $(ROOT_DIR)/../$(DEB_PACKAGE_NAME).changes $(BUILD_DIR)/$(FULL_PACKAGE_NAME).changes $(V1) rm -rf $(DEB_BUILD_DIR) $(ALL_DEB_FILES): | uavobjects diff --git a/package/Makefile.osx b/package/Makefile.osx index e2b3c62ba..132f9f2c7 100644 --- a/package/Makefile.osx +++ b/package/Makefile.osx @@ -8,6 +8,8 @@ osx_package: gcs package_flight BUILD_DIR="$(BUILD_DIR)" \ PACKAGE_LBL="$(PACKAGE_LBL)" \ PACKAGE_DIR="$(PACKAGE_DIR)" \ + PACKAGE_NAME="$(PACKAGE_NAME)" \ + PACKAGE_SEP="$(PACKAGE_SEP)" \ FW_DIR="$(FW_DIR)" \ "$(ROOT_DIR)/package/osx/package" \ ) diff --git a/package/Makefile.winx86 b/package/Makefile.winx86 index ce8bdf666..a2602ec3b 100644 --- a/package/Makefile.winx86 +++ b/package/Makefile.winx86 @@ -11,7 +11,12 @@ NSIS_HEADER := $(BUILD_DIR)/ground/openpilotgcs/openpilotgcs.nsh win_package: gcs package_flight $(V1) mkdir -p "$(dir $(NSIS_HEADER))" - $(VERSION_CMD) --template="$(NSIS_TEMPLATE)" --outfile="$(NSIS_HEADER)" PACKAGE_LBL="$(PACKAGE_LBL)" + $(VERSION_CMD) \ + --template="$(NSIS_TEMPLATE)" \ + --outfile="$(NSIS_HEADER)" \ + PACKAGE_LBL="$(PACKAGE_LBL)" \ + PACKAGE_NAME="$(PACKAGE_NAME)" \ + PACKAGE_SEP="$(PACKAGE_SEP)" $(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" diff --git a/package/osx/package b/package/osx/package index 11d2a1417..c2773d17c 100755 --- a/package/osx/package +++ b/package/osx/package @@ -1,12 +1,12 @@ #!/bin/bash # the following environment variables must be set -: ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${FW_DIR?} +: ${ROOT_DIR?} ${BUILD_DIR?} ${PACKAGE_LBL?} ${PACKAGE_DIR?} ${FW_DIR?} ${PACKAGE_NAME?} ${PACKAGE_SEP?} # more variables APP_PATH="${BUILD_DIR}/ground/openpilotgcs/bin/OpenPilot GCS.app" TEMP_FILE="${PACKAGE_DIR}/OpenPilot-temp.dmg" -OUT_FILE="${PACKAGE_DIR}/OpenPilot-${PACKAGE_LBL}.dmg" +OUT_FILE="${PACKAGE_DIR}/${PACKAGE_NAME}${PACKAGE_SEP}${PACKAGE_LBL}.dmg" VOL_NAME="OpenPilot" # prepare the stage diff --git a/package/winx86/openpilotgcs.tpl b/package/winx86/openpilotgcs.tpl index 42594259a..ba93f1a3c 100644 --- a/package/winx86/openpilotgcs.tpl +++ b/package/winx86/openpilotgcs.tpl @@ -13,9 +13,11 @@ ; Some names, paths and constants !define PACKAGE_LBL "${PACKAGE_LBL}" +!define PACKAGE_NAME "${PACKAGE_NAME}" +!define PACKAGE_SEP "${PACKAGE_SEP}" !define PACKAGE_DIR "..\..\build\package-$${PACKAGE_LBL}" -!define OUT_FILE "OpenPilot-$${PACKAGE_LBL}-install.exe" !define FIRMWARE_DIR "firmware-$${PACKAGE_LBL}" +!define OUT_FILE "$${PACKAGE_NAME}$${PACKAGE_SEP}$${PACKAGE_LBL}$${PACKAGE_SEP}install.exe" ; Installer version info !define PRODUCT_VERSION "0.0.0.0"