12.12.2015, 16:35
Hmm interesting. I tried configuring the build for Visual Studio 14 2015. It generates it with only one issue which shouldn't affect my problem(i think)
If I try to open this build with my Visual Studio 14 2015 enterprise edition I get the following error:
I think I found another issue in the plugin.
This JNI function
Consider this scenario:
Код:
The C compiler identification is MSVC 19.0.23026.0 The CXX compiler identification is MSVC 19.0.23026.0 Check for working C compiler using: Visual Studio 14 2015 Check for working C compiler using: Visual Studio 14 2015 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler using: Visual Studio 14 2015 Check for working CXX compiler using: Visual Studio 14 2015 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Looking for alloca.h Looking for alloca.h - not found Looking for inttypes.h Looking for inttypes.h - found Looking for malloc.h Looking for malloc.h - found Looking for stdint.h Looking for stdint.h - found Found JNI: C:/Program Files (x86)/Java/jdk1.8.0_05/lib/jawt.lib JNI_INCLUDE_DIRS=C:/Program Files (x86)/Java/jdk1.8.0_05/include;C:/Program Files (x86)/Java/jdk1.8.0_05/include/win32;C:/Program Files (x86)/Java/jdk1.8.0_05/include JNI_LIBRARIES=C:/Program Files (x86)/Java/jdk1.8.0_05/lib/jawt.lib;C:/Program Files (x86)/Java/jdk1.8.0_05/lib/jvm.lib Configuring done Generating done
Код:
Unsupported This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them. For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK. - ALL_BUILD, "F:\AAAA\Shoebill\ShoebillPlugin\Build\ALL_BUILD.vcxproj" - INSTALL, "F:\AAAA\Shoebill\ShoebillPlugin\Build\INSTALL.vcxproj" - Shoebill, "F:\AAAA\Shoebill\ShoebillPlugin\Build\src\Shoebill.vcxproj" - ZERO_CHECK, "F:\AAAA\Shoebill\ShoebillPlugin\Build\ZERO_CHECK.vcxproj" - amx, "F:\AAAA\Shoebill\ShoebillPlugin\Build\src\sampplugin\amx.vcxproj" - hook, "F:\AAAA\Shoebill\ShoebillPlugin\Build\src\hook\hook.vcxproj" No changes required These projects can be opened in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them. - CMakePredefinedTargets, "CMakePredefinedTargets" - ShoebillPlugin, "F:\AAAA\Shoebill\ShoebillPlugin\Build\ShoebillPlugin.sln"
I think I found another issue in the plugin.
This JNI function
Consider this scenario:
- A vehicle is created(meaning all param values are VEHICLE_PARAMS_UNSET which is -1)
- I manually set doors(just an example).
- VehicleParamImpl method setDoors calls getVehicleParamsEx(which returns engine=-1, lights=-1, alarm=-1, doors=-1, objective=-1
- VehicleParamImpl method setDoors calls its method set
- VehicleParamImpl method set calls setVehicleParamsEx(with values engine=-1, lights=-1, alarm=-1, doors=myusedvalue, objective=-1
- Java_net_gtaun_shoebill_SampNativeFunction_setVehi cleParamsEx will cast those values to boolean. Which produces(engine=true, lights=true, alarm=true, doors=myvalue, objective=true)