Move binaries, generate artifacts and add simple java loader
This commit is contained in:
1
bin/.gitignore
vendored
Normal file
1
bin/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/wiiscan/
|
||||||
Binary file not shown.
BIN
bin/USBm.dll
BIN
bin/USBm.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/wiiscan.exe
BIN
bin/wiiscan.exe
Binary file not shown.
@@ -1,82 +0,0 @@
|
|||||||
% Configfile_begin
|
|
||||||
% config file for wiiscan
|
|
||||||
|
|
||||||
% all usb device ids, not used yet in the scanning
|
|
||||||
all_usb_hubs=""
|
|
||||||
|
|
||||||
% single power controlling usb hub, only nessesary when powerering over usb, for automatic resetting. If not used, put ""
|
|
||||||
% active_usb_hub="@PCI\VEN_8086&DEV_2934&SUBSYS_20F017AA&REV_03\3&B1BFB68&0&E8"
|
|
||||||
active_usb_hub=""
|
|
||||||
|
|
||||||
% a list of allowed wiimotes in the form xx:xx:xx:xx:xx:xx, wildcard match is 00:00:00:00:00:00
|
|
||||||
allowed_wiimote_adr=00:00:00:00:00:00
|
|
||||||
% my set of wiimotes
|
|
||||||
%allowed_wiimote_adr=00:19:?D:??:6?:?? 00:1F:C5:??:??:??
|
|
||||||
|
|
||||||
% launching exe file have a problem with spaces, hence renamed exe, replaced space with underscores
|
|
||||||
% The original Johnny Chung Lee wb software version 0.3, downloaded from [http://johnnylee.net/projects/wii/]
|
|
||||||
%whiteboard_software="d:/WiimoteWhiteboard/WiimoteWhiteboard_v0.3.exe"
|
|
||||||
|
|
||||||
% same stuff, but binary build from sources and redistributed in this package
|
|
||||||
%whiteboard_software="WiimoteWhiteboard.exe"
|
|
||||||
|
|
||||||
% and finally, a custom build v0.3 version, with fixed calibration.dat write
|
|
||||||
whiteboard_software=WiimoteWhiteboard_v0.3.exe
|
|
||||||
|
|
||||||
% Boon Jin's wb software version 0.6
|
|
||||||
%whiteboard_software="d:/wsb/WiimoteSmoothboard.exe"
|
|
||||||
|
|
||||||
% wiiscan parameters
|
|
||||||
%option_device="Nintendo RVL-CNT-01"
|
|
||||||
|
|
||||||
% number of bt scanning attempts in a autoscan, timout is increased for every scan as retryattempt*option_timeout
|
|
||||||
%option_scanretries=3
|
|
||||||
|
|
||||||
% long time (4000 and above, or increase option_scanretries) when matching name, short (1000-2000) when matching address
|
|
||||||
option_timeout=4000
|
|
||||||
|
|
||||||
% wiimote scanning time, only applicable used for wiilib
|
|
||||||
option_wiitimeout=1000
|
|
||||||
|
|
||||||
% delay bewteen powerdown/up, see man for details
|
|
||||||
option_usbsleep=1000
|
|
||||||
option_usbmsleep=1000
|
|
||||||
%option_btsleep=2000
|
|
||||||
|
|
||||||
% output verbose flag, 0 or 1
|
|
||||||
option_debug=0
|
|
||||||
|
|
||||||
% start wb at successfull connect, 0 or 1
|
|
||||||
option_startwhiteboard=1
|
|
||||||
|
|
||||||
% logging output file, typical wiiscan_log.txt , put nothing if no logging is wanted
|
|
||||||
option_logfile=
|
|
||||||
|
|
||||||
% wiimote connection library, use none, wiiuse, or wiimotelib
|
|
||||||
option_wiilib=wiimotelib
|
|
||||||
|
|
||||||
% 0=no power cycle, 1=USB hub control, 2=USBm IO, 3=USB Devcon
|
|
||||||
option_usbpowermode=3
|
|
||||||
|
|
||||||
% 0=remove if not connectable, 1=always remove, 2=never remove
|
|
||||||
%option_forceremove=0
|
|
||||||
|
|
||||||
% bt radio to use, not working yet
|
|
||||||
%option_btradio=00:50:B6:A0:48:8C
|
|
||||||
|
|
||||||
% wiiscantray options
|
|
||||||
% number of connection attempts before autoscan i restarted
|
|
||||||
option_tray_pool_retries=2
|
|
||||||
|
|
||||||
% retry sleep, keep it low (<1000) to catch an open connection
|
|
||||||
option_tray_sleep_between_pool_retries=250
|
|
||||||
|
|
||||||
% sleep bewteen polls, when wiimote is succeful connected, keep it hight (>2000) to avoid to much CPU usage
|
|
||||||
option_tray_sleep_between_pool_loops=1000
|
|
||||||
|
|
||||||
% final connection step reqires some sleep before windows PnP is ready
|
|
||||||
option_sleep_before_final_connect=1500
|
|
||||||
|
|
||||||
% delay after launch of wb software, keep it at a medium value (2000-10000)
|
|
||||||
option_sleep_after_startwhiteboard=4000
|
|
||||||
% Configfile_end
|
|
||||||
Binary file not shown.
BIN
bin/wiiuse.dll
BIN
bin/wiiuse.dll
Binary file not shown.
34
build.gradle
34
build.gradle
@@ -11,12 +11,11 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.github.boukefalos:jlibloader:0.2'
|
compile 'com.github.boukefalos:jlibloader:0.3'
|
||||||
testCompile 'junit:junit:4.11'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group = 'com.github.boukefalos'
|
group = 'com.github.boukefalos'
|
||||||
project.archivesBaseName = 'wiiscan'
|
project.archivesBaseName = 'jlibwiiscan'
|
||||||
version = '0.9'
|
version = '0.9'
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
@@ -50,16 +49,7 @@ model {
|
|||||||
List<String> getStaticLibraryArchiverArgs() { [] }
|
List<String> getStaticLibraryArchiverArgs() { [] }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
|
||||||
libs(PrebuiltLibraries) {
|
|
||||||
usb { lib ->
|
|
||||||
binaries.withType(StaticLibraryBinary) {
|
|
||||||
staticLibraryFile = file("lib/${targetPlatform.name}/libusb-1.0.dll")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
libraries {
|
libraries {
|
||||||
@@ -69,7 +59,6 @@ libraries {
|
|||||||
all {
|
all {
|
||||||
binaries.all {
|
binaries.all {
|
||||||
linker.args '-Wl,--kill-at', '-static-libgcc', '-static-libstdc++'
|
linker.args '-Wl,--kill-at', '-static-libgcc', '-static-libstdc++'
|
||||||
// lib library: 'usb', linkage: 'static'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,8 +102,9 @@ binaries.withType(SharedLibraryBinary) { binary ->
|
|||||||
def builderTask = binary.tasks.builder
|
def builderTask = binary.tasks.builder
|
||||||
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
|
def libraryDirectory = project.group.replace('.', '/') + "/${project.archivesBaseName}/${variantName}"
|
||||||
nativeJar.into(libraryDirectory) {
|
nativeJar.into(libraryDirectory) {
|
||||||
from builderTask.outputFile
|
from builderTask.outputFile
|
||||||
from file("lib/${targetPlatform.name}/libusb0.dll")
|
from file("bin/wiiscan.exe")
|
||||||
|
from file("bin/DelcomDLL.dll")
|
||||||
}
|
}
|
||||||
// nativeJar.dependsOn builderTask
|
// nativeJar.dependsOn builderTask
|
||||||
}
|
}
|
||||||
@@ -131,10 +121,18 @@ mainPom.withXml { provider ->
|
|||||||
def dep = deps.appendNode('dependency')
|
def dep = deps.appendNode('dependency')
|
||||||
dep.appendNode('groupId', project.group)
|
dep.appendNode('groupId', project.group)
|
||||||
dep.appendNode('artifactId', "${project.archivesBaseName}-${platform}")
|
dep.appendNode('artifactId', "${project.archivesBaseName}-${platform}")
|
||||||
dep.appendNode('version', jniVersion)
|
dep.appendNode('version', version)
|
||||||
}
|
}
|
||||||
def dep = deps.appendNode('dependency')
|
def dep = deps.appendNode('dependency')
|
||||||
dep.appendNode('groupId', 'com.github.boukefalos')
|
dep.appendNode('groupId', 'com.github.boukefalos')
|
||||||
dep.appendNode('artifactId', 'jlibloader')
|
dep.appendNode('artifactId', 'jlibloader')
|
||||||
dep.appendNode('version', '0.3')
|
dep.appendNode('version', '0.3')
|
||||||
|
dep = deps.appendNode('dependency')
|
||||||
|
dep.appendNode('groupId', 'com.github.boukefalos')
|
||||||
|
dep.appendNode('artifactId', 'libwiiuse')
|
||||||
|
dep.appendNode('version', '0.15')
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
10
src/main/java/wiiscan/Wiiscan.java
Normal file
10
src/main/java/wiiscan/Wiiscan.java
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
package wiiscan;
|
||||||
|
|
||||||
|
import com.github.boukefalos.jlibloader.Native;
|
||||||
|
|
||||||
|
public class Wiiscan {
|
||||||
|
public static void load() {
|
||||||
|
Native.load("com.github.boukefalos", "jlibwiiscan", "DelcomDLL");
|
||||||
|
Native.binary("com.github.boukefalos", "jlibwiiscan", "sox");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user