2011-05-13 16:40:28 +02:00
|
|
|
#
|
2013-03-21 22:11:30 +01:00
|
|
|
# Windows-specific packaging script
|
2011-05-13 16:40:28 +02:00
|
|
|
#
|
|
|
|
|
2013-03-21 22:11:30 +01:00
|
|
|
ifndef OPENPILOT_IS_COOL
|
|
|
|
$(error Top level Makefile must be used to build this target)
|
|
|
|
endif
|
|
|
|
|
|
|
|
VERSION_CMD := $(VERSION_INFO)
|
|
|
|
|
2011-05-19 00:05:12 +02:00
|
|
|
NSIS_OPTS := /V3
|
2013-05-01 21:44:11 +02:00
|
|
|
NSIS_WINX86 := $(ROOT_DIR)/package/winx86
|
|
|
|
NSIS_SCRIPT := $(NSIS_WINX86)/openpilotgcs.nsi
|
|
|
|
NSIS_TEMPLATE := $(NSIS_WINX86)/openpilotgcs.tpl
|
2013-03-30 16:33:38 +01:00
|
|
|
NSIS_HEADER := $(OPGCSSYNTHDIR)/openpilotgcs.nsh
|
2011-05-19 00:05:12 +02:00
|
|
|
|
2013-03-21 22:11:30 +01:00
|
|
|
.PHONY: package
|
2015-03-17 22:18:04 +01:00
|
|
|
package: openpilotgcs uavobjects_matlab | $(PACKAGE_DIR)
|
2015-03-17 09:15:44 +01:00
|
|
|
ifneq ($(GCS_BUILD_CONF),release)
|
|
|
|
# We can only package release builds
|
|
|
|
$(error Packaging is currently supported for release builds only)
|
|
|
|
endif
|
2011-05-28 02:14:51 +02:00
|
|
|
$(V1) mkdir -p "$(dir $(NSIS_HEADER))"
|
2012-12-11 02:07:51 +01:00
|
|
|
$(VERSION_CMD) \
|
2013-04-27 23:23:25 +02:00
|
|
|
--template='$(NSIS_TEMPLATE)' \
|
|
|
|
--outfile='$(NSIS_HEADER)' \
|
|
|
|
PACKAGE_LBL='$(PACKAGE_LBL)' \
|
|
|
|
PACKAGE_NAME='$(PACKAGE_NAME)' \
|
|
|
|
PACKAGE_SEP='$(PACKAGE_SEP)'
|
2011-05-28 02:14:51 +02:00
|
|
|
$(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"
|
2013-05-01 21:44:11 +02:00
|
|
|
$(NSIS) $(NSIS_OPTS) $(NSIS_SCRIPT)
|