Some fixes

This commit is contained in:
Norbi Peti 2020-08-01 20:26:18 +02:00
parent cd0e1d01b6
commit de13d9876d
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
11 changed files with 39 additions and 152 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
libpxc.so libpxc.so
dependency-reduced-pom.xml
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.

View file

@ -1,146 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>VirtualComputer</artifactId>
<groupId>io.github.NorbiPeti</groupId>
<version>2.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>VirtualComputer-Core</artifactId>
<version>2.1-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<arg>-g</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration />
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>XPCOM</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>org.virtualbox:VirtualBox-MSCOM</exclude>
<exclude>sznp.virtualcomputer:VirtualComputer-MSCOM</exclude>
</excludes>
</artifactSet>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>io.github.NorbiPeti:VirtualComputer-XPCOM</artifact>
<includes>
<include>**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>MSCOM</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>org.virtualbox:VirtualBox</exclude>
<exclude>sznp.virtualcomputer:VirtualComputer-XPCOM</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.virtualbox</groupId>
<artifactId>VirtualBox-MSCOM</artifactId>
<version>6.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>sznp.virtualcomputer</groupId>
<artifactId>VirtualComputer-MSCOM</artifactId>
<version>2.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View file

@ -80,7 +80,7 @@
<exclude>sznp.virtualcomputer:VirtualComputer-MSCOM</exclude> <exclude>sznp.virtualcomputer:VirtualComputer-MSCOM</exclude>
</excludes> </excludes>
</artifactSet> </artifactSet>
<minimizeJar>true</minimizeJar> <!-- <minimizeJar>true</minimizeJar> -->
<filters> <filters>
<filter> <filter>
<artifact>io.github.NorbiPeti:VirtualComputer-XPCOM</artifact> <artifact>io.github.NorbiPeti:VirtualComputer-XPCOM</artifact>
@ -89,6 +89,13 @@
</include> <!-- Don't delete org.mozilla.interfaces.internal when minimizing --> </include> <!-- Don't delete org.mozilla.interfaces.internal when minimizing -->
</includes> </includes>
</filter> </filter>
<filter>
<artifact>com.github.jnr:jnr-ffi</artifact>
<includes>
<include>**
</include> <!-- Don't delete org.mozilla.interfaces.internal when minimizing -->
</includes>
</filter>
</filters> </filters>
</configuration> </configuration>
</execution> </execution>

View file

@ -47,8 +47,13 @@ public class MachineEventHandler extends EventHandlerBase {
l.warning("Result code: " + Integer.toHexString(progress.getResultCode())); l.warning("Result code: " + Integer.toHexString(progress.getResultCode()));
for (var info = progress.getErrorInfo(); info != null; info = info.getNext()) { for (var info = progress.getErrorInfo(); info != null; info = info.getNext()) {
l.warning("----------------"); l.warning("----------------");
l.warning("VBox: " + info.getText()); if (info.getResultCode() == 0x80004005 && info.getResultDetail() == 0xFFFFF88B)
l.warning("Component: " + info.getComponent()); l.warning("The server cannot access the VirtualBox driver, run it with sudo. Make sure to only run plugins you trust.");
else {
l.warning("VBox: " + info.getText());
l.warning("Component: " + info.getComponent());
l.warning("Error codes: " + Integer.toHexString(info.getResultCode()) + " " + Integer.toHexString(info.getResultDetail()));
}
} }
} }
}); });

View file

@ -1,7 +1,8 @@
name: VirtualComputer name: VirtualComputer
main: sznp.virtualcomputer.PluginMain main: sznp.virtualcomputer.PluginMain
version: 2.0 version: '2.1'
commands: commands:
computer: computer:
usage: Use /computer start|stop|reset|key|mouse|input|fix usage: Use /computer start|stop|reset|key|mouse|input|fix
aliases: c aliases: c
api-version: '1.13'

View file

@ -78,7 +78,8 @@ public class COMFrameBuffer implements IFramebuffer {
} }
@Override @Override
public void notify3DEvent(long arg0, byte[] arg1) { public void notify3DEvent(long type, byte[] data) {
System.out.println("3D event! " + type + " - " + Arrays.toString(data));
} }
@Override @Override

View file

@ -58,7 +58,7 @@
<dependency> <dependency>
<groupId>com.github.jnr</groupId> <groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId> <artifactId>jnr-ffi</artifactId>
<version>2.1.7</version> <version>2.1.16</version>
</dependency> </dependency>
<dependency> <!-- javax.annotations.Nullable --> <dependency> <!-- javax.annotations.Nullable -->
<groupId>com.google.code.findbugs</groupId> <groupId>com.google.code.findbugs</groupId>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.virtualbox</groupId>
<artifactId>VirtualBox-MSCOM</artifactId>
<version>6.1</version>
<description>POM was created from install:install-file</description>
</project>

Binary file not shown.

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.virtualbox</groupId>
<artifactId>VirtualBox</artifactId>
<version>6.1</version>
<description>POM was created from install:install-file</description>
</project>