qt3dstudio-git: WIP package
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
From ccccd985256ed81a2bc56ee938c049f596639f11 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Pavlov <alexpux@gmail.com>
|
||||
Date: Tue, 5 Dec 2017 13:45:54 +0300
|
||||
Subject: [PATCH] Fix building Qt3DStudio with mingw
|
||||
|
||||
---
|
||||
src/Authoring/Client/Code/Core/Utility/cpuid.h | 1 +
|
||||
src/Authoring/Studio/Qt3DStudio.pro | 8 ++++----
|
||||
src/Runtime/Qt3DSCompiler/Qt3DSCompiler.pro | 2 +-
|
||||
src/Runtime/Qt3DSRuntime/Qt3DSRuntime.pro | 2 +-
|
||||
src/commonplatform.pri | 1 +
|
||||
src/src.pro | 2 +-
|
||||
6 files changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/Authoring/Client/Code/Core/Utility/cpuid.h b/src/Authoring/Client/Code/Core/Utility/cpuid.h
|
||||
index 9a48731..b9c69e4 100644
|
||||
--- a/src/Authoring/Client/Code/Core/Utility/cpuid.h
|
||||
+++ b/src/Authoring/Client/Code/Core/Utility/cpuid.h
|
||||
@@ -40,6 +40,7 @@
|
||||
#define _MAX_VNAME_LEN 13
|
||||
#define _MAX_MNAME_LEN 30
|
||||
|
||||
+#include <intrin.h>
|
||||
// Added by PB
|
||||
// MSDN Code to detect processor and OS capabilities. From CPUID code example.
|
||||
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcsample/html/vcsamcpuiddeterminecpucapabilities.asp
|
||||
diff --git a/src/Authoring/Studio/Qt3DStudio.pro b/src/Authoring/Studio/Qt3DStudio.pro
|
||||
index c7e31af..e6f49b4 100644
|
||||
--- a/src/Authoring/Studio/Qt3DStudio.pro
|
||||
+++ b/src/Authoring/Studio/Qt3DStudio.pro
|
||||
@@ -8,9 +8,9 @@ CONFIG += nostrictstrings
|
||||
|
||||
DEFINES += _UNICODE UNICODE QT3DS_AUTHORING _AFXDLL \
|
||||
PCRE_STATIC EASTL_MINMAX_ENABLED=0 \
|
||||
- EASTL_NOMINMAX=0 DOM_DYNAMIC DRIVE_DESIGN_STUDIO
|
||||
-
|
||||
-win: QMAKE_LFLAGS += /MANIFEST /ENTRY:"wWinMainCRTStartup"
|
||||
+ EASTL_NOMINMAX=0 DRIVE_DESIGN_STUDIO
|
||||
+#DOM_DYNAMIC
|
||||
+win:!mingw: QMAKE_LFLAGS += /MANIFEST /ENTRY:"wWinMainCRTStartup"
|
||||
|
||||
QT += core gui openglextensions
|
||||
QT += qml quick widgets quickwidgets network
|
||||
@@ -77,7 +77,7 @@ INCLUDEPATH += \
|
||||
../../3rdparty/EASTL/UnknownVersion/include \
|
||||
../../3rdparty/color
|
||||
|
||||
-linux {
|
||||
+linux|mingw {
|
||||
BEGIN_ARCHIVE = -Wl,--whole-archive
|
||||
END_ARCHIVE = -Wl,--no-whole-archive
|
||||
}
|
||||
diff --git a/src/Runtime/Qt3DSCompiler/Qt3DSCompiler.pro b/src/Runtime/Qt3DSCompiler/Qt3DSCompiler.pro
|
||||
index d88fa6c..fe5a84e 100644
|
||||
--- a/src/Runtime/Qt3DSCompiler/Qt3DSCompiler.pro
|
||||
+++ b/src/Runtime/Qt3DSCompiler/Qt3DSCompiler.pro
|
||||
@@ -22,8 +22,8 @@ integrity:ios {
|
||||
STATICRUNTIME = \
|
||||
$$BEGIN_ARCHIVE \
|
||||
-lqt3dsruntimestatic$$qtPlatformTargetSuffix() \
|
||||
- -lEASTL$$qtPlatformTargetSuffix() \
|
||||
-lLua$$qtPlatformTargetSuffix() \
|
||||
+ -lEASTL$$qtPlatformTargetSuffix() \
|
||||
$$END_ARCHIVE
|
||||
|
||||
# On non-windows systems link the whole static archives and do not put them
|
||||
diff --git a/src/Runtime/Qt3DSRuntime/Qt3DSRuntime.pro b/src/Runtime/Qt3DSRuntime/Qt3DSRuntime.pro
|
||||
index 01d632e..b44813b 100644
|
||||
--- a/src/Runtime/Qt3DSRuntime/Qt3DSRuntime.pro
|
||||
+++ b/src/Runtime/Qt3DSRuntime/Qt3DSRuntime.pro
|
||||
@@ -34,8 +34,8 @@ linux|qnx|mingw {
|
||||
STATICRUNTIME = \
|
||||
$$BEGIN_ARCHIVE \
|
||||
-lqt3dsruntimestatic$$qtPlatformTargetSuffix() \
|
||||
- -lEASTL$$qtPlatformTargetSuffix() \
|
||||
-lLua$$qtPlatformTargetSuffix() \
|
||||
+ -lEASTL$$qtPlatformTargetSuffix() \
|
||||
$$END_ARCHIVE
|
||||
|
||||
# On non-windows systems link the whole static archives and do not put them
|
||||
diff --git a/src/commonplatform.pri b/src/commonplatform.pri
|
||||
index d898476..37c4b72 100644
|
||||
--- a/src/commonplatform.pri
|
||||
+++ b/src/commonplatform.pri
|
||||
@@ -78,6 +78,7 @@ android {
|
||||
win32 {
|
||||
DEFINES += QT3DS_OS_WINDOWS _WIN32 _PCPLATFORM \
|
||||
WIDE_IS_DIFFERENT_TYPE_THAN_CHAR16_T LUA_BUILD_AS_DLL KDWIN NOMINMAX
|
||||
+#DOM_DYNAMIC
|
||||
|
||||
win32-msvc {
|
||||
QMAKE_CXXFLAGS += /MP /d2Zi+
|
||||
diff --git a/src/src.pro b/src/src.pro
|
||||
index 85aca0d..2481f79 100644
|
||||
--- a/src/src.pro
|
||||
+++ b/src/src.pro
|
||||
@@ -6,6 +6,6 @@ SUBDIRS += \
|
||||
Runtime \
|
||||
Viewer
|
||||
|
||||
-!cross_compile:!qnx:!mingw {
|
||||
+!cross_compile:!qnx {
|
||||
SUBDIRS += Authoring
|
||||
}
|
||||
--
|
||||
2.15.0
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
From ba6f01d53dedb73731696a512a5a938c1802758b Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Pavlov <alexpux@gmail.com>
|
||||
Date: Tue, 5 Dec 2017 13:53:50 +0300
|
||||
Subject: [PATCH] Fix warnings and building colladadom for mingw
|
||||
|
||||
---
|
||||
1.4.0/dom/include/dae.h | 4 ++++
|
||||
1.4.0/dom/include/dae/daeErrorHandler.h | 4 ++++
|
||||
1.4.0/dom/include/dae/daeWin32Platform.h | 2 +-
|
||||
1.4.0/dom/src/dae/daeErrorHandler.cpp | 4 ++++
|
||||
ColladaDOM.pro | 5 +++--
|
||||
5 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/1.4.0/dom/include/dae.h b/1.4.0/dom/include/dae.h
|
||||
index 5419aca..67a3d0e 100644
|
||||
--- a/1.4.0/dom/include/dae.h
|
||||
+++ b/1.4.0/dom/include/dae.h
|
||||
@@ -287,7 +287,11 @@ private:
|
||||
daeSidRefCache sidRefCache;
|
||||
daeString COLLADA_VERSION, COLLADA_NAMESPACE; // dynamic
|
||||
|
||||
+#if _GLIBCXX_USE_CXX11_ABI > 0
|
||||
+ std::unique_ptr<charEncoding> localCharEncoding;
|
||||
+#else
|
||||
std::auto_ptr<charEncoding> localCharEncoding;
|
||||
+#endif
|
||||
static charEncoding globalCharEncoding;
|
||||
};
|
||||
|
||||
diff --git a/1.4.0/dom/include/dae/daeErrorHandler.h b/1.4.0/dom/include/dae/daeErrorHandler.h
|
||||
index 6ffab01..47edc9e 100644
|
||||
--- a/1.4.0/dom/include/dae/daeErrorHandler.h
|
||||
+++ b/1.4.0/dom/include/dae/daeErrorHandler.h
|
||||
@@ -55,7 +55,11 @@ public:
|
||||
|
||||
private:
|
||||
static daeErrorHandler *_instance;
|
||||
+#if _GLIBCXX_USE_CXX11_ABI > 0
|
||||
+ static std::unique_ptr<daeErrorHandler> _defaultInstance;
|
||||
+#else
|
||||
static std::auto_ptr<daeErrorHandler> _defaultInstance;
|
||||
+#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
diff --git a/1.4.0/dom/include/dae/daeWin32Platform.h b/1.4.0/dom/include/dae/daeWin32Platform.h
|
||||
index e501597..bb055f0 100644
|
||||
--- a/1.4.0/dom/include/dae/daeWin32Platform.h
|
||||
+++ b/1.4.0/dom/include/dae/daeWin32Platform.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#define PLATFORM_FLOAT32 float
|
||||
#define PLATFORM_FLOAT64 double
|
||||
|
||||
-#if _MSC_VER <= 1200
|
||||
+#ifndef __MINGW32__
|
||||
typedef int intptr_t;
|
||||
#endif
|
||||
|
||||
diff --git a/1.4.0/dom/src/dae/daeErrorHandler.cpp b/1.4.0/dom/src/dae/daeErrorHandler.cpp
|
||||
index 264c343..ce9bd54 100644
|
||||
--- a/1.4.0/dom/src/dae/daeErrorHandler.cpp
|
||||
+++ b/1.4.0/dom/src/dae/daeErrorHandler.cpp
|
||||
@@ -10,7 +10,11 @@
|
||||
#include <modules/stdErrPlugin.h>
|
||||
|
||||
daeErrorHandler *daeErrorHandler::_instance = NULL;
|
||||
+#if _GLIBCXX_USE_CXX11_ABI > 0
|
||||
+std::unique_ptr<daeErrorHandler> daeErrorHandler::_defaultInstance(new stdErrPlugin);
|
||||
+#else
|
||||
std::auto_ptr<daeErrorHandler> daeErrorHandler::_defaultInstance(new stdErrPlugin);
|
||||
+#endif
|
||||
|
||||
daeErrorHandler::daeErrorHandler() {
|
||||
}
|
||||
diff --git a/ColladaDOM.pro b/ColladaDOM.pro
|
||||
index 587e5d0..eb3c5a9 100644
|
||||
--- a/ColladaDOM.pro
|
||||
+++ b/ColladaDOM.pro
|
||||
@@ -2,9 +2,10 @@ TARGET = ColladaDOM
|
||||
include($$PWD/../../commonplatform.pri)
|
||||
CONFIG += staticlib
|
||||
DEFINES += HAVE_CONFIG_H DOM_INCLUDE_TINYXML PCRE_STATIC NO_BOOST \
|
||||
- NO_ZAE COLLADA_DOM_SUPPORT141 DOM_DYNAMIC DOM_EXPORT
|
||||
+ NO_ZAE COLLADA_DOM_SUPPORT141
|
||||
+#DOM_DYNAMIC DOM_EXPORT
|
||||
win32 {
|
||||
- QMAKE_LFLAGS += /NODEFAULTLIB:tinyxml.lib
|
||||
+ !mingw: QMAKE_LFLAGS += /NODEFAULTLIB:tinyxml.lib
|
||||
mingw {
|
||||
DEFINES += WIN32
|
||||
}
|
||||
--
|
||||
2.15.0
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
From 2fec00edb26b0b93cb58a9b0a0150b6cf48a347b Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Pavlov <alexpux@gmail.com>
|
||||
Date: Tue, 5 Dec 2017 15:22:07 +0300
|
||||
Subject: [PATCH] Use pragma directives only for MSVC builds
|
||||
|
||||
---
|
||||
src/Authoring/Client/Code/Core/StdAfx.h | 10 +++++-----
|
||||
src/Runtime/Source/Engine/Include/EnginePrefix.h | 4 +++-
|
||||
src/Runtime/Source/Runtime/Include/RuntimePrefix.h | 4 +++-
|
||||
src/Runtime/Source/System/Include/SystemPrefix.h | 4 +++-
|
||||
4 files changed, 14 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/Authoring/Client/Code/Core/StdAfx.h b/src/Authoring/Client/Code/Core/StdAfx.h
|
||||
index cd9d3b8..5cb5150 100644
|
||||
--- a/src/Authoring/Client/Code/Core/StdAfx.h
|
||||
+++ b/src/Authoring/Client/Code/Core/StdAfx.h
|
||||
@@ -33,7 +33,7 @@
|
||||
#pragma once
|
||||
#include "Qt3DSMacros.h"
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
//==============================================================================
|
||||
// Disable certain warnings since warnings are errors
|
||||
//==============================================================================
|
||||
@@ -51,7 +51,7 @@
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
//==============================================================================
|
||||
// Windows Includes
|
||||
//==============================================================================
|
||||
@@ -68,7 +68,7 @@
|
||||
//==============================================================================
|
||||
// STL Includes
|
||||
//==============================================================================
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
#pragma warning(push, 3) // Temporarily pop to warning level 3 while including standard headers
|
||||
#pragma warning(disable : 4018) // Disable mismatched < STL warning
|
||||
#endif
|
||||
@@ -83,7 +83,7 @@
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <limits>
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
#pragma warning(pop) // Pop out to previous warning level (probably level 4)
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4100) // unreferenced formal parameter
|
||||
#pragma warning(disable : 4127) // conditional expression is constant
|
||||
#pragma warning(disable : 4189) // local variable is initialized but not referenced
|
||||
diff --git a/src/Runtime/Source/Engine/Include/EnginePrefix.h b/src/Runtime/Source/Engine/Include/EnginePrefix.h
|
||||
index 32858ae..31f7658 100644
|
||||
--- a/src/Runtime/Source/Engine/Include/EnginePrefix.h
|
||||
+++ b/src/Runtime/Source/Engine/Include/EnginePrefix.h
|
||||
@@ -36,7 +36,9 @@
|
||||
//==============================================================================
|
||||
// DEFINES
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
+#endif //_WIN32
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
//==============================================================================
|
||||
// DISABLED WARNINGS
|
||||
//
|
||||
@@ -67,7 +69,7 @@
|
||||
#pragma warning(disable : 4826) // Conversion from 'const void *' to 'void *' is sign-extended
|
||||
//#pragma warning( disable : 4996 ) // _snprintf' was declared deprecated
|
||||
|
||||
-#endif //_WIN32
|
||||
+#endif //_MSC_VER
|
||||
|
||||
//==============================================================================
|
||||
// Non-windows environments need to declare this
|
||||
diff --git a/src/Runtime/Source/Runtime/Include/RuntimePrefix.h b/src/Runtime/Source/Runtime/Include/RuntimePrefix.h
|
||||
index bf729eb..a7292f3 100644
|
||||
--- a/src/Runtime/Source/Runtime/Include/RuntimePrefix.h
|
||||
+++ b/src/Runtime/Source/Runtime/Include/RuntimePrefix.h
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "render/backends/gl/Qt3DSOpenGLPrefix.h"
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#ifdef _MSC_VER
|
||||
//==============================================================================
|
||||
// DISABLED WARNINGS
|
||||
//
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
#pragma warning(disable : 4640) // construction of local static object is not thread-safe
|
||||
#pragma warning(disable : 4127) // conditional expression is constant
|
||||
+#endif //_MSC_VER
|
||||
|
||||
+#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif //_WIN32
|
||||
|
||||
diff --git a/src/Runtime/Source/System/Include/SystemPrefix.h b/src/Runtime/Source/System/Include/SystemPrefix.h
|
||||
index aa1ba18..9f02565 100644
|
||||
--- a/src/Runtime/Source/System/Include/SystemPrefix.h
|
||||
+++ b/src/Runtime/Source/System/Include/SystemPrefix.h
|
||||
@@ -34,7 +34,9 @@
|
||||
//==============================================================================
|
||||
// DEFINES
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
+#endif //_WIN32
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
//==============================================================================
|
||||
// DISABLED WARNINGS
|
||||
//
|
||||
@@ -63,7 +65,7 @@
|
||||
#pragma warning(disable : 4127) // conditional expression is constant
|
||||
#pragma warning( \
|
||||
disable : 4738) // storing 32-bit float result in memory, possible loss of performance
|
||||
-#endif //_WIN32
|
||||
+#endif //_MSC_VER
|
||||
|
||||
//==============================================================================
|
||||
// STD INCLUDES - Standard includes MUST come first
|
||||
--
|
||||
2.15.0
|
||||
|
||||
78
mingw-w64-qt3dstudio-git/PKGBUILD
Normal file
78
mingw-w64-qt3dstudio-git/PKGBUILD
Normal file
@@ -0,0 +1,78 @@
|
||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
|
||||
|
||||
_realname=qt3dstudio
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git"
|
||||
_base_ver=1.0.0
|
||||
pkgver=1.0.0.r201.2b75758
|
||||
pkgrel=1
|
||||
pkgdesc='3D tool for Qt ecosystem (mingw-w64)'
|
||||
url='https://www.qt.io/'
|
||||
arch=('any')
|
||||
license=('LGPL')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-qt5"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc"
|
||||
"${MINGW_PACKAGE_PREFIX}-make")
|
||||
makedepends=("git" "perl")
|
||||
options=('docs' 'staticlibs') # 'debug' '!strip')
|
||||
source=(${_realname}::git+https://codereview.qt-project.org/qt3dstudio/qt3dstudio
|
||||
${_realname}/src/3rdparty/ColladaDOM::git+https://codereview.qt-project.org/qt3dstudio/qt3dstudio-collada-dom
|
||||
${_realname}/src/3rdparty/EASTL::git+https://codereview.qt-project.org/qt3dstudio/qt3dstudio-eastl
|
||||
${_realname}/src/3rdparty/Lua::git+https://codereview.qt-project.org/qt3dstudio/qt3dstudio-lua
|
||||
${_realname}/src/3rdparty/pcre::git+https://codereview.qt-project.org/qt3dstudio/qt3dstudio-pcre
|
||||
0001-Fix-building-Qt3DStudio-with-mingw.patch
|
||||
0002-Use-pragma-directives-only-for-MSVC-builds.patch
|
||||
0001-Fix-warnings-and-building-colladadom-for-mingw.patch)
|
||||
sha256sums=('SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'SKIP'
|
||||
'6cf6d9dfd71c0bbfaadf808688122e60dad95bec346866023ecc5680970c5c83'
|
||||
'9240fbd8d1f8de5fc732071910ced18102ae05f475e19645907a7bfb37d63cd8'
|
||||
'f49d42fa7cb727eee3246e7c65eaea5a424db96f4dae6f4af96973b951f29fca')
|
||||
|
||||
pkgver() {
|
||||
cd "${_realname}"
|
||||
|
||||
local full_version=${_base_ver}.r$(git rev-list --count --first-parent HEAD ).$(git rev-parse --short HEAD )
|
||||
|
||||
printf "%s" $full_version
|
||||
}
|
||||
|
||||
prepare() {
|
||||
mv ${srcdir}/ColladaDOM ${srcdir}/${_realname}/src/3rdparty/
|
||||
mv ${srcdir}/EASTL ${srcdir}/${_realname}/src/3rdparty/
|
||||
mv ${srcdir}/Lua ${srcdir}/${_realname}/src/3rdparty/
|
||||
mv ${srcdir}/pcre ${srcdir}/${_realname}/src/3rdparty/
|
||||
|
||||
cd ${srcdir}/${_realname}
|
||||
patch -p1 -i ${srcdir}/0001-Fix-building-Qt3DStudio-with-mingw.patch
|
||||
patch -p1 -i ${srcdir}/0002-Use-pragma-directives-only-for-MSVC-builds.patch
|
||||
pushd src/3rdparty/ColladaDOM
|
||||
patch -p1 -i ${srcdir}/0001-Fix-warnings-and-building-colladadom-for-mingw.patch
|
||||
popd
|
||||
}
|
||||
|
||||
build() {
|
||||
[[ -d ${srcdir}/build-${MINGW_CHOST} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}
|
||||
mkdir ${srcdir}/build-${MINGW_CHOST}
|
||||
|
||||
local absSrcDir = $(cygpath -wm ${srcdir})
|
||||
cd ${absSrcDir}/build-${MINGW_CHOST}
|
||||
if check_option "debug" "y"; then
|
||||
_config_variant=debug
|
||||
else
|
||||
_config_variant=release
|
||||
fi
|
||||
${MINGW_PREFIX}/bin/qmake.exe ${absSrcDir}/${_realname}/qt3dstudio.pro CONFIG+=${_config_variant}
|
||||
make ${_config_variant}
|
||||
make docs
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
make INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install
|
||||
make INSTALL_ROOT="${pkgdir}${MINGW_PREFIX}" install_docs
|
||||
}
|
||||
Reference in New Issue
Block a user