1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Merge branch 'master' of ssh://git.openpilot.org/OpenPilot

This commit is contained in:
James Cotton 2011-05-28 04:05:58 -05:00
commit bac56d23a9
30 changed files with 91 additions and 68 deletions

View File

@ -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 $@

View File

@ -52,11 +52,21 @@ equals(copydata, 1) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/sqldrivers/$$dll\") $$targetPath(\"$$GCS_APP_PATH/sqldrivers/$$dll\") $$addNewline()
}
# copy SDL (if available) - Simple DirectMedia Layer (www.libsdl.org)
# copy SDL - Simple DirectMedia Layer (www.libsdl.org)
# Check the wiki for SDL installation, it should be copied first
# (make sure that the Qt installation path below is correct)
#
# - For qt-sdk-win-opensource-2010.05.exe:
# xcopy /s /e <SDL>\bin\SDL.dll C:\Qt\2010.05\mingw\bin\SDL.dll
# xcopy /s /e <SDL>\include\SDL\* C:\Qt\2010.05\mingw\include\SDL
# xcopy /s /e <SDL>\lib\* C:\Qt\2010.05\mingw\lib
#
# - For Qt_SDK_Win_offline_v1_1_1_en.exe:
# xcopy /s /e <SDL>\bin\SDL.dll C:\QtSDK\Desktop\Qt\4.7.3\mingw\bin\SDL.dll
# xcopy /s /e <SDL>\include\SDL\* C:\QtSDK\Desktop\Qt\4.7.3\mingw\include\SDL
# xcopy /s /e <SDL>\lib\* C:\QtSDK\Desktop\Qt\4.7.3\mingw\lib
SDL_DLL = SDL.dll
exists($$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/$$SDL_DLL\")) {
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/$$SDL_DLL\") $$targetPath(\"$$GCS_APP_PATH/$$SDL_DLL\") $$addNewline()
}
data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/../../mingw/bin/$$SDL_DLL\") $$targetPath(\"$$GCS_APP_PATH/$$SDL_DLL\") $$addNewline()
data_copy.target = FORCE
QMAKE_EXTRA_TARGETS += data_copy

View File

@ -33,11 +33,14 @@ It is expected that you have the following tools installed into the listed
locations (but any other locations are fine as well):
- Python in C:\Python27
- QtSDK in C:\Qt\2010.05
- QtSDK in C:\Qt\2010.05 or C:\QtSDK (depending on SDK version)
- CodeSourcery G++ in %ProgramFiles%\CodeSourcery\Sourcery G++ Lite
- msysGit in %ProgramFiles%\Git
- Unicode NSIS in %ProgramFiles%\NSIS\Unicode
- OpenOCD in C:\OpenOCD\0.4.0\bin
- OpenOCD in C:\OpenOCD\0.4.0\bin (optional)
The SDL library and headers should be installed into Qt directories to build
the GCS. Check the wiki or ground/openpilotgcs/copydata.pro for details.
Also it is assumed that you have the C:\Program Files\Git\cmd\ directory in
the PATH. Usually this is the case for msysGit installation if you have chosen

View File

@ -38,6 +38,9 @@ rem As a result, the SDL headers will not be found, if they were copied into
rem QtSDK's MinGW directory. In that case make sure that you have correct
rem directories specified here.
rem
rem Also the SDL should be installed into Qt directories to build the GCS.
rem Check the wiki or ground/openpilotgcs/copydata.pro for details.
rem
rem Also you can add any paths below just by adding extra 'call :which'
rem lines with the following parameters:
rem - environment variable which will be set to the tool location, if found;
@ -51,8 +54,12 @@ set NOT_FOUND=
set PATH_DIRS=
call :which MSYSGIT "%ProgramFiles%\Git\bin" git.exe
rem These two lines for qt-sdk-win-opensource-2010.05.exe:
call :which QTMINGW "C:\Qt\2010.05\mingw\bin" mingw32-make.exe
call :which QTSDK "C:\Qt\2010.05\qt\bin" qmake.exe
rem These two lines for Qt_SDK_Win_offline_v1_1_1_en.exe:
rem call :which QTMINGW "C:\QtSDK\mingw\bin" mingw32-make.exe
rem call :which QTSDK "C:\QtSDK\Desktop\Qt\4.7.3\mingw\bin" qmake.exe
call :which CODESOURCERY "%ProgramFiles%\CodeSourcery\Sourcery G++ Lite\bin" cs-make.exe
call :which PYTHON "C:\Python27" python.exe
call :which UNSIS "%ProgramFiles%\NSIS\Unicode" makensis.exe

View File

@ -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
View 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

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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"

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -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