From 757e72336cf19d6980035c6462179882b711884c Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Tue, 11 Dec 2012 03:07:51 +0200 Subject: [PATCH] [OP-759] Rename all installers in the same style --- package/Makefile | 2 ++ package/Makefile.linux | 2 +- package/Makefile.osx | 2 ++ package/Makefile.winx86 | 7 ++++++- package/osx/package | 4 ++-- package/winx86/openpilotgcs.tpl | 4 +++- 6 files changed, 16 insertions(+), 5 deletions(-) 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..ab09cf962 100644 --- a/package/Makefile.linux +++ b/package/Makefile.linux @@ -28,7 +28,7 @@ DEB_PLATFORM := i386 DEB_MACHINE_DIR := $(DEB_CFG_I386_DIR) DEB_MACHINE_FILES := $(DEB_CFG_I386_FILES) endif -DEB_PACKAGE_NAME := openpilot_$(PACKAGE_LBL)_$(DEB_PLATFORM) +DEB_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)) 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"