1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/ground/openpilotgcs/packaging/winx86/winx86.pro
osnwt 449474b66c Windows GCS installer cleanup.
Moved obsolete Wix installer into Experimental branch. NSIS installer moved one level up. Now it supports new build directory structure, does not require to be copied into it and can be built using packaging/winx86/Makefile.cmd or as a qmake-generated "installer" target (using "make installer"). NOTE: this target will NOT be built automatically, you have to build it yourself.

Install system requires Unicode NSIS installer and optionally uses SubWCRev.exe utility (from TortoiseSVN package) to extract some build info from local SVN copy (like revision number, etc.). This info then is available as a properties of installer executable and also used in the installer's executable file name. SubWCRev utility is optional, if it is not found - no extra info will be generated and used.

Also fixed unescaped backslash in openpilotgcs.pri (please check that it does not break !win32 builds).


git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2584 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-24 19:27:49 +00:00

59 lines
2.7 KiB
Prolog

include(../../openpilotgcs.pri)
TEMPLATE = subdirs
# Some Windows packaging magic (for release build only)
equals(copydata, 1):win32:CONFIG(release, debug|release) {
WINX86_PATH = packaging/winx86
SVN_INFO_TEMPLATE = svninfo.tpl
SVN_INFO_MAKEFILE = svninfo.mk
NSIS_TEMPLATE = openpilotgcs.tpl
NSIS_HEADER = openpilotgcs.nsh
# Check for SubWCRev.exe executable required to get some useful SVN repository info.
# For example, currently checked out SVN revision (highest for the working copy).
# SubWCRev is a part of TortoiseSVN client distribution:
# http://tortoisesvn.net/
# SubWCRev is also available separately:
# http://sourceforge.net/projects/tortoisesvn/files/Tools/1.6.7/SubWCRev-1.6.7.18415.msi/download
# Default location is TortoiseSVN bin folder.
SUBWCREV_EXE = $$targetPath(\"$$(ProgramFiles)/TortoiseSVN/bin/SubWCRev.exe\")
exists($$SUBWCREV_EXE) {
message("SubWCRev found: $${SUBWCREV_EXE}")
svninfo.commands += $$SUBWCREV_EXE $$targetPath($$GCS_SOURCE_TREE)
svninfo.commands += $$targetPath($$GCS_SOURCE_TREE/$$WINX86_PATH/$$SVN_INFO_TEMPLATE)
svninfo.commands += $$targetPath($$GCS_BUILD_TREE/$$WINX86_PATH/$$SVN_INFO_MAKEFILE)
svninfo.commands += $$addNewline()
svninfo.commands += $$SUBWCREV_EXE $$targetPath($$GCS_SOURCE_TREE)
svninfo.commands += $$targetPath($$GCS_SOURCE_TREE/$$WINX86_PATH/$$NSIS_TEMPLATE)
svninfo.commands += $$targetPath($$GCS_BUILD_TREE/$$WINX86_PATH/$$NSIS_HEADER)
svninfo.commands += $$addNewline()
} else {
message("SubWCRev not found, SVN info is not available")
svninfo.commands += $(COPY_FILE)
svninfo.commands += $$targetPath($$GCS_SOURCE_TREE/$$WINX86_PATH/$$SVN_INFO_MAKEFILE)
svninfo.commands += $$targetPath($$GCS_BUILD_TREE/$$WINX86_PATH/$$SVN_INFO_MAKEFILE)
svninfo.commands += $$addNewline()
svninfo.commands += $(COPY_FILE)
svninfo.commands += $$targetPath($$GCS_SOURCE_TREE/$$WINX86_PATH/$$NSIS_HEADER)
svninfo.commands += $$targetPath($$GCS_BUILD_TREE/$$WINX86_PATH/$$NSIS_HEADER)
svninfo.commands += $$addNewline()
}
svninfo.target = svninfo.dummy
QMAKE_EXTRA_TARGETS += svninfo
force.depends += svninfo
# Redefine FORCE target to collect data every time
force.target = FORCE
QMAKE_EXTRA_TARGETS += force
# Create installer build target - this WILL NOT run during build, run it by hand
message("Run \"make installer\" to build Windows installer (Unicode NSIS 2.46+ required)")
nsis.commands += @$$targetPath($$GCS_SOURCE_TREE/$$WINX86_PATH/Makefile.cmd)
nsis.target = installer
QMAKE_EXTRA_TARGETS += nsis
}