Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package qt6-quick3dphysics for 
openSUSE:Factory checked in at 2024-10-03 17:37:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-quick3dphysics (Old)
 and      /work/SRC/openSUSE:Factory/.qt6-quick3dphysics.new.19354 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qt6-quick3dphysics"

Thu Oct  3 17:37:39 2024 rev:17 rq:1205138 version:6.7.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-quick3dphysics/qt6-quick3dphysics.changes    
2024-06-24 20:53:36.184989378 +0200
+++ 
/work/SRC/openSUSE:Factory/.qt6-quick3dphysics.new.19354/qt6-quick3dphysics.changes
 2024-10-03 17:37:57.618167959 +0200
@@ -1,0 +2,6 @@
+Sat Sep 28 08:23:04 UTC 2024 - Christophe Marin <[email protected]>
+
+- Update to 6.7.3
+  * https://www.qt.io/blog/qt-6.7.3-released
+
+-------------------------------------------------------------------

Old:
----
  qtquick3dphysics-everywhere-src-6.7.2.tar.xz

New:
----
  qtquick3dphysics-everywhere-src-6.7.3.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qt6-quick3dphysics.spec ++++++
--- /var/tmp/diff_new_pack.jn5AW5/_old  2024-10-03 17:37:58.230193522 +0200
+++ /var/tmp/diff_new_pack.jn5AW5/_new  2024-10-03 17:37:58.234193689 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define real_version 6.7.2
+%define real_version 6.7.3
 %define short_version 6.7
 %define tar_name qtquick3dphysics-everywhere-src
 %define tar_suffix %{nil}
@@ -27,7 +27,7 @@
 %endif
 #
 Name:           qt6-quick3dphysics%{?pkg_suffix}
-Version:        6.7.2
+Version:        6.7.3
 Release:        0
 Summary:        Qt 6 Quick3D Physics Extensions
 License:        GPL-3.0-only

++++++ qtquick3dphysics-everywhere-src-6.7.2.tar.xz -> 
qtquick3dphysics-everywhere-src-6.7.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtquick3dphysics-everywhere-src-6.7.2/.cmake.conf 
new/qtquick3dphysics-everywhere-src-6.7.3/.cmake.conf
--- old/qtquick3dphysics-everywhere-src-6.7.2/.cmake.conf       2024-06-08 
03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/.cmake.conf       2024-09-19 
22:20:09.000000000 +0200
@@ -1,4 +1,4 @@
-set(QT_REPO_MODULE_VERSION "6.7.2")
+set(QT_REPO_MODULE_VERSION "6.7.3")
 set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1")
 list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1")
 list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qtquick3dphysics-everywhere-src-6.7.2/.tag 
new/qtquick3dphysics-everywhere-src-6.7.3/.tag
--- old/qtquick3dphysics-everywhere-src-6.7.2/.tag      2024-06-08 
03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/.tag      2024-09-19 
22:20:09.000000000 +0200
@@ -1 +1 @@
-54a9bae884d3c8d5bc2bad1880aae8360e3e29e9
+cfd2a02307721a07506ab1a518b4e6b882ed3efe
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtquick3dphysics-everywhere-src-6.7.2/dependencies.yaml 
new/qtquick3dphysics-everywhere-src-6.7.3/dependencies.yaml
--- old/qtquick3dphysics-everywhere-src-6.7.2/dependencies.yaml 2024-06-08 
03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/dependencies.yaml 2024-09-19 
22:20:09.000000000 +0200
@@ -1,13 +1,13 @@
 dependencies:
   ../qtbase:
-    ref: b5fbe0923cfc566036b83c3d968f225b26117efc
+    ref: 92b685784960eea6eb353688cf0edeb94d69c6cd
     required: true
   ../qtdeclarative:
-    ref: 12533cc0bd83a2076efb4af0bc1832b0db9568fc
+    ref: 34ffe0c15a9564fefcf01a738eb0bde370399959
     required: true
   ../qtquick3d:
-    ref: 8209c3e400ba348590907a4b8bab6c5353237d1e
+    ref: b342cba39e702e35c2e670308dbfc9764ba6105e
     required: true
   ../qtshadertools:
-    ref: 1e141980f3f74d81e9a740273d61f445f9a58704
+    ref: 0d1782b43e6262f8592bee5dbbe638d65c8e9dfd
     required: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtquick3dphysics-everywhere-src-6.7.2/src/helpers/CMakeLists.txt 
new/qtquick3dphysics-everywhere-src-6.7.3/src/helpers/CMakeLists.txt
--- old/qtquick3dphysics-everywhere-src-6.7.2/src/helpers/CMakeLists.txt        
2024-06-08 03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/src/helpers/CMakeLists.txt        
2024-09-19 22:20:09.000000000 +0200
@@ -19,6 +19,8 @@
     PAST_MAJOR_VERSIONS 1
     DEFINES
         QT_BUILD_QUICK3DPHYSICSHELPERS_LIB
+    DEPENDENCIES
+        QtQuick3D
     LIBRARIES
         Qt::Quick3DPhysics
     PUBLIC_LIBRARIES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtquick3dphysics-everywhere-src-6.7.2/src/quick3dphysics/CMakeLists.txt 
new/qtquick3dphysics-everywhere-src-6.7.3/src/quick3dphysics/CMakeLists.txt
--- old/qtquick3dphysics-everywhere-src-6.7.2/src/quick3dphysics/CMakeLists.txt 
2024-06-08 03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/src/quick3dphysics/CMakeLists.txt 
2024-09-19 22:20:09.000000000 +0200
@@ -54,6 +54,8 @@
     SYSTEM_INCLUDE_DIRECTORIES
         ../3rdparty/PhysX/include
         ../3rdparty/PhysX/pxshared/include
+    DEPENDENCIES
+        QtQuick3D
     LIBRARIES
         Qt::CorePrivate
         Qt::GuiPrivate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qtquick3dphysics-everywhere-src-6.7.2/tools/cooker/main.cpp 
new/qtquick3dphysics-everywhere-src-6.7.3/tools/cooker/main.cpp
--- old/qtquick3dphysics-everywhere-src-6.7.2/tools/cooker/main.cpp     
2024-06-08 03:28:30.000000000 +0200
+++ new/qtquick3dphysics-everywhere-src-6.7.3/tools/cooker/main.cpp     
2024-09-19 22:20:09.000000000 +0200
@@ -9,6 +9,8 @@
 #include <QtCore/QFile>
 #include <QtCore/QFileInfo>
 #include <QtGui/QImage>
+#include <QCommandLineParser>
+#include <QScopeGuard>
 
 #include "PxPhysicsAPI.h"
 #include "cooking/PxCooking.h"
@@ -23,18 +25,15 @@
     return mesh.isValid();
 }
 
-bool tryReadImage(const char *inputPath, QImage &image)
+bool tryReadImage(const QString &inputPath, QImage &image)
 {
     image = QImage(inputPath);
     return image.format() != QImage::Format_Invalid;
 }
 
-bool cookMeshes(const char *inputPath, QSSGMesh::Mesh &mesh)
+bool cookMeshes(const QString &inputPath, QSSGMesh::Mesh &mesh, 
physx::PxCooking *cooking)
 {
-    physx::PxDefaultErrorCallback defaultErrorCallback;
-    physx::PxDefaultAllocator defaultAllocatorCallback;
-    auto foundation = PxCreateFoundation(PX_PHYSICS_VERSION, 
defaultAllocatorCallback, defaultErrorCallback);
-    auto cooking = PxCreateCooking(PX_PHYSICS_VERSION, *foundation, 
physx::PxCookingParams(physx::PxTolerancesScale()));
+    Q_ASSERT(cooking);
 
     const int vStride = mesh.vertexBuffer().stride;
     const int vCount = mesh.vertexBuffer().data.size() / vStride;
@@ -66,7 +65,7 @@
 
         physx::PxDefaultMemoryOutputStream buf;
         if (!cooking->cookTriangleMesh(triangleDesc, buf, &result)) {
-            std::cerr << "Could not cook triangle mesh.";
+            std::cerr << "Error: could not cook triangle mesh '" << 
inputPath.toStdString() << "'." << std::endl;
             return false;
         }
 
@@ -78,14 +77,14 @@
         auto outputFile = QFile(output);
 
         if (!outputFile.open(QIODevice::WriteOnly)) {
-            std::cerr << "Could not open " << output.toStdString() << "for 
writing.";
+            std::cerr << "Error: could not open '" << output.toStdString() << 
"' for writing." << std::endl;
             return false;
         }
 
         outputFile.write(reinterpret_cast<char *>(buf.getData()), 
buf.getSize());
         outputFile.close();
 
-        std::cout << "Success: wrote triangle mesh '" << output.toStdString() 
<< "'" << std::endl;
+        std::cout << "Success: wrote triangle mesh '" << output.toStdString() 
<< "'." << std::endl;
     }
 
     { // Convex mesh
@@ -107,7 +106,7 @@
 
         physx::PxDefaultMemoryOutputStream buf;
         if (!cooking->cookConvexMesh(convexDesc, buf, &result)) {
-            std::cerr << "Could not cook convex mesh.";
+            std::cerr << "Error: could not cook convex mesh '" << 
inputPath.toStdString() << "'." << std::endl;
             return false;
         }
 
@@ -119,25 +118,22 @@
         auto outputFile = QFile(output);
 
         if (!outputFile.open(QIODevice::WriteOnly)) {
-            std::cerr << "Could not open " << output.toStdString() << "for 
writing.";
+            std::cerr << "Error: could not open '" << output.toStdString() << 
"' for writing." << std::endl;
             return false;
         }
 
         outputFile.write(reinterpret_cast<char *>(buf.getData()), 
buf.getSize());
         outputFile.close();
 
-        std::cout << "Success: wrote convex mesh '" << output.toStdString() << 
"'" << std::endl;
+        std::cout << "Success: wrote convex mesh '" << output.toStdString() << 
"'." << std::endl;
     }
 
     return true;
 }
 
-bool cookHeightfield(const char *inputPath, QImage &heightMap)
+bool cookHeightfield(const QString &inputPath, QImage &heightMap, 
physx::PxCooking *cooking)
 {
-    physx::PxDefaultErrorCallback defaultErrorCallback;
-    physx::PxDefaultAllocator defaultAllocatorCallback;
-    auto foundation = PxCreateFoundation(PX_PHYSICS_VERSION, 
defaultAllocatorCallback, defaultErrorCallback);
-    auto cooking = PxCreateCooking(PX_PHYSICS_VERSION, *foundation, 
physx::PxCookingParams(physx::PxTolerancesScale()));
+    Q_ASSERT(cooking);
 
     int numRows = heightMap.height();
     int numCols = heightMap.width();
@@ -159,7 +155,7 @@
 
     physx::PxDefaultMemoryOutputStream buf;
     if (!(numRows && numCols && cooking->cookHeightField(hfDesc, buf))) {
-        std::cerr << "Could not create height field from " << inputPath << 
std::endl;
+        std::cerr << "Could not create height field from '" << 
inputPath.toStdString() << "'." << std::endl;
         return false;
     }
 
@@ -167,7 +163,7 @@
     auto outputFile = QFile(output);
 
     if (!outputFile.open(QIODevice::WriteOnly)) {
-        std::cerr << "Could not open " << output.toStdString() << "for 
writing.";
+        std::cerr << "Could not open '" << output.toStdString() << "' for 
writing." << std::endl;
         return false;
     }
 
@@ -180,31 +176,55 @@
 
 int main(int argc, char *argv[])
 {
-    if (argc != 2) {
-        qDebug() << "Invalid number of arguments provided. Usage: cooker 
input.mesh";
-        return -1;
-    }
-
-    const char *inputPath = argv[1];
+    QCoreApplication app(argc, argv);
+    QCoreApplication::setApplicationName("cooker");
+    QCoreApplication::setApplicationVersion("6.5.7");
+
+    QCommandLineParser parser;
+    parser.setApplicationDescription(
+            "A commandline utility for pre-cooking meshes for use with the 
QtQuick3DPhysics module.");
+    parser.addHelpOption();
+    parser.addVersionOption();
+    parser.addPositionalArgument("input",
+                                 "The input file(s). Accepts either a .mesh 
created by QtQuick3D's balsam"
+                                 " or a Qt compatible image file. The output 
filename will be of the format"
+                                 " input.cooked.{cvx/tri/hf}. The filename 
suffixes .cvx, .tri, and .hf"
+                                 " mean it is a convex mesh, a triangle mesh 
or a heightfield.");
+    parser.process(app);
+
+    const QStringList args = parser.positionalArguments();
+    if (args.isEmpty())
+        parser.showHelp(0);
 
-    QFile *file = new QFile(inputPath);
-    if (!file->open(QIODevice::ReadOnly)) {
-        delete file;
-        std::cerr << "Could not open input file '" << inputPath << "'" << 
std::endl;
-        return -1;
-    }
-
-    QImage image;
-    QSSGMesh::Mesh mesh;
-    if (tryReadImage(inputPath, image)) {
-        if (!cookHeightfield(inputPath, image))
+    physx::PxDefaultErrorCallback defaultErrorCallback;
+    physx::PxDefaultAllocator defaultAllocatorCallback;
+    auto foundation = PxCreateFoundation(PX_PHYSICS_VERSION, 
defaultAllocatorCallback, defaultErrorCallback);
+    auto cooking = PxCreateCooking(PX_PHYSICS_VERSION, *foundation, 
physx::PxCookingParams(physx::PxTolerancesScale()));
+    auto cleanup = qScopeGuard([&] {
+        cooking->release();
+        foundation->release();
+    });
+
+    for (const QString &inputPath : args) {
+        QFile *file = new QFile(inputPath);
+        if (!file->open(QIODevice::ReadOnly)) {
+            delete file;
+            std::cerr << "Error: could not open input file '" << 
inputPath.toStdString() << "'" << std::endl;
             return -1;
-    } else if (tryReadMesh(file, mesh)) {
-        if (!cookMeshes(inputPath, mesh))
+        }
+
+        QImage image;
+        QSSGMesh::Mesh mesh;
+        if (tryReadImage(inputPath, image)) {
+            if (!cookHeightfield(inputPath, image, cooking))
+                return -1;
+        } else if (tryReadMesh(file, mesh)) {
+            if (!cookMeshes(inputPath, mesh, cooking))
+                return -1;
+        } else {
+            std::cerr << "Error: failed to read mesh or image from file '" << 
inputPath.toStdString() << "'" << std::endl;
             return -1;
-    } else {
-        std::cerr << "Failed to read mesh or image from file '" << inputPath 
<< "'" << std::endl;
-        return -1;
+        }
     }
 
     return 0;

Reply via email to