mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Only very basic testing performed to date. The wrappers are still a bit incomplete (some structures and functions), but are much more complete than the old ones. Fixes artf3796. Changes from initial changeset: - Use // for comments. - Add auto-generate notices to the beginning of each generated file. - Include error number with error text in exception. - Add free() function to structures. - Fix out-of-order / non-array enums. - Avoid duplicate calls to DisposedStruct.write() as .getAddress() does it. - Refactor OpaqueStruct. - Default to no null allowed except when overridden. - Implement unowned return values. - Add gen_struct_sizer script. Change-Id: Ie0d102c45817ea8812d98fe4938d1a2255c61664
13 lines
604 B
Bash
Executable File
13 lines
604 B
Bash
Executable File
#!/bin/bash
|
|
#This script should be able to generate the JNI
|
|
# bindings for NIVision. At some point,
|
|
# it should be integrated into the build system.
|
|
# Assumes running from allwpilib/wpilibj/wpilibJavaJNI/nivision
|
|
# Get files that we node to generate from.
|
|
# Run python generator.
|
|
python gen_java.py ../../../wpilibc/wpilibC++Devices/include/nivision.h nivision_arm.ini nivision_2011.ini
|
|
# Stick generated files into appropriate places.
|
|
cp NIVision.cpp ../lib/NIVisionJNI.cpp
|
|
mkdir -p ../../wpilibJavaDevices/src/main/java/com/ni/vision
|
|
cp *.java ../../wpilibJavaDevices/src/main/java/com/ni/vision/
|