Browse Source

Merge pull request #50 from Susurrus/master

Windows build improvements
QGC4.4
Lorenz Meier 13 years ago
parent
commit
63a6b2006f
  1. 43
      README
  2. 12
      READMEvc2010.txt
  3. 3
      qgcunittest.pro
  4. 64
      qgroundcontrol.pri
  5. 3
      qgroundcontrol.pro

43
README

@ -78,52 +78,25 @@ Done. @@ -78,52 +78,25 @@ Done.
Windows
=======
DETAILED STEPS BELOW THE VISUAL STUDIO 2010 NOTES.
GNU GCC / MINGW IS UNTESTED, COULD WORK
VISUAL STUDIO 2008 / 2010 EXPRESS EDITION IS FREE!
-------------------------------------------------------------------------------------
VISUAL STUDIO 2010 NOTES (VS 2008 runs out-of-the-box, just follow the steps below):
For use of Qt 4x with Visual Studio 2010 Add-in.
Visual studio adds automatically certain defines that are wrong and cause errors.
To resolve this, execute these steps:
In the projects properties -> C/C++ ->preprocessor change:
in DEBUG:
delete QT_NO_DEBUG
in both (DEBUG / RELEASE):
delete QT_NO_DYNAMIC_CAST
-------------------------------------------------------------------------------------
Steps for Visual Studio 2008 / 2010. (VS 2008 is easier, VS 2010 only recommended for
expert developers)
Steps for Visual Studio 2008 / 2010:
Windows XP/7:
1) Download and install the Qt SDK for Windows from http://qt.nokia.com/downloads/ (Visual Studio 2008 version) OR download Qt source and compile with VS 2010
2) Download and install Visual Studio 2008 Express Edition (free) OR VS 2010 Express Edition
3) Go to the QGroundControl folder and then to thirdParty -> libxbee
1) Download and install the Qt libraries for Windows from https://qt.nokia.com/downloads/ (the Visual Studio 2008 or 2010 version as appropriate)
4) Build the library. See win32.README
2) Download and install Visual Studio 2008 or 2010 Express Edition (free) from https://www.microsoft.com/visualstudio
5) Go to the source folder of QGroundControl with the Qt 4.7.x Command Prompt tool (from the applications menu)
3) Go to the QGroundControl folder and then to thirdParty/libxbee and build it following the instructions in win32.README
6) Create the Visual Studio project by typing:
4) Open the Qt Command Prompt program (should be in the Start Menu), navigate to the source folder of QGroundControl and create the Visual Studio project by typing:
qmake -tp vc qgroundcontrol.pro
`qmake -tp vc qgroundcontrol.pro`
7) Now start Visual Studio and load the qgroundcontrol.vcproj file
5) Now start Visual Studio and load the qgroundcontrol.vcproj if using Visual Studio 2008 or qgroundcontrol.vcxproj if using Visual Studio 2010
8) Compile and edit in Visual Studio. If you need to add new files, add them to qgroundcontrol.pro and re-run "quake -tp vc qgroundcontrol.pro"
6) Compile and edit in Visual Studio. If you need to add new files, add them to qgroundcontrol.pro and re-run `qmake -tp vc qgroundcontrol.pro`

12
READMEvc2010.txt

@ -1,12 +0,0 @@ @@ -1,12 +0,0 @@
For use of qt 4x and visual studio2010 and add in.
The Visual studio adds automatically certain defines
In the projects properties -> C/C++ ->preprocessor change:
in DEBUG:
delete QT_NO_DEBUG
Both:
delete QT_NO_DYNAMIC_CAST

3
qgcunittest.pro

@ -141,7 +141,4 @@ HEADERS += src/uas/UASInterface.h \ @@ -141,7 +141,4 @@ HEADERS += src/uas/UASInterface.h \
src/uas/QGCMAVLinkUASFactory.h
DEFINES += SRCDIR=\\\"$$PWD/\\\"

64
qgroundcontrol.pri

@ -20,13 +20,6 @@ @@ -20,13 +20,6 @@
message(Qt version $$[QT_VERSION])
message(Using Qt from $$(QTDIR))
release {
# DEFINES += QT_NO_DEBUG_OUTPUT
# DEFINES += QT_NO_WARNING_OUTPUT
}
win32-msvc2008|win32-msvc2010 {
QMAKE_POST_LINK += $$quote(echo "Copying files"$$escape_expand(\\n))
} else {
@ -39,38 +32,11 @@ DEFINES += _TTY_NOWARN_ @@ -39,38 +32,11 @@ DEFINES += _TTY_NOWARN_
# MAC OS X
macx|macx-g++42|macx-g++: {
# COMPILER_VERSION = $$system(gcc -v)
#message(Using compiler $$COMPILER_VERSION)
CONFIG += x86_64 cocoa phonon
CONFIG -= x86
#HARDWARE_PLATFORM = $$system(uname -a)
#contains( $$HARDWARE_PLATFORM, "9.6.0" ) || contains( $$HARDWARE_PLATFORM, "9.7.0" ) || contains( $$HARDWARE_PLATFORM, "9.8.0" ) || contains( $$HARDWARE_PLATFORM, "9.9.0" ) {
# x86 Mac OS X Leopard 10.5 and earlier
#message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
# Enable function-profiling with the OS X saturn tool
#debug {
#QMAKE_CXXFLAGS += -finstrument-functions
#LIBS += -lSaturn
# CONFIG += console
#}
#} else {
# x64 Mac OS X Snow Leopard 10.6 and later
# CONFIG += x86_64 x86 cocoa phonon
#CONFIG -= x86 # phonon
#message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
# debug {
#QMAKE_CXXFLAGS += -finstrument-functions
#LIBS += -lSaturn
# }
#}
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
#DESTDIR = $$BASEDIR/bin/mac
INCLUDEPATH += -framework SDL
LIBS += -framework IOKit \
@ -150,11 +116,6 @@ macx|macx-g++42|macx-g++: { @@ -150,11 +116,6 @@ macx|macx-g++42|macx-g++: {
# CORE OSG LIBRARY
QMAKE_POST_LINK += && install_name_tool -change libOpenThreads.dylib "@executable_path/../libs/libOpenThreads.dylib" $$TARGETDIR/qgroundcontrol.app/Contents/libs/libosg.dylib
# Copy model files
#QMAKE_POST_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs
#exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
# No check for GLUT.framework since it's a MAC default
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
@ -174,7 +135,6 @@ macx|macx-g++42|macx-g++: { @@ -174,7 +135,6 @@ macx|macx-g++42|macx-g++: {
-losgDB \
-losgText \
-losgWidget
#}
exists(/usr/local/include/google/protobuf) {
message("Building support for Protocol Buffers")
@ -202,17 +162,10 @@ linux-g++|linux-g++-64{ @@ -202,17 +162,10 @@ linux-g++|linux-g++-64{
CONFIG -= console
debug {
#CONFIG += debug console
}
release {
DEFINES += QT_NO_DEBUG
#CONFIG -= console
}
#QMAKE_POST_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
INCLUDEPATH += /usr/include \
/usr/local/include \
/usr/include/qt4/phonon
@ -295,7 +248,7 @@ linux-g++-64 { @@ -295,7 +248,7 @@ linux-g++-64 {
}
}
# Windows (32bit)
# Windows (32bit), Visual Studio
win32-msvc2008|win32-msvc2010 {
win32-msvc2008 {
@ -316,19 +269,19 @@ win32-msvc2008|win32-msvc2010 { @@ -316,19 +269,19 @@ win32-msvc2008|win32-msvc2010 {
# QWebkit is not needed on MS-Windows compilation environment
CONFIG -= webkit
release {
CONFIG -= console
# For release builds remove support for various Qt debugging macros.
CONFIG(release, debug|release) {
DEFINES += QT_NO_DEBUG
}
debug {
# For debug releases we just want the debugging console.
CONFIG(debug, debug|release) {
CONFIG += console
}
INCLUDEPATH += $$BASEDIR/lib/sdl/msvc/include \
$$BASEDIR/lib/opal/include \
$$BASEDIR/lib/msinttypes
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
LIBS += -L$$BASEDIR/lib/sdl/msvc/lib \
-lSDLmain -lSDL \
@ -357,7 +310,6 @@ DEFINES += QGC_OSG_ENABLED @@ -357,7 +310,6 @@ DEFINES += QGC_OSG_ENABLED
BASEDIR_WIN = $$replace(BASEDIR,"/","\\")
TARGETDIR_WIN = $$replace(TARGETDIR,"/","\\")
CONFIG(debug, debug|release) {
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\lib\\sdl\\win32\\SDL.dll" "$$TARGETDIR_WIN\\debug"$$escape_expand(\\n))
QMAKE_POST_LINK += $$quote(xcopy /D /Y "$$BASEDIR_WIN\\files" "$$TARGETDIR_WIN\\debug\\files" /E /I $$escape_expand(\\n))
@ -415,8 +367,7 @@ win32-g++ { @@ -415,8 +367,7 @@ win32-g++ {
DEFINES += NOMINMAX
INCLUDEPATH += $$BASEDIR/lib/sdl/include \
$$BASEDIR/lib/opal/include #\ #\
#"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
$$BASEDIR/lib/opal/include
LIBS += -L$$BASEDIR/lib/sdl/win32 \
-lmingw32 -lSDLmain -lSDL -mwindows \
@ -427,14 +378,12 @@ win32-g++ { @@ -427,14 +378,12 @@ win32-g++ {
debug {
#DESTDIR = $$BUILDDIR/debug
CONFIG += console
}
release {
CONFIG -= console
DEFINES += QT_NO_DEBUG
#DESTDIR = $$BUILDDIR/release
}
RC_FILE = $$BASEDIR/qgroundcontrol.rc
@ -482,4 +431,3 @@ win32-g++ { @@ -482,4 +431,3 @@ win32-g++ {
# see http://osgearth.org/wiki/FAQ for details.
QMAKE_CXXFLAGS += -Wl,-E
}
# vim:ts=4:sw=4:expandtab

3
qgroundcontrol.pro

@ -599,8 +599,7 @@ win32-msvc2008|win32-msvc2010|linux{ @@ -599,8 +599,7 @@ win32-msvc2008|win32-msvc2010|linux{
src/ui/XbeeConfigurationWindow.cpp
DEFINES += XBEELINK
INCLUDEPATH += thirdParty/libxbee
# TO DO: build library when it does not exists already
# TO DO: build library when it does not exist already
LIBS += -LthirdParty/libxbee/lib \
-llibxbee
}
Loading…
Cancel
Save