1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Merge remote-tracking branch 'origin/shared/OP-1398_qt531_upgrade' into thread/OP-1400_Qt_5.3.1_Upgrade

Conflicts:
	make/tools.mk
This commit is contained in:
Fredrik Arvidsson 2014-08-11 23:25:37 +02:00
commit 1558c6d735
5 changed files with 52 additions and 10 deletions

View File

@ -138,9 +138,9 @@ GCS_LIBRARY_PATH
Qt5MultimediaWidgets$${DS}.dll \ Qt5MultimediaWidgets$${DS}.dll \
Qt5Quick$${DS}.dll \ Qt5Quick$${DS}.dll \
Qt5Qml$${DS}.dll \ Qt5Qml$${DS}.dll \
icuin51.dll \ icuin52.dll \
icudt51.dll \ icudt52.dll \
icuuc51.dll icuuc52.dll
# it is more robust to take the following DLLs from Qt rather than from MinGW # it is more robust to take the following DLLs from Qt rather than from MinGW
QT_DLLS += libgcc_s_dw2-1.dll \ QT_DLLS += libgcc_s_dw2-1.dll \
libstdc++-6.dll \ libstdc++-6.dll \

View File

@ -67,11 +67,7 @@ HIDAPI BOOL WINAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA);
HIDAPI BOOL WINAPI HidD_FlushQueue(HANDLE); HIDAPI BOOL WINAPI HidD_FlushQueue(HANDLE);
HIDAPI BOOL WINAPI HidD_GetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG); HIDAPI BOOL WINAPI HidD_GetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG);
HIDAPI BOOL WINAPI HidD_SetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG); HIDAPI BOOL WINAPI HidD_SetConfiguration(HANDLE, PHIDD_CONFIGURATION, ULONG);
HIDAPI BOOL WINAPI HidD_GetNumInputBuffers(HANDLE, PULONG);
HIDAPI BOOL WINAPI HidD_SetNumInputBuffers(HANDLE HidDeviceObject, ULONG);
HIDAPI BOOL WINAPI HidD_GetPhysicalDescriptor(HANDLE, PVOID, ULONG); HIDAPI BOOL WINAPI HidD_GetPhysicalDescriptor(HANDLE, PVOID, ULONG);
HIDAPI BOOL WINAPI HidD_GetManufacturerString(HANDLE, PVOID, ULONG);
HIDAPI BOOL WINAPI HidD_GetProductString(HANDLE, PVOID, ULONG);
HIDAPI BOOL WINAPI HidD_GetIndexedString(HANDLE, ULONG, PVOID, ULONG); HIDAPI BOOL WINAPI HidD_GetIndexedString(HANDLE, ULONG, PVOID, ULONG);
HIDAPI BOOL WINAPI HidD_GetSerialNumberString(HANDLE, PVOID, ULONG); HIDAPI BOOL WINAPI HidD_GetSerialNumberString(HANDLE, PVOID, ULONG);

View File

@ -117,12 +117,29 @@ bool sortPorts(const QSerialPortInfo &s1, const QSerialPortInfo &s2)
return s1.portName() < s2.portName(); return s1.portName() < s2.portName();
} }
QList<QSerialPortInfo> SerialConnection::availablePorts()
{
QList<QSerialPortInfo> ports = QSerialPortInfo::availablePorts();
#if QT_VERSION == 0x050301 && defined(Q_OS_WIN)
// workaround to QTBUG-39748 (https://bugreports.qt-project.org/browse/QTBUG-39748)
// Qt 5.3.1 reports spurious ports with an empty description...
QMutableListIterator<QSerialPortInfo> i(ports);
while (i.hasNext()) {
if (i.next().description().isEmpty()) {
i.remove();
}
}
#endif
return ports;
}
QList <Core::IConnection::device> SerialConnection::availableDevices() QList <Core::IConnection::device> SerialConnection::availableDevices()
{ {
QList <Core::IConnection::device> list; QList <Core::IConnection::device> list;
if (enablePolling) { if (enablePolling) {
QList<QSerialPortInfo> ports = QSerialPortInfo::availablePorts(); QList<QSerialPortInfo> ports = availablePorts();
// sort the list by port number (nice idea from PT_Dreamer :)) // sort the list by port number (nice idea from PT_Dreamer :))
qSort(ports.begin(), ports.end(), sortPorts); qSort(ports.begin(), ports.end(), sortPorts);
@ -143,7 +160,7 @@ QIODevice *SerialConnection::openDevice(const QString &deviceName)
if (serialHandle) { if (serialHandle) {
closeDevice(deviceName); closeDevice(deviceName);
} }
QList<QSerialPortInfo> ports = QSerialPortInfo::availablePorts(); QList<QSerialPortInfo> ports = availablePorts();
foreach(QSerialPortInfo port, ports) { foreach(QSerialPortInfo port, ports) {
if (port.portName() == deviceName) { if (port.portName() == deviceName) {
// don't specify a parent when constructing the QSerialPort as this object will be moved // don't specify a parent when constructing the QSerialPort as this object will be moved

View File

@ -107,6 +107,8 @@ private:
SerialPluginConfiguration *m_config; SerialPluginConfiguration *m_config;
SerialPluginOptionsPage *m_optionspage; SerialPluginOptionsPage *m_optionspage;
QList<QSerialPortInfo> availablePorts();
protected slots: protected slots:
void onEnumerationChanged(); void onEnumerationChanged();

View File

@ -83,8 +83,13 @@ else ifeq ($(UNAME), Windows)
ARM_SDK_URL := https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip ARM_SDK_URL := https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip
ARM_SDK_MD5_URL:= https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip/+md5 ARM_SDK_MD5_URL:= https://launchpad.net/gcc-arm-embedded/4.8/4.8-2014-q1-update/+download/gcc-arm-none-eabi-4_8-2014q1-20140314-win32.zip/+md5
QT_SDK_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe QT_SDK_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe
<<<<<<< HEAD
QT_SDK_MD5_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe.md5 QT_SDK_MD5_URL := http://download.qt-project.org/official_releases/qt/5.3/5.3.1/qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe.md5
QT_SDK_ARCH := mingw48_32 QT_SDK_ARCH := mingw48_32
=======
QT_SDK_MD5_URL := http://wiki.openpilot.org/download/attachments/18612236/qt-opensource-windows-x86-mingw482_opengl-5.3.1.exe.md5
QT_SDK_ARCH := mingw482_32
>>>>>>> origin/shared/OP-1398_qt531_upgrade
NSIS_URL := http://wiki.openpilot.org/download/attachments/18612236/nsis-2.46-unicode.tar.bz2 NSIS_URL := http://wiki.openpilot.org/download/attachments/18612236/nsis-2.46-unicode.tar.bz2
SDL_URL := http://wiki.openpilot.org/download/attachments/18612236/SDL-devel-1.2.15-mingw32.tar.gz SDL_URL := http://wiki.openpilot.org/download/attachments/18612236/SDL-devel-1.2.15-mingw32.tar.gz
OPENSSL_URL := http://wiki.openpilot.org/download/attachments/18612236/openssl-1.0.1e-win32.tar.bz2 OPENSSL_URL := http://wiki.openpilot.org/download/attachments/18612236/openssl-1.0.1e-win32.tar.bz2
@ -98,15 +103,26 @@ GTEST_URL := http://wiki.openpilot.org/download/attachments/18612236/gtest-1.6.0
# Changing PYTHON_DIR, also update it in ground/openpilotgcs/src/python.pri # Changing PYTHON_DIR, also update it in ground/openpilotgcs/src/python.pri
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_8-2014q1 ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_8-2014q1
QT_SDK_DIR := $(TOOLS_DIR)/qt-5.3.1 QT_SDK_DIR := $(TOOLS_DIR)/qt-5.3.1
<<<<<<< HEAD
MINGW_DIR := $(QT_SDK_DIR)/Tools/mingw48_32 MINGW_DIR := $(QT_SDK_DIR)/Tools/mingw48_32
PYTHON_DIR := $(QT_SDK_DIR)/Tools/mingw48_32/opt/bin PYTHON_DIR := $(QT_SDK_DIR)/Tools/mingw48_32/opt/bin
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
SDL_DIR := $(TOOLS_DIR)/SDL-1.2.15 SDL_DIR := $(TOOLS_DIR)/SDL-1.2.15
OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32 OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32
=======
>>>>>>> origin/shared/OP-1398_qt531_upgrade
UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60 UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60
DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1 DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1
GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0 GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0
MESAWIN_DIR := $(TOOLS_DIR)/mesawin
ifeq ($(UNAME), Windows)
MINGW_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH)
PYTHON_DIR := $(QT_SDK_DIR)/Tools/$(QT_SDK_ARCH)/opt/bin
NSIS_DIR := $(TOOLS_DIR)/nsis-2.46-unicode
SDL_DIR := $(TOOLS_DIR)/SDL-1.2.15
OPENSSL_DIR := $(TOOLS_DIR)/openssl-1.0.1e-win32
MESAWIN_DIR := $(TOOLS_DIR)/mesawin
endif
QT_SDK_PREFIX := $(QT_SDK_DIR) QT_SDK_PREFIX := $(QT_SDK_DIR)
@ -353,6 +369,7 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
$(V1) $(DL_DIR)/$(5) --dump-binary-data -o $(1) $(V1) $(DL_DIR)/$(5) --dump-binary-data -o $(1)
# Extract packages under tool directory # Extract packages under tool directory
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(2))) $(V1) $(MKDIR) -p $$(call toprel, $(dir $(2)))
<<<<<<< HEAD
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0qt-project-url.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0qt-project-url.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt/1.0.0ThirdPartySoftware_Listing.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt/1.0.0ThirdPartySoftware_Listing.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0readme.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0readme.7z" | grep -v Extracting
@ -361,6 +378,16 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw48.essentials/5.3.1icu_51_1_mingw_builds_4_8_0_posix_dwarf_32.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw48.essentials/5.3.1icu_51_1_mingw_builds_4_8_0_posix_dwarf_32.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw48.addons/5.3.1mingw48_addons.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw48.addons/5.3.1mingw48_addons.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.tools.win32_mingw48/4.8.0-1-1x32-4.8.0-release-posix-dwarf-rev2.7z" | grep -v Extracting $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.tools.win32_mingw48/4.8.0-1-1x32-4.8.0-release-posix-dwarf-rev2.7z" | grep -v Extracting
=======
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0qt-project-url.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt/5.3.1ThirdPartySoftware_Listing.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.readme/1.0.0-0readme.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw482/5.3.1-0qt5_essentials.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw482/5.3.1-0i686-4.8.2-release-posix-dwarf-rt_v3-rev3-runtime.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw482/5.3.1-0icu_52_1_mingw_builds_32_4_8_2_posix_dwarf.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.53.win32_mingw482/5.3.1-0qt5_addons.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.tools.win32_mingw482/4.8.2i686-4.8.2-release-posix-dwarf-rt_v3-rev3.7z" | grep -v Extracting
>>>>>>> origin/shared/OP-1398_qt531_upgrade
# Run patcher # Run patcher
@$(ECHO) @$(ECHO)
@$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX)) @$(ECHO) "Executing QtPatch in" $$(call toprel, $(QT_SDK_PREFIX))