From a4092a3234613ae14d8a98f054d9623987a22fce Mon Sep 17 00:00:00 2001 From: ywang Date: Fri, 20 Sep 2019 17:53:15 -0700 Subject: [PATCH 01/12] correct uvset index --- code/FBX/FBXExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 8ebc8555a..4a25c9291 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -1221,7 +1221,7 @@ void FBXExporter::WriteObjects () for(unsigned int lr = 1; lr < m->GetNumUVChannels(); ++ lr) { - FBX::Node layerExtra("Layer", int32_t(1)); + FBX::Node layerExtra("Layer", int32_t(lr)); layerExtra.AddChild("Version", int32_t(100)); FBX::Node leExtra("LayerElement"); leExtra.AddChild("Type", "LayerElementUV"); From 0e6478c0d406c6a2f6720edfeff0b5854563da93 Mon Sep 17 00:00:00 2001 From: Theak Date: Sun, 22 Sep 2019 09:59:58 +0100 Subject: [PATCH 02/12] Fix: Wrong aiAnimation::mTicksPerSecond for gltf2 imports (fixes #2662) --- code/glTF2/glTF2Importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index d1871ce0e..d0befe2f7 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -1177,7 +1177,7 @@ void glTF2Importer::ImportAnimations(glTF2::Asset& r) } } ai_anim->mDuration = maxDuration; - ai_anim->mTicksPerSecond = (maxNumberOfKeys > 0 && maxDuration > 0) ? (maxNumberOfKeys / (maxDuration/1000)) : 30; + ai_anim->mTicksPerSecond = 0.001; mScene->mAnimations[i] = ai_anim; } From 61fa619f92f59993a2a178366e38ab1b78e372a6 Mon Sep 17 00:00:00 2001 From: Theak Date: Sun, 22 Sep 2019 10:24:30 +0100 Subject: [PATCH 03/12] Fix: Mismatched new/free in gltf2 importer (fixes #2668) --- code/glTF2/glTF2Importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index d1871ce0e..6a2f3c8e3 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -1037,7 +1037,7 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl delete[] values; } else if (node.translation.isPresent) { anim->mNumPositionKeys = 1; - anim->mPositionKeys = new aiVectorKey(); + anim->mPositionKeys = new aiVectorKey[anim->mNumPositionKeys]; anim->mPositionKeys->mTime = 0.f; anim->mPositionKeys->mValue.x = node.translation.value[0]; anim->mPositionKeys->mValue.y = node.translation.value[1]; From e0fee3d87b78dc90c42c1099e7793aef337fa5cc Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 25 Sep 2019 09:57:53 +0100 Subject: [PATCH 04/12] gltf2.0 importer - Support for mesh morph animations added. Signed-off-by: Victor Cebollada --- code/Common/SceneCombiner.cpp | 21 +++ code/PostProcessing/ValidateDataStructure.cpp | 61 ++++++++- code/PostProcessing/ValidateDataStructure.h | 8 ++ code/glTF2/glTF2Importer.cpp | 129 +++++++++++++++++- include/assimp/SceneCombiner.h | 2 + 5 files changed, 212 insertions(+), 9 deletions(-) diff --git a/code/Common/SceneCombiner.cpp b/code/Common/SceneCombiner.cpp index 4e6bc5b47..f7b13cc95 100644 --- a/code/Common/SceneCombiner.cpp +++ b/code/Common/SceneCombiner.cpp @@ -1196,6 +1196,7 @@ void SceneCombiner::Copy( aiAnimation** _dest, const aiAnimation* src ) { // and reallocate all arrays CopyPtrArray( dest->mChannels, src->mChannels, dest->mNumChannels ); + CopyPtrArray( dest->mMorphMeshChannels, src->mMorphMeshChannels, dest->mNumMorphMeshChannels ); } // ------------------------------------------------------------------------------------------------ @@ -1215,6 +1216,26 @@ void SceneCombiner::Copy(aiNodeAnim** _dest, const aiNodeAnim* src) { GetArrayCopy( dest->mRotationKeys, dest->mNumRotationKeys ); } +void SceneCombiner::Copy(aiMeshMorphAnim** _dest, const aiMeshMorphAnim* src) { + if ( nullptr == _dest || nullptr == src ) { + return; + } + + aiMeshMorphAnim* dest = *_dest = new aiMeshMorphAnim(); + + // get a flat copy + ::memcpy(dest,src,sizeof(aiMeshMorphAnim)); + + // and reallocate all arrays + GetArrayCopy( dest->mKeys, dest->mNumKeys ); + for (ai_uint i = 0; i < dest->mNumKeys;++i) { + dest->mKeys[i].mValues = new unsigned int[dest->mKeys[i].mNumValuesAndWeights]; + dest->mKeys[i].mWeights = new double[dest->mKeys[i].mNumValuesAndWeights]; + ::memcpy(dest->mKeys[i].mValues, src->mKeys[i].mValues, dest->mKeys[i].mNumValuesAndWeights * sizeof(unsigned int)); + ::memcpy(dest->mKeys[i].mWeights, src->mKeys[i].mWeights, dest->mKeys[i].mNumValuesAndWeights * sizeof(double)); + } +} + // ------------------------------------------------------------------------------------------------ void SceneCombiner::Copy( aiCamera** _dest,const aiCamera* src) { if ( nullptr == _dest || nullptr == src ) { diff --git a/code/PostProcessing/ValidateDataStructure.cpp b/code/PostProcessing/ValidateDataStructure.cpp index 501f7a9b2..75d1b6ef7 100644 --- a/code/PostProcessing/ValidateDataStructure.cpp +++ b/code/PostProcessing/ValidateDataStructure.cpp @@ -538,13 +538,17 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation) { Validate(&pAnimation->mName); - // validate all materials - if (pAnimation->mNumChannels) + // validate all animations + if (pAnimation->mNumChannels || pAnimation->mNumMorphMeshChannels) { - if (!pAnimation->mChannels) { + if (!pAnimation->mChannels && pAnimation->mNumChannels) { ReportError("aiAnimation::mChannels is NULL (aiAnimation::mNumChannels is %i)", pAnimation->mNumChannels); } + if (!pAnimation->mMorphMeshChannels && pAnimation->mNumMorphMeshChannels) { + ReportError("aiAnimation::mMorphMeshChannels is NULL (aiAnimation::mNumMorphMeshChannels is %i)", + pAnimation->mNumMorphMeshChannels); + } for (unsigned int i = 0; i < pAnimation->mNumChannels;++i) { if (!pAnimation->mChannels[i]) @@ -554,6 +558,15 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation) } Validate(pAnimation, pAnimation->mChannels[i]); } + for (unsigned int i = 0; i < pAnimation->mNumMorphMeshChannels;++i) + { + if (!pAnimation->mMorphMeshChannels[i]) + { + ReportError("aiAnimation::mMorphMeshChannels[%i] is NULL (aiAnimation::mNumMorphMeshChannels is %i)", + i, pAnimation->mNumMorphMeshChannels); + } + Validate(pAnimation, pAnimation->mMorphMeshChannels[i]); + } } else { ReportError("aiAnimation::mNumChannels is 0. At least one node animation channel must be there."); @@ -903,6 +916,48 @@ void ValidateDSProcess::Validate( const aiAnimation* pAnimation, } } +void ValidateDSProcess::Validate( const aiAnimation* pAnimation, + const aiMeshMorphAnim* pMeshMorphAnim) +{ + Validate(&pMeshMorphAnim->mName); + + if (!pMeshMorphAnim->mNumKeys) { + ReportError("Empty mesh morph animation channel"); + } + + // otherwise check whether one of the keys exceeds the total duration of the animation + if (pMeshMorphAnim->mNumKeys) + { + if (!pMeshMorphAnim->mKeys) + { + ReportError("aiMeshMorphAnim::mKeys is NULL (aiMeshMorphAnim::mNumKeys is %i)", + pMeshMorphAnim->mNumKeys); + } + double dLast = -10e10; + for (unsigned int i = 0; i < pMeshMorphAnim->mNumKeys;++i) + { + // ScenePreprocessor will compute the duration if still the default value + // (Aramis) Add small epsilon, comparison tended to fail if max_time == duration, + // seems to be due the compilers register usage/width. + if (pAnimation->mDuration > 0. && pMeshMorphAnim->mKeys[i].mTime > pAnimation->mDuration+0.001) + { + ReportError("aiMeshMorphAnim::mKeys[%i].mTime (%.5f) is larger " + "than aiAnimation::mDuration (which is %.5f)",i, + (float)pMeshMorphAnim->mKeys[i].mTime, + (float)pAnimation->mDuration); + } + if (i && pMeshMorphAnim->mKeys[i].mTime <= dLast) + { + ReportWarning("aiMeshMorphAnim::mKeys[%i].mTime (%.5f) is smaller " + "than aiMeshMorphAnim::mKeys[%i] (which is %.5f)",i, + (float)pMeshMorphAnim->mKeys[i].mTime, + i-1, (float)dLast); + } + dLast = pMeshMorphAnim->mKeys[i].mTime; + } + } +} + // ------------------------------------------------------------------------------------------------ void ValidateDSProcess::Validate( const aiNode* pNode) { diff --git a/code/PostProcessing/ValidateDataStructure.h b/code/PostProcessing/ValidateDataStructure.h index 0b891ef41..7b309c925 100644 --- a/code/PostProcessing/ValidateDataStructure.h +++ b/code/PostProcessing/ValidateDataStructure.h @@ -55,6 +55,7 @@ struct aiBone; struct aiMesh; struct aiAnimation; struct aiNodeAnim; +struct aiMeshMorphAnim; struct aiTexture; struct aiMaterial; struct aiNode; @@ -150,6 +151,13 @@ protected: void Validate( const aiAnimation* pAnimation, const aiNodeAnim* pBoneAnim); + /** Validates a mesh morph animation channel. + * @param pAnimation Input animation. + * @param pMeshMorphAnim Mesh morph animation channel. + * */ + void Validate( const aiAnimation* pAnimation, + const aiMeshMorphAnim* pMeshMorphAnim); + // ------------------------------------------------------------------- /** Validates a node and all of its subnodes * @param Node Input node*/ diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index 82c6cbfa8..fbffd900a 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -1005,13 +1005,15 @@ struct AnimationSamplers { AnimationSamplers() : translation(nullptr) , rotation(nullptr) - , scale(nullptr) { + , scale(nullptr) + , weight(nullptr) { // empty } Animation::Sampler* translation; Animation::Sampler* rotation; Animation::Sampler* scale; + Animation::Sampler* weight; }; aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& samplers) @@ -1094,6 +1096,43 @@ aiNodeAnim* CreateNodeAnim(glTF2::Asset& r, Node& node, AnimationSamplers& sampl return anim; } +aiMeshMorphAnim* CreateMeshMorphAnim(glTF2::Asset& r, Node& node, AnimationSamplers& samplers) +{ + aiMeshMorphAnim* anim = new aiMeshMorphAnim(); + anim->mName = GetNodeName(node); + + static const float kMillisecondsFromSeconds = 1000.f; + + if (nullptr != samplers.weight) { + float* times = nullptr; + samplers.weight->input->ExtractData(times); + float* values = nullptr; + samplers.weight->output->ExtractData(values); + anim->mNumKeys = static_cast(samplers.weight->input->count); + + const unsigned int numMorphs = samplers.weight->output->count / anim->mNumKeys; + + anim->mKeys = new aiMeshMorphKey[anim->mNumKeys]; + unsigned int k = 0u; + for (unsigned int i = 0u; i < anim->mNumKeys; ++i) { + anim->mKeys[i].mTime = times[i] * kMillisecondsFromSeconds; + anim->mKeys[i].mNumValuesAndWeights = numMorphs; + anim->mKeys[i].mValues = new unsigned int[numMorphs]; + anim->mKeys[i].mWeights = new double[numMorphs]; + + for (unsigned int j = 0u; j < numMorphs; ++j, ++k) { + anim->mKeys[i].mValues[j] = j; + anim->mKeys[i].mWeights[j] = ( 0.f > values[k] ) ? 0.f : values[k]; + } + } + + delete[] times; + delete[] values; + } + + return anim; +} + std::unordered_map GatherSamplers(Animation& anim) { std::unordered_map samplers; @@ -1112,6 +1151,8 @@ std::unordered_map GatherSamplers(Animation& an sampler.rotation = &anim.samplers[channel.sampler]; } else if (channel.target.path == AnimationPath_SCALE) { sampler.scale = &anim.samplers[channel.sampler]; + } else if (channel.target.path == AnimationPath_WEIGHTS) { + sampler.weight = &anim.samplers[channel.sampler]; } } @@ -1138,13 +1179,39 @@ void glTF2Importer::ImportAnimations(glTF2::Asset& r) std::unordered_map samplers = GatherSamplers(anim); - ai_anim->mNumChannels = static_cast(samplers.size()); + uint32_t numChannels = 0u; + uint32_t numMorphMeshChannels = 0u; + + for (auto& iter : samplers) { + if ((nullptr != iter.second.rotation) || (nullptr != iter.second.scale) || (nullptr != iter.second.translation)) { + ++numChannels; + } + if (nullptr != iter.second.weight) { + ++numMorphMeshChannels; + } + } + + ai_anim->mNumChannels = numChannels; if (ai_anim->mNumChannels > 0) { ai_anim->mChannels = new aiNodeAnim*[ai_anim->mNumChannels]; int j = 0; for (auto& iter : samplers) { - ai_anim->mChannels[j] = CreateNodeAnim(r, r.nodes[iter.first], iter.second); - ++j; + if ((nullptr != iter.second.rotation) || (nullptr != iter.second.scale) || (nullptr != iter.second.translation)) { + ai_anim->mChannels[j] = CreateNodeAnim(r, r.nodes[iter.first], iter.second); + ++j; + } + } + } + + ai_anim->mNumMorphMeshChannels = numMorphMeshChannels; + if (ai_anim->mNumMorphMeshChannels > 0) { + ai_anim->mMorphMeshChannels = new aiMeshMorphAnim*[ai_anim->mNumMorphMeshChannels]; + int j = 0; + for (auto& iter : samplers) { + if (nullptr != iter.second.weight) { + ai_anim->mMorphMeshChannels[j] = CreateMeshMorphAnim(r, r.nodes[iter.first], iter.second); + ++j; + } } } @@ -1175,8 +1242,58 @@ void glTF2Importer::ImportAnimations(glTF2::Asset& r) maxNumberOfKeys = std::max(maxNumberOfKeys, chan->mNumScalingKeys); } } - ai_anim->mDuration = maxDuration; - ai_anim->mTicksPerSecond = (maxNumberOfKeys > 0 && maxDuration > 0) ? (maxNumberOfKeys / (maxDuration/1000)) : 30; + + for (unsigned int j = 0; j < ai_anim->mNumMorphMeshChannels; ++j) { + const auto* const chan = ai_anim->mMorphMeshChannels[j]; + + if (0u != chan->mNumKeys) { + const auto& lastKey = chan->mKeys[chan->mNumKeys - 1u]; + if (lastKey.mTime > maxDuration) { + maxDuration = lastKey.mTime; + } + maxNumberOfKeys = std::max(maxNumberOfKeys, chan->mNumKeys); + } + } + + ai_anim->mDuration = static_cast(maxNumberOfKeys - 1u); /// According the documentation in anim.h the mDuration units are ticks. + ai_anim->mTicksPerSecond = (maxNumberOfKeys > 0 && maxDuration > 0) ? ((maxNumberOfKeys-1u) / (maxDuration / 1000.0)) : 30.0; + + // Set all the times of the keys in ticks. + + const float kMsToTicks = ai_anim->mTicksPerSecond / 1000.f; + + for (unsigned int j = 0; j < ai_anim->mNumChannels; ++j) { + auto chan = ai_anim->mChannels[j]; + if (0u != chan->mNumPositionKeys) { + for (unsigned int k = 0u; k < chan->mNumPositionKeys; ++k) + { + chan->mPositionKeys[k].mTime *= kMsToTicks; + } + } + if (0u != chan->mNumRotationKeys) { + for (unsigned int k = 0u; k < chan->mNumRotationKeys; ++k) + { + chan->mRotationKeys[k].mTime *= kMsToTicks; + } + } + if (0u != chan->mNumScalingKeys) { + for (unsigned int k = 0u; k < chan->mNumScalingKeys; ++k) + { + chan->mScalingKeys[k].mTime *= kMsToTicks; + } + } + } + + for (unsigned int j = 0; j < ai_anim->mNumMorphMeshChannels; ++j) { + const auto* const chan = ai_anim->mMorphMeshChannels[j]; + + if (0u != chan->mNumKeys) { + for (unsigned int k = 0u; k < chan->mNumKeys; ++k) + { + chan->mKeys[k].mTime = static_cast(k); + } + } + } mScene->mAnimations[i] = ai_anim; } diff --git a/include/assimp/SceneCombiner.h b/include/assimp/SceneCombiner.h index f69a25f43..e594f649f 100644 --- a/include/assimp/SceneCombiner.h +++ b/include/assimp/SceneCombiner.h @@ -68,6 +68,7 @@ struct aiMesh; struct aiAnimMesh; struct aiAnimation; struct aiNodeAnim; +struct aiMeshMorphAnim; namespace Assimp { @@ -372,6 +373,7 @@ public: static void Copy (aiBone** dest, const aiBone* src); static void Copy (aiLight** dest, const aiLight* src); static void Copy (aiNodeAnim** dest, const aiNodeAnim* src); + static void Copy (aiMeshMorphAnim** dest, const aiMeshMorphAnim* src); static void Copy (aiMetadata** dest, const aiMetadata* src); // recursive, of course From 8101bc6a77c6df33017235a249915cb8b92ab092 Mon Sep 17 00:00:00 2001 From: grdowns Date: Thu, 26 Sep 2019 17:46:26 -0700 Subject: [PATCH 05/12] Add vcpkg installation instructions --- Build.md | 28 +++++++++++++++++++++------- Readme.md | 2 +- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/Build.md b/Build.md index 7c908606d..2db47798d 100644 --- a/Build.md +++ b/Build.md @@ -1,17 +1,31 @@ # Build Instructions -## Install CMake + +## Build on all platforms using vcpkg +You can download and install assimp using the [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: +```bash + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + vcpkg install assimp +``` +The assimp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +## Manual build instructions + +### Install CMake Asset-Importer-Lib can be build for a lot of different platforms. We are using cmake to generate the build environment for these via cmake. So you have to make sure that you have a working cmake-installation on your system. You can download it at https://cmake.org/ or for linux install it via ```bash sudo apt-get install cmake ``` -## Get the source +### Get the source Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via: ```bash git clone https://github.com/assimp/assimp.git ``` -## Build instructions for Windows with Visual-Studio +### Build instructions for Windows with Visual-Studio First you have to install Visual-Studio on your windows-system. You can get the Community-Version for free here: https://visualstudio.microsoft.com/de/downloads/ To generate the build environment for your IDE open a command prompt, navigate to your repo and type: @@ -20,10 +34,10 @@ cmake CMakeLists.txt ``` This will generate the project files for the visual studio. All dependencies used to build Asset-IMporter-Lib shall be part of the repo. If you want to use you own zlib.installation this is possible as well. Check the options for it. -## Build instructions for Windows with UWP +### Build instructions for Windows with UWP See -## Build instructions for Linux / Unix +### Build instructions for Linux / Unix Open a terminal and got to your repository. You can generate the makefiles and build the library via: ```bash @@ -34,7 +48,7 @@ The option -j descripes the number of parallel processes for the build. In this If you want to use a IDE for linux you can try QTCreator for instance. -## Build instructions for MinGW +### Build instructions for MinGW Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag required to compile some of assimp's files, especially for debug builds. Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work. @@ -50,7 +64,7 @@ The following toolchain may or may not be helpful for building assimp using MinG Besides the toolchain, compilation should be the same as for Linux / Unix. -## CMake build options +### CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: - **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. - **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle diff --git a/Readme.md b/Readme.md index 52a195a64..f749993fd 100644 --- a/Readme.md +++ b/Readme.md @@ -120,7 +120,7 @@ __Exporters__: - FBX ( experimental ) ### Building ### -Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. Our build system is CMake, if you used CMake before there is a good chance you know what to do. +Take a look into the https://github.com/assimp/assimp/blob/master/Build.md file. We are available in vcpkg, and our build system is CMake; if you used CMake before there is a good chance you know what to do. ### Ports ### * [Android](port/AndroidJNI/README.md) From 7a8b7ba88d6d84dde7fd43419ac2b022c9887856 Mon Sep 17 00:00:00 2001 From: Theak Date: Sun, 29 Sep 2019 10:09:53 +0100 Subject: [PATCH 06/12] aiAnimation::mTicksPerSecond for gltf2 imports - should always be 1000.0 --- code/glTF2/glTF2Importer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/glTF2/glTF2Importer.cpp b/code/glTF2/glTF2Importer.cpp index fe52e9f28..f8e52ae66 100644 --- a/code/glTF2/glTF2Importer.cpp +++ b/code/glTF2/glTF2Importer.cpp @@ -1176,7 +1176,7 @@ void glTF2Importer::ImportAnimations(glTF2::Asset& r) } } ai_anim->mDuration = maxDuration; - ai_anim->mTicksPerSecond = 0.001; + ai_anim->mTicksPerSecond = 1000.0; mScene->mAnimations[i] = ai_anim; } From 9c326e6989b47accb4032bd18becda47f832901a Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 2 Oct 2019 10:21:56 +0200 Subject: [PATCH 07/12] Add AppVeyor build VS2013 and VS2019 --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 3729ea028..5e61cbdc1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,8 +14,10 @@ matrix: fast_finish: true image: + - Visual Studio 2013 - Visual Studio 2015 - Visual Studio 2017 + - Visual Studio 2019 platform: - Win32 From d0e8f5ca321cda18e6f07672b85964948d297062 Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 2 Oct 2019 10:30:50 +0200 Subject: [PATCH 08/12] add cmake generators for VS2013 and VS2019 --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 7038b0ef6..52adc10cf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,8 +30,10 @@ install: - set PATH=C:\Ruby24-x64\bin;%PATH% - set CMAKE_DEFINES -DASSIMP_WERROR=ON - if [%COMPILER%]==[MinGW] set PATH=C:\MinGW\bin;%PATH% + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR_NAME=Visual Studio 12 2013 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 + - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set CMAKE_GENERATOR_NAME=Visual Studio 16 2019 - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" . # Rename sh.exe as sh.exe in PATH interferes with MinGW From f2a70ad10ced9fd4cdcdc493fb5af3967e2af1fa Mon Sep 17 00:00:00 2001 From: escherstair Date: Wed, 2 Oct 2019 10:43:06 +0200 Subject: [PATCH 09/12] remove VS2013 build --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 52adc10cf..21cda6a2d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,7 +14,6 @@ matrix: fast_finish: true image: - - Visual Studio 2013 - Visual Studio 2015 - Visual Studio 2017 - Visual Studio 2019 @@ -30,7 +29,6 @@ install: - set PATH=C:\Ruby24-x64\bin;%PATH% - set CMAKE_DEFINES -DASSIMP_WERROR=ON - if [%COMPILER%]==[MinGW] set PATH=C:\MinGW\bin;%PATH% - - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR_NAME=Visual Studio 12 2013 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set CMAKE_GENERATOR_NAME=Visual Studio 16 2019 From 97e060c4285e842a7d74cffa8ee9aa4164d00ee8 Mon Sep 17 00:00:00 2001 From: escherstair Date: Mon, 7 Oct 2019 09:34:02 +0200 Subject: [PATCH 10/12] added CMAKE_GENERATOR_PLATFORM --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 21cda6a2d..419b50298 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,8 +32,9 @@ install: - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set CMAKE_GENERATOR_NAME=Visual Studio 16 2019 - - if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" . + - set CMAKE_GENERATOR_PLATFORM=%platform% + #- if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 + - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" -A "CMAKE_GENERATOR_PLATFORM". # Rename sh.exe as sh.exe in PATH interferes with MinGW - rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe" - set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5" From 128602f29b733dd0e2aabd5a81b7af31386c31b3 Mon Sep 17 00:00:00 2001 From: escherstair Date: Mon, 7 Oct 2019 10:12:40 +0200 Subject: [PATCH 11/12] fixed fatal error --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 419b50298..e7c62cf46 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,9 +32,9 @@ install: - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set CMAKE_GENERATOR_NAME=Visual Studio 16 2019 - - set CMAKE_GENERATOR_PLATFORM=%platform% + #- set CMAKE_GENERATOR_PLATFORM=%platform% #- if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" -A "CMAKE_GENERATOR_PLATFORM". + - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" -A %platform% . # Rename sh.exe as sh.exe in PATH interferes with MinGW - rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe" - set PATH=%PATH%;"C:\\Program Files (x86)\\Inno Setup 5" From c63f5b2f9e6a0d4c38fa16003fb986cf2da49423 Mon Sep 17 00:00:00 2001 From: escherstair Date: Mon, 7 Oct 2019 11:38:45 +0200 Subject: [PATCH 12/12] removed unused lines --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e7c62cf46..df16431bd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,8 +32,6 @@ install: - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR_NAME=Visual Studio 15 2017 - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" set CMAKE_GENERATOR_NAME=Visual Studio 16 2019 - #- set CMAKE_GENERATOR_PLATFORM=%platform% - #- if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=%CMAKE_GENERATOR_NAME% Win64 - cmake %CMAKE_DEFINES% -G "%CMAKE_GENERATOR_NAME%" -A %platform% . # Rename sh.exe as sh.exe in PATH interferes with MinGW - rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe"