Skip to content

Commit

Permalink
add 1.16.8
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Apr 12, 2021
1 parent 2c7c129 commit 0ab7b21
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 2 deletions.
7 changes: 7 additions & 0 deletions recipes/openvr/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ sources:
"1.14.15":
url: https://github.com/ValveSoftware/openvr/archive/v1.14.15.tar.gz
sha256: 40644e569f057e86c733d818a22d821c640307e5058d95958414422134d79584
"1.16.8":
url: https://github.com/ValveSoftware/openvr/archive/refs/tags/v1.16.8.tar.gz
sha256: 387c98c0540f66595c4594e5f3340a1095dd90e954ff14fd5d89cc849ba32d1b
patches:
"1.16.8":
- patch_file: "patches/fix-includes-and-assert-1.16.8.patch"
base_path: "source_subfolder"
6 changes: 4 additions & 2 deletions recipes/openvr/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class OpenvrConan(ConanFile):
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/ValveSoftware/openvr"
license = "BSD-3-Clause"
exports_sources = ["CMakeLists.txt"]
generators = "cmake"

settings = "os", "compiler", "build_type", "arch"
options = {
Expand All @@ -22,6 +20,8 @@ class OpenvrConan(ConanFile):
"fPIC": True,
}

exports_sources = ["CMakeLists.txt", "patches/**"]
generators = "cmake"
_cmake = None

@property
Expand Down Expand Up @@ -59,6 +59,8 @@ def _configure_cmake(self):
return self._cmake

def build(self):
for patch in self.conan_data.get("patches", {}).get(self.version, []):
tools.patch(**patch)
cmake = self._configure_cmake()
cmake.build()

Expand Down
122 changes: 122 additions & 0 deletions recipes/openvr/all/patches/fix-includes-and-assert-1.16.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
Fix compilaton errors due to wrong headers folder and usage of missing assert.h:
https://github.com/ValveSoftware/openvr/pull/1524
https://github.com/ValveSoftware/openvr/pull/1542

--- a/src/openvr_api_public.cpp
+++ b/src/openvr_api_public.cpp
@@ -2,12 +2,12 @@
#define VR_API_EXPORT 1
#include "openvr.h"
#include "ivrclientcore.h"
-#include <vrcore/pathtools_public.h>
-#include <vrcore/sharedlibtools_public.h>
-#include <vrcore/envvartools_public.h>
+#include <vrcommon/pathtools_public.h>
+#include <vrcommon/sharedlibtools_public.h>
+#include <vrcommon/envvartools_public.h>
#include "hmderrors_public.h"
-#include <vrcore/strtools_public.h>
-#include <vrcore/vrpathregistry_public.h>
+#include <vrcommon/strtools_public.h>
+#include <vrcommon/vrpathregistry_public.h>
#include <mutex>

using vr::EVRInitError;
--- a/src/vrcommon/dirtools_public.cpp
+++ b/src/vrcommon/dirtools_public.cpp
@@ -1,7 +1,7 @@
//========= Copyright Valve Corporation ============//
-#include <vrcore/dirtools_public.h>
-#include <vrcore/strtools_public.h>
-#include <vrcore/pathtools_public.h>
+#include <vrcommon/dirtools_public.h>
+#include <vrcommon/strtools_public.h>
+#include <vrcommon/pathtools_public.h>

#include <errno.h>
#include <string.h>
--- a/src/vrcommon/envvartools_public.cpp
+++ b/src/vrcommon/envvartools_public.cpp
@@ -1,6 +1,6 @@
//========= Copyright Valve Corporation ============//
-#include <vrcore/envvartools_public.h>
-#include <vrcore/strtools_public.h>
+#include <vrcommon/envvartools_public.h>
+#include <vrcommon/strtools_public.h>
#include <stdlib.h>
#include <string>
#include <cctype>
--- a/src/vrcommon/pathtools_public.cpp
+++ b/src/vrcommon/pathtools_public.cpp
@@ -1,6 +1,6 @@
//========= Copyright Valve Corporation ============//
-#include <vrcore/strtools_public.h>
-#include <vrcore/pathtools_public.h>
+#include <vrcommon/strtools_public.h>
+#include <vrcommon/pathtools_public.h>

#if defined( _WIN32)
#include <windows.h>
--- a/src/vrcommon/sharedlibtools_public.cpp
+++ b/src/vrcommon/sharedlibtools_public.cpp
@@ -1,5 +1,5 @@
//========= Copyright Valve Corporation ============//
-#include <vrcore/sharedlibtools_public.h>
+#include <vrcommon/sharedlibtools_public.h>
#include <string.h>

#if defined(_WIN32)
--- a/src/vrcommon/strtools_public.cpp
+++ b/src/vrcommon/strtools_public.cpp
@@ -1,6 +1,7 @@
//========= Copyright Valve Corporation ============//
-#include <vrcore/strtools_public.h>
+#include <vrcommon/strtools_public.h>
#include <string.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <sstream>
@@ -9,7 +10,6 @@
#include <functional>
#include <locale>
#include <codecvt>
-#include <vrcore/assert.h>

#if defined( _WIN32 )
#include <windows.h>
@@ -128,7 +128,6 @@ std::string Format( const char *pchFormat, ... )
// Something went fairly wrong
if ( unSize < 0 )
{
- AssertMsg( false, "Format string parse failure" );
return "";
}

@@ -149,7 +148,6 @@ std::string Format( const char *pchFormat, ... )
// Double check, just in case
if ( unSize < 0 )
{
- AssertMsg( false, "Format string parse failure" );
return "";
}

--- a/src/vrcommon/vrpathregistry_public.cpp
+++ b/src/vrcommon/vrpathregistry_public.cpp
@@ -1,11 +1,11 @@
//========= Copyright Valve Corporation ============//

-#include <vrcore/vrpathregistry_public.h>
+#include <vrcommon/vrpathregistry_public.h>
#include <json/json.h>
-#include <vrcore/pathtools_public.h>
-#include <vrcore/envvartools_public.h>
-#include <vrcore/strtools_public.h>
-#include <vrcore/dirtools_public.h>
+#include <vrcommon/pathtools_public.h>
+#include <vrcommon/envvartools_public.h>
+#include <vrcommon/strtools_public.h>
+#include <vrcommon/dirtools_public.h>

#if defined( WIN32 )
#include <windows.h>
2 changes: 2 additions & 0 deletions recipes/openvr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ versions:
folder: "all"
"1.14.15":
folder: "all"
"1.16.8":
folder: "all"

0 comments on commit 0ab7b21

Please sign in to comment.