mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Merged in james-duley/librepilot/LP-187_use_Msys2 (pull request #132)
LP-187 Use MSYS2
This commit is contained in:
commit
294f22d422
@ -1,40 +1,53 @@
|
||||
How to build from source?
|
||||
=========================
|
||||
# How to build from source?
|
||||
|
||||
Both development environment and GCS are supported on Windows, Linux and Mac OS X
|
||||
|
||||
## Install prerequisites
|
||||
|
||||
The first step is to Install all OS specific prerequisites.
|
||||
###Mac OS X
|
||||
|
||||
### Mac OS X
|
||||
|
||||
Install XCode and its relatated command line tools (follow Apple documentation).
|
||||
Install git, curl and p7zip. You can use brew `brew install git curl p7zip` or macport: `sudo port install git curl p7zip`
|
||||
###Ubuntu
|
||||
|
||||
|
||||
### Ubuntu
|
||||
|
||||
sudo apt-get install git build-essential curl gdb wget debhelper p7zip-full unzip flex bison libsdl1.2-dev libudev-dev libusb-1.0-0-dev libc6-i386 mesa-common-dev
|
||||
|
||||
|
||||
###Windows
|
||||
Install [msysGIT](https://msysgit.github.io/) under `C:\git`
|
||||
### Windows
|
||||
|
||||
Clone LibrePilot Git repository.
|
||||
Open Git Bash and run
|
||||
Install [Msys2](https://msys2.github.io/) following the instructions on the web site. You can either install the i686 (32 bit) or x86_64 (64 bit) version.
|
||||
|
||||
cd /path/to/LibrePilot_root
|
||||
./make/scripts/win_sdk_install.sh
|
||||
Start a "MinGW-w64 Win32 Shell" or "MinGW-w64 Win32 Win64 Shell" (NOT "MSYS2 Shell")
|
||||
|
||||
You can build using the `/path/to/LibrePilot_root/make/winx86/bin/make` wrapper to call `mingw32-make.exe` as:
|
||||
Install the dependent packages (32 bit):
|
||||
|
||||
./make/winx86/bin/make all_sdk_install
|
||||
or call `mingw32-make` directly
|
||||
pacman -S --needed git unzip tar mingw-w64-i686-toolchain mingw-w64-i686-qt5 mingw-w64-i686-SDL mingw-w64-i686-mesa mingw-w64-i686-openssl
|
||||
|
||||
mingw32-make all_sdk_install
|
||||
Or for a 64 bit build:
|
||||
|
||||
pacman -S --needed git unzip tar mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt5 mingw-w64-x86_64-SDL mingw-w64-x86_64-mesa mingw-w64-x86_64-openssl
|
||||
|
||||
*NOTE* On Windows you need to run the mingw version of make, which is 'mingw32-make'
|
||||
|
||||
|
||||
## Setup the build environment and build
|
||||
|
||||
##Setup the build environment and build
|
||||
The `all_sdk_install` target will automatically retrieve and install all needed tools (qt, arm gcc etc.) in a local folder `/path/to/LibrePilot_root/tools`
|
||||
|
||||
### Ubuntu / Mac OS X
|
||||
|
||||
make all_sdk_install
|
||||
make package
|
||||
|
||||
The `package` target will build the complete installable package for the current platform.
|
||||
### Windows
|
||||
|
||||
mingw32-make all_sdk_install
|
||||
mingw32-make package
|
||||
|
||||
The `package` target will build the complete installable package for the current platform. You can build the 'all' target to just build the software.
|
||||
|
||||
Run make with no arguments to show the complete list of supported targets.
|
||||
|
24
Makefile
24
Makefile
@ -130,14 +130,7 @@ else ifeq ($(V), 0)
|
||||
else ifeq ($(V), 1)
|
||||
endif
|
||||
|
||||
# Make sure we know few things about the architecture before including
|
||||
# the tools.mk to ensure that we download/install the right tools.
|
||||
UNAME := $(shell uname)
|
||||
ARCH := $(shell uname -m)
|
||||
# Here and everywhere if not Linux or Mac then assume Windows
|
||||
ifeq ($(filter Linux Darwin, $(UNAME)), )
|
||||
UNAME := Windows
|
||||
endif
|
||||
ARCH := $(call get_arch)
|
||||
|
||||
# Include tools installers
|
||||
include $(ROOT_DIR)/make/tools.mk
|
||||
@ -147,17 +140,10 @@ include $(ROOT_DIR)/make/tools.mk
|
||||
|
||||
# We almost need to consider autoconf/automake instead of this
|
||||
ifeq ($(UNAME), Linux)
|
||||
ifeq ($(ARCH), x86_64)
|
||||
QT_SPEC := linux-g++-64
|
||||
else
|
||||
QT_SPEC := linux-g++-32
|
||||
endif
|
||||
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
|
||||
else ifeq ($(UNAME), Darwin)
|
||||
QT_SPEC := macx-g++
|
||||
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator
|
||||
else ifeq ($(UNAME), Windows)
|
||||
QT_SPEC := win32-g++
|
||||
UAVOBJGENERATOR := $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
|
||||
endif
|
||||
|
||||
@ -196,7 +182,7 @@ uavobjgenerator: $(UAVOBJGENERATOR)
|
||||
$(UAVOBJGENERATOR): | $(UAVOBJGENERATOR_DIR)
|
||||
$(V1) cd $(UAVOBJGENERATOR_DIR) && \
|
||||
( [ -f Makefile ] || $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro \
|
||||
-spec $(QT_SPEC) CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) ) && \
|
||||
CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) ) && \
|
||||
$(MAKE) --no-print-directory -w
|
||||
|
||||
UAVOBJ_TARGETS := gcs flight python matlab java wireshark
|
||||
@ -270,7 +256,7 @@ GCS_MAKEFILE := $(GCS_DIR)/Makefile
|
||||
gcs_qmake $(GCS_MAKEFILE): | $(GCS_DIR)
|
||||
$(V1) cd $(GCS_DIR) && \
|
||||
$(QMAKE) $(ROOT_DIR)/ground/gcs/gcs.pro \
|
||||
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
|
||||
-r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) \
|
||||
'GCS_BIG_NAME="$(GCS_BIG_NAME)"' GCS_SMALL_NAME=$(GCS_SMALL_NAME) \
|
||||
'ORG_BIG_NAME="$(ORG_BIG_NAME)"' ORG_SMALL_NAME=$(ORG_SMALL_NAME) \
|
||||
'WIKI_URL_ROOT="$(WIKI_URL_ROOT)"' \
|
||||
@ -304,7 +290,7 @@ UPLOADER_MAKEFILE := $(UPLOADER_DIR)/Makefile
|
||||
uploader_qmake $(UPLOADER_MAKEFILE): | $(UPLOADER_DIR)
|
||||
$(V1) cd $(UPLOADER_DIR) && \
|
||||
$(QMAKE) $(ROOT_DIR)/ground/gcs/src/experimental/USB_UPLOAD_TOOL/upload.pro \
|
||||
-spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS)
|
||||
-r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS)
|
||||
|
||||
.PHONY: uploader
|
||||
uploader: $(UPLOADER_MAKEFILE)
|
||||
@ -510,7 +496,7 @@ OPFW_FILES := $(foreach fw_targ, $(PACKAGE_FW_TARGETS), $(FIRMWARE_DIR)/$(fw_tar
|
||||
OPFW_CONTENTS := \
|
||||
<!DOCTYPE RCC><RCC version="1.0"> \
|
||||
<qresource prefix="/firmware"> \
|
||||
$(foreach fw_file, $(OPFW_FILES), <file alias="$(notdir $(fw_file))">$(fw_file)</file>) \
|
||||
$(foreach fw_file, $(OPFW_FILES), <file alias="$(notdir $(fw_file))">$(call system_path, $(fw_file))</file>) \
|
||||
</qresource> \
|
||||
</RCC>
|
||||
|
||||
|
@ -31,7 +31,7 @@ equals(copyqt, 1) {
|
||||
libicui18n.so.54 \
|
||||
libicuuc.so.54 \
|
||||
libicudata.so.54
|
||||
*-64 {
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_LIBS += libqgsttools_p.so.1
|
||||
}
|
||||
for(lib, QT_LIBS) {
|
||||
@ -48,12 +48,11 @@ equals(copyqt, 1) {
|
||||
platforms/libqxcb.so \
|
||||
xcbglintegrations/libqxcb-glx-integration.so \
|
||||
sqldrivers/libqsqlite.so
|
||||
*-32 {
|
||||
QT_PLUGINS += mediaservice/libqtmedia_audioengine.so
|
||||
}
|
||||
*-64 {
|
||||
contains(QT_ARCH, x86_64) {
|
||||
QT_PLUGINS += mediaservice/libgstaudiodecoder.so \
|
||||
mediaservice/libgstmediaplayer.so
|
||||
} else {
|
||||
QT_PLUGINS += mediaservice/libqtmedia_audioengine.so
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,13 +80,26 @@ equals(copyqt, 1) {
|
||||
Qt5Quick$${DS}.dll \
|
||||
Qt5QuickWidgets$${DS}.dll \
|
||||
Qt5Qml$${DS}.dll \
|
||||
icuin54.dll \
|
||||
icudt54.dll \
|
||||
icuuc54.dll
|
||||
# it is more robust to take the following DLLs from Qt rather than from MinGW
|
||||
QT_DLLS += libgcc_s_dw2-1.dll \
|
||||
libicuin56.dll \
|
||||
libicudt56.dll \
|
||||
libicuuc56.dll \
|
||||
libstdc++-6.dll \
|
||||
libwinpthread-1.dll
|
||||
libwinpthread-1.dll \
|
||||
libpcre16-0.dll \
|
||||
zlib1.dll \
|
||||
libharfbuzz-0.dll \
|
||||
libfreetype-6.dll \
|
||||
libbz2-1.dll \
|
||||
libpng16-16.dll \
|
||||
libglib-2.0-0.dll \
|
||||
libintl-8.dll \
|
||||
libiconv-2.dll
|
||||
contains(QT_ARCH, i386) {
|
||||
QT_DLLS += libgcc_s_dw2-1.dll
|
||||
} else {
|
||||
QT_DLLS += libgcc_s_seh-1.dll
|
||||
}
|
||||
|
||||
for(dll, QT_DLLS) {
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
@ -97,14 +109,14 @@ equals(copyqt, 1) {
|
||||
ssleay32.dll \
|
||||
libeay32.dll
|
||||
for(dll, OPENSSL_DLLS) {
|
||||
addCopyFileTarget($${dll},$${OPENSSL_DIR},$${GCS_APP_PATH})
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
|
||||
# copy OpenGL DLL
|
||||
OPENGL_DLLS = \
|
||||
opengl32_32/opengl32.dll
|
||||
opengl32.dll
|
||||
for(dll, OPENGL_DLLS) {
|
||||
addCopyFileTarget($${dll},$${MESAWIN_DIR},$${GCS_APP_PATH})
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}/opengl32)
|
||||
}
|
||||
|
||||
QT_PLUGINS = iconengines/qsvgicon$${DS}.dll \
|
||||
|
@ -3,16 +3,15 @@
|
||||
#
|
||||
equals(copyosg, 1) {
|
||||
|
||||
OSG_VERSION = 3.4.0
|
||||
OSG_VERSION = 3.5.1
|
||||
|
||||
linux {
|
||||
# copy osg libraries
|
||||
|
||||
data_copy.commands += $(MKDIR) $${GCS_LIBRARY_PATH}/osg $$addNewline()
|
||||
*-64 {
|
||||
contains(QT_ARCH, x86_64) {
|
||||
data_copy.commands += $(COPY_DIR) $$shell_quote($$OSG_SDK_DIR/lib64/)* $$shell_quote($$GCS_LIBRARY_PATH/osg/)
|
||||
}
|
||||
*-32 {
|
||||
} else {
|
||||
data_copy.commands += $(COPY_DIR) $$shell_quote($$OSG_SDK_DIR/lib/)* $$shell_quote($$GCS_LIBRARY_PATH/osg/)
|
||||
}
|
||||
|
||||
@ -42,12 +41,12 @@ equals(copyosg, 1) {
|
||||
OSG_LIBS = \
|
||||
libcurl-4.dll \
|
||||
libfreetype-6.dll \
|
||||
libgdal.dll \
|
||||
libgeos-3-3-8.dll \
|
||||
libgeos_c-1.dll \
|
||||
libjpeg-9.dll \
|
||||
libgdal-20.dll \
|
||||
libgeos.dll \
|
||||
libgeos_c.dll \
|
||||
libjpeg-8.dll \
|
||||
libpng16-16.dll \
|
||||
libproj-0.dll \
|
||||
libproj-9.dll \
|
||||
libtiff-5.dll \
|
||||
libtiffxx-5.dll \
|
||||
zlib1.dll \
|
||||
|
@ -4,7 +4,7 @@ equals(copydata, 1) {
|
||||
SDL_DLLS = \
|
||||
SDL.dll
|
||||
for(dll, SDL_DLLS) {
|
||||
addCopyFileTarget($${dll},$${SDL_DIR}/bin,$${GCS_APP_PATH})
|
||||
addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,26 +54,10 @@
|
||||
#include <windows.h>
|
||||
#include <dbt.h>
|
||||
#include <setupapi.h>
|
||||
extern "C"
|
||||
{
|
||||
#include <hidsdi.h>
|
||||
|
||||
// from working mingw hidsdi.h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
HIDAPI VOID WINAPI HidD_GetHidGuid(LPGUID);
|
||||
HIDAPI BOOL WINAPI HidD_GetPreparsedData(HANDLE, PHIDP_PREPARSED_DATA *);
|
||||
HIDAPI BOOL WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA);
|
||||
HIDAPI BOOL WINAPI HidD_FlushQueue(HANDLE);
|
||||
HIDAPI BOOL WINAPI HidD_GetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG);
|
||||
HIDAPI BOOL WINAPI HidD_SetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG);
|
||||
HIDAPI BOOL WINAPI HidD_GetPhysicalDescriptor(HANDLE, PVOID, ULONG);
|
||||
HIDAPI BOOL WINAPI HidD_GetIndexedString(HANDLE, ULONG, PVOID, ULONG);
|
||||
HIDAPI BOOL WINAPI HidD_GetSerialNumberString(HANDLE, PVOID, ULONG);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // if defined(Q_OS_MAC)
|
||||
|
||||
|
||||
|
@ -16,6 +16,20 @@
|
||||
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
# Make sure we know few things about the architecture before including
|
||||
# the tools.mk to ensure that we download/install the right tools.
|
||||
UNAME := $(shell uname)
|
||||
# Here and everywhere if not Linux or Mac then assume Windows
|
||||
ifeq ($(filter Linux Darwin, $(UNAME)), )
|
||||
UNAME := Windows
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME),Windows)
|
||||
system_path = $(shell cygpath -w $(1))
|
||||
else
|
||||
system_path = $(1)
|
||||
endif
|
||||
|
||||
# Function for converting Windows style slashes into Unix style
|
||||
slashfix = $(subst \,/,$(1))
|
||||
|
||||
@ -36,3 +50,4 @@ endef
|
||||
|
||||
smallify = $(subst $(SPACE),-,$(call lc,$1))
|
||||
|
||||
get_arch = $(shell $(CC) -dumpmachine | sed s/-.*//)
|
||||
|
@ -195,6 +195,25 @@ class Repo:
|
||||
except:
|
||||
return None
|
||||
|
||||
def version_four_num(self):
|
||||
"""Return package version in format X.X.X.X using only numbers"""
|
||||
|
||||
try:
|
||||
(release, junk, candidate) = self._last_tag.partition("-RC")
|
||||
(year, dot, month_and_patch) = release.partition(".")
|
||||
(month, dot, patch) = month_and_patch.partition(".")
|
||||
|
||||
if candidate == "":
|
||||
candidate = "64" # Need to stay below 65536 for last part
|
||||
|
||||
if patch == "":
|
||||
patch = "0"
|
||||
|
||||
return "{}.{}.{}.{}{:0>3.3}".format(year,month,patch,candidate,self._num_commits_past_tag)
|
||||
except:
|
||||
return None
|
||||
|
||||
|
||||
def revision(self):
|
||||
"""Return full revison string (tag if defined, or branch:hash date time if no tag)"""
|
||||
try:
|
||||
@ -463,6 +482,7 @@ string given.
|
||||
TAG_OR_BRANCH = r.tag(r.branch('unreleased')),
|
||||
TAG_OR_HASH8 = r.tag(r.hash(8, 'untagged')),
|
||||
LABEL = r.label(),
|
||||
VERSION_FOUR_NUM = r.version_four_num(),
|
||||
REVISION = r.revision(),
|
||||
DIRTY = r.dirty(),
|
||||
FWTAG = xtrim(r.tag(r.branch('unreleased')), r.dirty(), 25),
|
||||
|
@ -166,9 +166,11 @@ QT_SDK_PREFIX := $(QT_SDK_DIR)
|
||||
#
|
||||
##############################
|
||||
|
||||
BUILD_SDK_TARGETS := arm_sdk qt_sdk osg
|
||||
BUILD_SDK_TARGETS := arm_sdk
|
||||
ifeq ($(UNAME), Windows)
|
||||
BUILD_SDK_TARGETS += sdl nsis mesawin openssl ccache
|
||||
BUILD_SDK_TARGETS += nsis
|
||||
else
|
||||
BUILD_SDK_TARGETS += qt_sdk
|
||||
endif
|
||||
ALL_SDK_TARGETS := $(BUILD_SDK_TARGETS) gtest uncrustify doxygen
|
||||
|
||||
|
@ -54,9 +54,9 @@ install: uninstall
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/applications
|
||||
$(V1) $(MKDIR) -p $(DESTDIR)$(datadir)/pixmaps
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/bin/$(GCS_SMALL_NAME) $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/$(libbasename)/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir)
|
||||
$(V1) $(INSTALL) $(BUILD_DIR)/$(GCS_SMALL_NAME)_$(GCS_BUILD_CONF)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir)
|
||||
$(V1) $(INSTALL) $(GCS_DIR)/bin/$(GCS_SMALL_NAME) $(DESTDIR)$(bindir)
|
||||
$(V1) $(INSTALL) $(GCS_DIR)/$(libbasename)/$(GCS_SMALL_NAME) $(DESTDIR)$(libdir)
|
||||
$(V1) $(INSTALL) $(GCS_DIR)/share/$(GCS_SMALL_NAME) $(DESTDIR)$(datadir)
|
||||
$(V1) $(INSTALL) -T $(ROOT_DIR)/package/linux/gcs.desktop $(DESTDIR)$(datadir)/applications/$(ORG_SMALL_NAME).desktop
|
||||
$(V1) $(INSTALL) -T $(ROOT_DIR)/ground/gcs/src/plugins/coreplugin/images/$(ORG_SMALL_NAME)_logo_128.png \
|
||||
$(DESTDIR)$(datadir)/pixmaps/$(ORG_SMALL_NAME).png
|
||||
|
@ -6,31 +6,36 @@ ifndef TOP_LEVEL_MAKEFILE
|
||||
$(error Top level Makefile must be used to build this target)
|
||||
endif
|
||||
|
||||
VERSION_CMD := $(VERSION_INFO)
|
||||
PACKAGE_EXE := $(BUILD_DIR)/$(PACKAGE_FULL_NAME)_$(ARCH).exe
|
||||
|
||||
NSIS_OPTS := /V3
|
||||
NSIS_OPTS := -V3
|
||||
NSIS_WINX86 := $(ROOT_DIR)/package/winx86
|
||||
NSIS_SCRIPT := $(NSIS_WINX86)/gcs.nsi
|
||||
NSIS_TEMPLATE := $(NSIS_WINX86)/gcs.tpl
|
||||
NSIS_HEADER := $(OPGCSSYNTHDIR)/gcs.nsh
|
||||
|
||||
ifeq ($(ARCH),x86_64)
|
||||
WIN_DEF = -DW64
|
||||
endif
|
||||
|
||||
.PHONY: package
|
||||
package: gcs uavobjects_matlab | $(PACKAGE_DIR)
|
||||
package: $(PACKAGE_EXE)
|
||||
|
||||
$(PACKAGE_EXE): $(NSIS_SCRIPT) gcs uavobjects_matlab | $(PACKAGE_DIR)
|
||||
ifneq ($(GCS_BUILD_CONF),release)
|
||||
# We can only package release builds
|
||||
$(error Packaging is currently supported for release builds only)
|
||||
endif
|
||||
$(V1) mkdir -p "$(dir $(NSIS_HEADER))"
|
||||
$(VERSION_CMD) \
|
||||
--template='$(NSIS_TEMPLATE)' \
|
||||
--outfile='$(NSIS_HEADER)' \
|
||||
ORG_BIG_NAME='$(ORG_BIG_NAME)' \
|
||||
GCS_BIG_NAME='$(GCS_BIG_NAME)' \
|
||||
GCS_SMALL_NAME='$(GCS_SMALL_NAME)' \
|
||||
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"
|
||||
$(NSIS) $(NSIS_OPTS) $(NSIS_SCRIPT)
|
||||
$(NSIS) $(NSIS_OPTS) \
|
||||
-DORG_BIG_NAME='$(ORG_BIG_NAME)' \
|
||||
-DGCS_BIG_NAME='$(GCS_BIG_NAME)' \
|
||||
-DGCS_SMALL_NAME='$(GCS_SMALL_NAME)' \
|
||||
-DPACKAGE_LBL='$(PACKAGE_LBL)' \
|
||||
-DVERSION_FOUR_NUM='$(shell $(VERSION_INFO) --format=\$${VERSION_FOUR_NUM})' \
|
||||
-DOUT_FILE='$(call system_path,$(PACKAGE_EXE))' \
|
||||
-DPROJECT_ROOT='$(call system_path,$(ROOT_DIR))' \
|
||||
-DGCS_BUILD_TREE='$(call system_path,$(GCS_DIR))' \
|
||||
-DUAVO_SYNTH_TREE='$(call system_path,$(UAVOBJ_OUT_DIR))' \
|
||||
$(WIN_DEF) \
|
||||
$(NSIS_SCRIPT)
|
||||
|
@ -29,20 +29,19 @@
|
||||
; Includes
|
||||
|
||||
!include "x64.nsh"
|
||||
!include "..\..\build\gcs-synthetics\gcs.nsh"
|
||||
|
||||
;--------------------------------
|
||||
; Paths
|
||||
|
||||
; Tree root locations (relative to this script location)
|
||||
!define PROJECT_ROOT "..\.."
|
||||
!define NSIS_DATA_TREE "."
|
||||
!define GCS_BUILD_TREE "..\..\build\${GCS_SMALL_NAME}_release"
|
||||
!define UAVO_SYNTH_TREE "..\..\build\uavobject-synthetics"
|
||||
!define AEROSIMRC_TREE "${GCS_BUILD_TREE}\misc\AeroSIM-RC"
|
||||
|
||||
; Default installation folder
|
||||
InstallDir "$PROGRAMFILES\${ORG_BIG_NAME}"
|
||||
!ifdef W64
|
||||
InstallDir "$PROGRAMFILES64\${ORG_BIG_NAME}"
|
||||
!else
|
||||
InstallDir "$PROGRAMFILES32\${ORG_BIG_NAME}"
|
||||
!endif
|
||||
|
||||
; Get installation folder from registry if available
|
||||
InstallDirRegKey HKLM "Software\${ORG_BIG_NAME}" "Install Location"
|
||||
@ -50,21 +49,15 @@
|
||||
;--------------------------------
|
||||
; Version information
|
||||
|
||||
; Program name and installer file
|
||||
!define PRODUCT_NAME "${GCS_BIG_NAME}"
|
||||
!define INSTALLER_NAME "${GCS_BIG_NAME} Installer"
|
||||
Name "${GCS_BIG_NAME}"
|
||||
OutFile "${OUT_FILE}"
|
||||
|
||||
Name "${PRODUCT_NAME}"
|
||||
OutFile "${PACKAGE_DIR}\..\${OUT_FILE}"
|
||||
|
||||
VIProductVersion ${PRODUCT_VERSION}
|
||||
VIAddVersionKey "ProductName" "${INSTALLER_NAME}"
|
||||
VIAddVersionKey "FileVersion" "${FILE_VERSION}"
|
||||
VIAddVersionKey "Comments" "${INSTALLER_NAME}. ${BUILD_DESCRIPTION}"
|
||||
VIProductVersion ${VERSION_FOUR_NUM}
|
||||
VIAddVersionKey "ProductName" "${GCS_BIG_NAME}"
|
||||
VIAddVersionKey "ProductVersion" "${VERSION_FOUR_NUM}"
|
||||
VIAddVersionKey "CompanyName" "The LibrePilot Team, http://www.librepilot.org"
|
||||
VIAddVersionKey "LegalTrademarks" "${PRODUCT_NAME} is a trademark of The LibrePilot Team"
|
||||
VIAddVersionKey "LegalCopyright" "© 2015 The LibrePilot Team"
|
||||
VIAddVersionKey "FileDescription" "${INSTALLER_NAME}"
|
||||
VIAddVersionKey "FileDescription" "${GCS_BIG_NAME} Installer"
|
||||
|
||||
;--------------------------------
|
||||
; Installer interface and base settings
|
||||
@ -182,13 +175,6 @@ Section "-Plugins" InSecPlugins
|
||||
File /r "${GCS_BUILD_TREE}\lib\${GCS_SMALL_NAME}\plugins\*.pluginspec"
|
||||
SectionEnd
|
||||
|
||||
; Copy OSG libs
|
||||
Section "-OsgLibs" InSecOsgLibs
|
||||
SectionIn RO
|
||||
SetOutPath "$INSTDIR\lib\${GCS_SMALL_NAME}\osg"
|
||||
File /r "${GCS_BUILD_TREE}\lib\${GCS_SMALL_NAME}\osg\*.dll"
|
||||
SectionEnd
|
||||
|
||||
; Copy GCS resources
|
||||
Section "-Resources" InSecResources
|
||||
SetOutPath "$INSTDIR\share"
|
||||
@ -222,7 +208,7 @@ SectionEnd
|
||||
; Copy Opengl32.dll if needed (disabled by default)
|
||||
Section /o "Mesa OpenGL driver" InSecInstallOpenGL
|
||||
SetOutPath "$INSTDIR\bin"
|
||||
File /r "${GCS_BUILD_TREE}\bin\opengl32_32\opengl32.dll"
|
||||
File /r "${GCS_BUILD_TREE}\bin\opengl32\opengl32.dll"
|
||||
SectionEnd
|
||||
|
||||
; AeroSimRC plugin files
|
||||
@ -236,9 +222,9 @@ Section "Shortcuts" InSecShortcuts
|
||||
SetOutPath "$INSTDIR"
|
||||
CreateDirectory "$SMPROGRAMS\${ORG_BIG_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\${GCS_BIG_NAME}.lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\${GCS_BIG_NAME} (clean configuration).lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
||||
"-reset" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
||||
"-reset" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\License.lnk" "$INSTDIR\LICENSE.txt" \
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\ReadMe.lnk" "$INSTDIR\README.txt" \
|
||||
@ -254,7 +240,7 @@ Section "Shortcuts" InSecShortcuts
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Forums.lnk" "http://forum.librepilot.org" \
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
||||
CreateShortCut "$DESKTOP\${GCS_BIG_NAME}.lnk" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" \
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0 "" "" "${PRODUCT_NAME} ${PRODUCT_VERSION}. ${BUILD_DESCRIPTION}"
|
||||
"" "$INSTDIR\bin\${GCS_SMALL_NAME}.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\${ORG_BIG_NAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
|
||||
SectionEnd
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
#
|
||||
# @file ${OUTFILENAME}
|
||||
# @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011-2015.
|
||||
# @brief Autogenerated NSIS header file, built using template
|
||||
# ${TEMPLATE}
|
||||
#
|
||||
# @see The GNU Public License (GPL) Version 3
|
||||
#
|
||||
# *****************************************************************************
|
||||
#
|
||||
|
||||
; Some names, paths and constants
|
||||
!define ORG_BIG_NAME "${ORG_BIG_NAME}"
|
||||
!define GCS_BIG_NAME "${GCS_BIG_NAME}"
|
||||
!define GCS_SMALL_NAME "${GCS_SMALL_NAME}"
|
||||
!define PACKAGE_LBL "${PACKAGE_LBL}"
|
||||
!define PACKAGE_NAME "${PACKAGE_NAME}"
|
||||
!define PACKAGE_SEP "${PACKAGE_SEP}"
|
||||
!define PACKAGE_DIR "..\..\build\package"
|
||||
!define FIRMWARE_DIR "firmware"
|
||||
!define OUT_FILE "$${PACKAGE_NAME}$${PACKAGE_SEP}$${PACKAGE_LBL}$${PACKAGE_SEP}win32.exe"
|
||||
|
||||
; Installer version info
|
||||
!define PRODUCT_VERSION "0.0.0.0"
|
||||
!define FILE_VERSION "${TAG_OR_BRANCH}:${HASH8}${DIRTY} ${DATETIME}"
|
||||
!define BUILD_DESCRIPTION "${PACKAGE_LBL} built from ${ORIGIN}, committed ${DATETIME} as ${HASH}"
|
@ -76,12 +76,7 @@ function download_file
|
||||
#2 The output directory
|
||||
function zip_extract
|
||||
{
|
||||
if [ "$uname" = Windows ]
|
||||
then
|
||||
7za.exe x -o"$2" "$1"
|
||||
else
|
||||
unzip "$1" -d "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
## Extracts a 7zip file
|
||||
|
Loading…
Reference in New Issue
Block a user