Skip to content

Commit

Permalink
Removed partially implemented OpenVR library.
Browse files Browse the repository at this point in the history
Added phr00t's JOpenVR wrapper from JMonkeyVR.
Renamed profile and build version.
  • Loading branch information
Automat-GH committed Mar 20, 2016
1 parent c9288fe commit 3781c3d
Show file tree
Hide file tree
Showing 48 changed files with 4,572 additions and 91 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,3 @@
[submodule "JMumbleLink"]
path = JMumbleLink
url = https://github.com/StellaArtois/java-mumble-link.git
[submodule "JOpenVR"]
path = JOpenVR
url = https://github.com/StellaArtois/JOpenVR.git
1 change: 0 additions & 1 deletion JOpenVR
Submodule JOpenVR deleted from ba891c
10 changes: 6 additions & 4 deletions idea.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
def createIdeaProject(project_root_dir, version, mcpDirName, are32bitNatives):

# generate IML xml
srcPaths = [os.path.join(project_root_dir, 'JOpenVR', 'JOpenVR', 'src'), \
os.path.join(project_root_dir, 'JRift', 'JRift', 'src'), \
# VIVE - removed
#os.path.join(project_root_dir, 'JOpenVR', 'JOpenVR', 'src'),
srcPaths = [os.path.join(project_root_dir, 'JRift', 'JRift', 'src'), \
os.path.join(project_root_dir, 'JMumbleLink', 'JMumble', 'src'), \
os.path.join(project_root_dir, 'Sixense-Java', 'SixenseJava', 'src'), \
os.path.join(project_root_dir, mcpDirName, 'src', 'minecraft')]
Expand Down Expand Up @@ -44,8 +45,9 @@ def createIdeaProject(project_root_dir, version, mcpDirName, are32bitNatives):
platform = 'windows'

mainClass = 'Start'
nativesPaths = [os.path.join(project_root_dir, 'JOpenVR', 'JOpenVRLibrary', 'natives', platformbits), \
os.path.join(project_root_dir, 'JRift', 'JRiftLibrary', 'natives', platform), \
# VIVE removed
# os.path.join(project_root_dir, 'JOpenVR', 'JOpenVRLibrary', 'natives', platformbits),
nativesPaths = [os.path.join(project_root_dir, 'JRift', 'JRiftLibrary', 'natives', platform), \
os.path.join(project_root_dir, 'JMumbleLink', 'JMumbleLibrary', 'natives', platform), \
os.path.join(project_root_dir, 'Sixense-Java', 'SixenseJavaLibrary', 'natives', platform), \
os.path.join(project_root_dir, 'lib', version, 'natives', platform)]
Expand Down
24 changes: 5 additions & 19 deletions installer/1.7.10-forge-nohydra.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "1.7.10-minecrift-$VERSION",
"id": "1.7.10-minecrift-Vive-$VERSION",
"time": "2015-01-23T05:13:20+00:00",
"releaseTime": "1960-01-01T07:00:00+00:00",
"type": "release",
Expand Down Expand Up @@ -148,6 +148,10 @@
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1"
},
{
"name": "com.sun:jna:4.2.1",
"url": "http://automat-gh.github.io/minecrift/"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1",
"natives": {
Expand Down Expand Up @@ -242,24 +246,6 @@
]
}
},
{
"name": "com.valvesoftware.openvr:JOpenVR:0.9.16.0",
"url": "http://repo.minecraft-vr.com/"
},
{
"name": "com.valvesoftware.openvr:JOpenVRLibrary:0.9.16.0",
"url": "http://repo.minecraft-vr.com/",
"natives": {
"linux": "natives-linux-${arch}",
"windows": "natives-windows-${arch}",
"osx": "natives-osx-${arch}"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.aib42.mumblelink:JMumble:1.11",
"url": "http://repo.minecraft-vr.com/"
Expand Down
24 changes: 5 additions & 19 deletions installer/1.7.10-forge.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "1.7.10-minecrift-$VERSION",
"id": "1.7.10-minecrift-Vive-$VERSION",
"time": "2015-01-23T05:13:20+00:00",
"releaseTime": "1960-01-01T07:00:00+00:00",
"type": "release",
Expand Down Expand Up @@ -148,6 +148,10 @@
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1"
},
{
"name": "com.sun:jna:4.2.1",
"url": "http://automat-gh.github.io/minecrift/"
},
{
"name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1",
"natives": {
Expand Down Expand Up @@ -242,24 +246,6 @@
]
}
},
{
"name": "com.valvesoftware.openvr:JOpenVR:0.9.16.0",
"url": "http://repo.minecraft-vr.com/"
},
{
"name": "com.valvesoftware.openvr:JOpenVRLibrary:0.9.16.0",
"url": "http://repo.minecraft-vr.com/",
"natives": {
"linux": "natives-linux-${arch}",
"windows": "natives-windows-${arch}",
"osx": "natives-osx-${arch}"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
{
"name": "net.aib42.mumblelink:JMumble:1.11",
"url": "http://repo.minecraft-vr.com/"
Expand Down
26 changes: 6 additions & 20 deletions installer/1.7.10-nohydra.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "1.7.10-minecrift-$VERSION",
"id": "1.7.10-minecrift-Vive-$VERSION",
"time": "2014-05-14T18:29:23+01:00",
"releaseTime": "2014-05-14T18:29:23+01:00",
"type": "release",
Expand Down Expand Up @@ -99,6 +99,10 @@
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1"
},
{
"name": "com.sun:jna:4.2.1",
"url": "http://automat-gh.github.io/minecrift/"
},
{
"name": "de.fruitfly.ovr:JRift:0.8.0.0.1",
"url": "http://repo.minecraft-vr.com/"
Expand Down Expand Up @@ -196,25 +200,7 @@
"META-INF/"
]
}
},
{
"name": "com.valvesoftware.openvr:JOpenVR:0.9.16.0",
"url": "http://repo.minecraft-vr.com/"
},
{
"name": "com.valvesoftware.openvr:JOpenVRLibrary:0.9.16.0",
"url": "http://repo.minecraft-vr.com/",
"natives": {
"linux": "natives-linux-${arch}",
"windows": "natives-windows-${arch}",
"osx": "natives-osx-${arch}"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
},
{
"name": "net.aib42.mumblelink:JMumbleLibrary:1.11",
"url": "http://repo.minecraft-vr.com/",
Expand Down
26 changes: 6 additions & 20 deletions installer/1.7.10.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "1.7.10-minecrift-$VERSION",
"id": "1.7.10-minecrift-Vive-$VERSION",
"time": "2014-05-14T18:29:23+01:00",
"releaseTime": "2014-05-14T18:29:23+01:00",
"type": "release",
Expand Down Expand Up @@ -99,6 +99,10 @@
{
"name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1"
},
{
"name": "com.sun:jna:4.2.1",
"url": "http://automat-gh.github.io/minecrift/"
},
{
"name": "de.fruitfly.ovr:JRift:0.8.0.0.1",
"url": "http://repo.minecraft-vr.com/"
Expand Down Expand Up @@ -196,25 +200,7 @@
"META-INF/"
]
}
},
{
"name": "com.valvesoftware.openvr:JOpenVR:0.9.16.0",
"url": "http://repo.minecraft-vr.com/"
},
{
"name": "com.valvesoftware.openvr:JOpenVRLibrary:0.9.16.0",
"url": "http://repo.minecraft-vr.com/",
"natives": {
"linux": "natives-linux-${arch}",
"windows": "natives-windows-${arch}",
"osx": "natives-osx-${arch}"
},
"extract": {
"exclude": [
"META-INF/"
]
}
},
},
{
"name": "net.aib42.mumblelink:JMumbleLibrary:1.11",
"url": "http://repo.minecraft-vr.com/",
Expand Down
37 changes: 33 additions & 4 deletions installer/Installer.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Installer extends JPanel implements PropertyChangeListener
private static final long serialVersionUID = -562178983462626162L;
private String tempDir = System.getProperty("java.io.tmpdir");

private static final boolean ALLOW_FORGE_INSTALL = true;
private static final boolean ALLOW_FORGE_INSTALL = false; // VIVE: disabled, forge install isn't working currently
private static final boolean ALLOW_HYDRA_INSTALL = false; // TODO: Change to true once Hydra is fixed up

private static final boolean NEEDS_2010_REDIST = true;
Expand Down Expand Up @@ -576,6 +576,24 @@ private boolean EnableHRTF() // Implementation by Zach Jaggi

return false;
}

// VIVE START - install openVR dlls
private boolean InstallOpenVR() {
File win32_dir = new File (targetDir, "win32" );
File win64_dir = new File (targetDir, "win64" );
win32_dir.mkdirs();
win64_dir.mkdirs();

InputStream openvrdll = Installer.class.getResourceAsStream("win64/openvr_api.dll");
File dll_out = new File (targetDir, "win64/openvr_api.dll");
if (!copyInputStreamToFile(openvrdll, dll_out))
return false;

openvrdll = Installer.class.getResourceAsStream("win32/openvr_api.dll");
dll_out = new File (targetDir, "win32/openvr_api.dll");
return copyInputStreamToFile(openvrdll, dll_out);
}
// VIVE END - install openVR dll

private void sleep(int millis)
{
Expand Down Expand Up @@ -786,6 +804,17 @@ public Void doInBackground()
monitor.close();
return null;
}
// VIVE START - install openVR
monitor.setProgress(52);
monitor.setNote("Installing OpenVR...");
finalMessage = "Failed: Couldn't extract openvr_api.dll to .minecraft folder.";
if(!InstallOpenVR())
{
monitor.close();
return null;
}
// VIVE END - install openVR

// Setup forge if necessary
if (useForge.isSelected() && !forgeVersionInstalled) {
monitor.setProgress(55);
Expand Down Expand Up @@ -1008,7 +1037,7 @@ public Installer(File targetDir)
logoLabel.setAlignmentX(CENTER_ALIGNMENT);
logoLabel.setAlignmentY(CENTER_ALIGNMENT);
logoLabel.setSize(image.getWidth(), image.getHeight());
if (!QUIET_DEV)
if (!QUIET_DEV && false) // VIVE - hide oculus logo
logoSplash.add(logoLabel);
} catch (IOException e) {
} catch( IllegalArgumentException e) {
Expand Down Expand Up @@ -1304,10 +1333,10 @@ public void mouseReleased(MouseEvent e) {
private String getMinecraftProfileName(boolean usingForge)
{
if(!usingForge) {
return "Minecrift " + MINECRAFT_VERSION;
return "Minecrift-Vive " + MINECRAFT_VERSION;
}
else {
return "Minecrift " + MINECRAFT_VERSION + " Forge";
return "Minecrift-Vive " + MINECRAFT_VERSION + " Forge";
}
}

Expand Down
Binary file modified installer/installer.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion minecriftversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
of_json_name = "1.7.10_HD_U_D1"
of_file_md5 = "57c724fe8335c82aef8d54c101043e60"
minecrift_version_num = "1.7.10"
minecrift_build = "R2b"
minecrift_build = "R2b-Vive"
of_file_extension = ".jar"
mcp_version = "mcp908"
mcp_uses_generics = False
Expand Down
Loading

0 comments on commit 3781c3d

Please sign in to comment.