LibreVR / Revive

Play Oculus-exclusive games on the HTC Vive or Valve Index, scroll down for downloads and installation instructions.
Other
3.61k stars 332 forks source link

Build Instructions #471

Open asampal opened 7 years ago

asampal commented 7 years ago

Could some details on building be added to the project? e.g. version of VS, environment vars needed, and any pointers that might be useful.

CrossVR commented 7 years ago

I was planning to do that sometime soon, but I've been postponing it since I've been the only contributor for most of the project lifetime.

Here are some instructions to get you started:

  1. The repo has submodules, so clone it with git clone --recursive or just run git submodule update --init.
  2. Download the Oculus SDK and extract the LibOVR folder in the repo: https://developer3.oculus.com/downloads/pc/1.10.1/Oculus_SDK_for_Windows/
  3. Compile the Revive and ReviveInjector projects, ignore the reviveoverlay project, you don't need it unless you want to work on the UI.
  4. Set the ReviveInjector as the startup project and set the debugging command-line argument to the executable path of the game you want to test.

The version of VS is 2015, no environment vars are necessary.

CrossVR commented 7 years ago

Also, I'd like to get rid of step 2 at some point, all we actually need is the function and structure definitions from the headers.

asampal commented 7 years ago

For now, I'm using a VS 2017 RC so I changed the Windows SDK configured in the projects to the version that installs with that. After pulling down the Oculus SDK I got things to compile up to the point of the missing Qt dependencies. What version is needed? Would the latest work or is there a specific reason to use an earlier one?

CrossVR commented 7 years ago

It's based on Qt5, so you need to install the latest version of Qt together with QT VS Tools (I'm not sure if there's a VS 2017 version yet)

There's also a Qt Creator project you can use instead of the Qt VS Tools, but it may not always be up-to-date since I'm moving away from Qt Creator. Also, you'll need to run windeployqt manually right now to copy all the Qt dependencies to the binary directory. I'm in the process of adding that tool as an automatic build step.

asampal commented 7 years ago

I managed to build all projects finally. Needed Qt 5.7.1 for ReviveOverlay - 5.6.2 or 5.8.0 wouldn't work (5.6 was missing some functions and 5.8 was triggering some compiler errors (see this). Not sure if this error will go away when VS 2017 ships.

Note that there are 2 hardcoded paths to ReviveOverlay_resource.rc in reviveoverlay.vcxproj and reviveoverlay.vcxproj.filters.

CrossVR commented 7 years ago

Ah Qt 5.8 was released 3 days ago, so I haven't tested compilation with that version of Qt yet.

wtesler commented 6 years ago

If you updated the build instructions, it would be easier for people to fork the project. Are the instructions above still relevant?

CrossVR commented 6 years ago

@wtesler The instructions are still relevant, all you need to do is replace the Oculus SDK with 1.18 instead (1.19 is not yet supported).

stephenc87 commented 4 years ago

Building fails with any instructions found here with error code LNK1104 cannot open file 'glfw3.lib'

CrossVR commented 4 years ago

Revive currently uses GLFW in debug config to show its profiler. It's available in the External folder as a submodule, but you'll have to build it yourself.