2020-02-10 02:19:39 +03:00
|
|
|
### How to build this app
|
|
|
|
|
|
|
|
Java application:
|
|
|
|
* Install Maven
|
|
|
|
* Execute
|
|
|
|
`# mvn -B -DskipTests clean package`
|
|
|
|
|
2020-02-20 05:26:08 +03:00
|
|
|
NOTE: For building 'legacy' version please update next section in pom.xml to be next:
|
|
|
|
```
|
|
|
|
<dependency>
|
|
|
|
<groupId>org.usb4java</groupId>
|
|
|
|
<artifactId>usb4java</artifactId>
|
|
|
|
<version>1.2.0</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
```
|
|
|
|
|
|
|
|
**Building JNI libraries (OPTIONAL)**
|
2020-02-10 02:19:39 +03:00
|
|
|
|
|
|
|
First of all install JDK, GCC, make, kernel headers and whatever else (or use Gentoo <3 ).
|
|
|
|
|
|
|
|
Generate header (Optional! Already generated.):
|
|
|
|
```
|
|
|
|
$ cp NS-USBloader/src/main/java/nsusbloader/Utilities/RcmSmash.java .
|
|
|
|
$ javac -h . RcmSmash.java
|
|
|
|
```
|
|
|
|
**Build for Linux (amd64 Linux host):**
|
|
|
|
```
|
|
|
|
$ cd 'NS-USBloader/JNI sources/linux'
|
|
|
|
$ make install clean
|
|
|
|
```
|
|
|
|
**Build for Windows (on x86_64 host):**
|
|
|
|
|
|
|
|
[ This part should be updated ]
|
|
|
|
|
|
|
|
Install MinGW, msys (?) MinGW-w64 and JDK. Set JAVA_HOME, set PATH to match MinGW, MSYS, JDK/bin (and other?) environment variables.
|
|
|
|
|
|
|
|
x86: Install MinGw to C:\MinGW\
|
|
|
|
|
|
|
|
Update sources: set (uncomment) line 'BUILD_FOR_X86'
|
|
|
|
|
|
|
|
Set environment variables for MinGw:
|
|
|
|
* C:\MinGW\bin
|
|
|
|
* C:\MinGW\msys\1.0\bin
|
|
|
|
```
|
|
|
|
$ cd 'NS-USBloader/JNI sources/windows'
|
|
|
|
$ make x86
|
|
|
|
```
|
|
|
|
|
|
|
|
amd64: Install MinGw-w64
|
|
|
|
|
|
|
|
Update sources: remove line 'BUILD_FOR_X86'
|
|
|
|
```
|
|
|
|
$ make amd64
|
|
|
|
```
|