fabmax / physx-jni

Java JNI bindings for Nvidia PhysX
MIT License
85 stars 8 forks source link

Visual Studio 2022 What should I change in the build.gradle.kts? #47

Closed jfelrod1960 closed 1 year ago

jfelrod1960 commented 1 year ago

I have Visual Studio 2022 Community Edition. What should I change in the build.gradle.kts?

fabmax commented 1 year ago

VS 2022 should work out of the box. Is there an error message?

edit: You also need cmake and python3 in order to generate the native build scripts. Not sure if I mentioned that in the build instructions...

jfelrod1960 commented 1 year ago

I have cmake but not python3. If this works I will close the issue. Thanks!

jfelrod1960 commented 1 year ago

Here is what I'm getting ...

6:48:58 PM: Executing 'buildNativeProject'...

Task :buildSrc:compileKotlin UP-TO-DATE Task :buildSrc:compileJava NO-SOURCE Task :buildSrc:compileGroovy NO-SOURCE Task :buildSrc:pluginDescriptors UP-TO-DATE Task :buildSrc:processResources NO-SOURCE Task :buildSrc:classes UP-TO-DATE Task :buildSrc:inspectClassesForKotlinIC UP-TO-DATE Task :buildSrc:jar UP-TO-DATE Task :buildSrc:assemble UP-TO-DATE Task :buildSrc:compileTestKotlin NO-SOURCE Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE Task :buildSrc:compileTestJava NO-SOURCE Task :buildSrc:compileTestGroovy NO-SOURCE Task :buildSrc:processTestResources NO-SOURCE Task :buildSrc:testClasses UP-TO-DATE Task :buildSrc:test NO-SOURCE Task :buildSrc:validatePlugins UP-TO-DATE Task :buildSrc:check UP-TO-DATE Task :buildSrc:build UP-TO-DATE

Task :generateNativeGlueCode Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\character\PxCharacterController.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\common\PxCommon.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\common\PxCuda.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\cooking\PxCooking.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\extensions\PxExtensions.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\extensions\PxJoint.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\geometry\PxGeometry.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxActor.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxArticulation.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxPhysics.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxScene.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxSceneQuery.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\physics\PxShape.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\PxTopLevel.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\support\PxSupport.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\vehicle\PxVehicle.idl Parsing C:\Users\JFE\GitHub\physx-jni\physx-jni\src\main\webidl\vehicle\SnippetVehicle.idl

Task :physx-jni-natives-windows:buildNativeProjectWindows FAILED MSBuild version 17.4.1+9a89d02ff for .NET Framework MSBUILD : error MSB1009: Project file does not exist. Switch: ALL_BUILD.vcxproj 8 actionable tasks: 2 executed, 6 up-to-date

FAILURE: Build failed with an exception.

BUILD FAILED in 721ms 6:48:59 PM: Execution finished 'buildNativeProject'.

fabmax commented 1 year ago

Hmm this line looks a bit suspicious:

MSBuild version 17.4.1+9a89d02ff for .NET Framework

It looks like there is only .NET stuff available. Do you have the C++ packages installed (like described here)?

fabmax commented 1 year ago

One more thing: The log also says that the project file does not exist. You can try to run generateNativeProject before buildNativeProject which forces (re-)generating the native project files. Usually this shouldn't be neccessary but maybe something got messed up when running the script without python installed.

jfelrod1960 commented 1 year ago

That worked @fabmax !!! I had the C++ packages installed so I did a clean, generateNativeProject and buildNativeProject. Thank you so much for your help.