Skip to content

Building from source, VS 2019

LtPinecone edited this page Apr 23, 2019 · 13 revisions

I. Build Urho3D

Open VS 2019

Choose to clone from a repository

Choose the link of the Urho3D repository from Github by clicking the green button on the repository homepage Or paste this link into the "repository" box: https://github.com/urho3d/Urho3D

Choose an empty folder on your computer to store the Urho3D files

Let the files download and let CMake do its magic

Change the build configuration by selecting "Manage Configurations" in the drop down next to "x64-Debug (default)" at the top of the screen

Click the green "+" on the left and select "x64-Release"

In the "CMakeSettings.json window, find the heading called "CMake Variables and Cache"

Save this file (ctrl+s)

Click "Save and Generate CMake Cache to Load Variables" (errors may occur --- this is okay)

If the output below only generated a line or two of a response, click the same button again

Uncheck the variable URHO3D_PCH

At the top right of the table of CMake values, click "Save to JSON"

Click "Save and Generate CMake Cache to Load Variables" again, and another time if there is little output

In the menu bar at the top of the screen, select "Build", and choose "Build All"

Wait for the build to finish

IMPORTANT!!!! Look in the CMakeSettings screen and scroll through the table and look for URHO3D_HOME, Copy that path, we need it later. Demonstrated Below:

Help

II. Build OSP

Open a new instance of VS 2019

Choose to clone from a repository

Choose copy the link of the urho-osp repository https://github.com/TheOpenSpaceProgram/urho-osp and paste it into the repository location box.

Choose an empty folder on your computer to store the urho-osp files

Let the files download and let CMake do its magic (errors might occur --- this is fine)

Change the build configuration by selecting "Manage Configurations" in the drop down next to "x64-Debug (default)" at the top of the screen

Click the green "+" on the left and select "x64-Release"

In the CMakeSettings.json window, find the heading called CMake Variables and Cache

Click "Save and Generate CMake Cache to Load Variables" (errors may occur --- this is okay)

If the output below only generated a line or two of a response, click the same button again

Assign the value of URHO3D_SRC as the folder location of Urho3D used during the cloning of Urho3D from Github

Now, Remember the path we copied from the URHO3D build steps? Paste that in URHO3D_HOME in the OSP cmake Table

At the top right of the table of CMake values, click "Save to JSON"

Click "Save and Generate CMake Cache to Load Variables" again, and another time if there is little output

In the menu bar at the top of the screen, select "Build", and choose "Build All"

Wait for the build to finish

To play, go to the top of the screen, and click the arrow on the Select Startup Item... button, select the OSP.exe (bin\OSP.exe) DO NOT select the one that says (install)

You can’t perform that action at this time.