Browse Source

Update README and add prepare_env scripts.

Darryl Pogue 11 years ago
parent
commit
14950f4c44
  1. 55
      README.md
  2. 2
      cmake/FindPhysX.cmake
  3. 4
      prepare_env.bat
  4. 36
      prepare_env.ps1

55
README.md

@ -21,13 +21,13 @@ Library Dependencies
Plasma currently requires the following third-party libraries:
- nVidia PhysX 2.6.4 - http://www.nvidia.com/object/physx_archives.html#SDK
- Creative Labs' OpenAL SDK 1.1 - http://connect.creativelabs.com/openal/Downloads/OpenAL11CoreSDK.zip
- Microsoft DirectX SDK - http://www.microsoft.com/downloads/en/details.aspx?familyid=3021d52b-514e-41d3-ad02-438a3ba730ba
- Python 2.7 - http://www.python.org/download/releases/2.7/
- libOgg and libVorbis - http://www.xiph.org/downloads/
- OpenSSL - http://www.slproweb.com/products/Win32OpenSSL.html
- OpenAL Soft - http://kcat.strangesoft.net/openal.html
- eXpat - http://expat.sourceforge.net/
- libJPEG - http://www.ijg.org/
- libJPEG - http://libjpeg-turbo.virtualgl.org/
- libPNG - http://www.libpng.org/
- speex - http://www.speex.org/downloads/
- zlib - http://zlib.net/
@ -41,33 +41,42 @@ The following libraries are optional:
Reducing the use of proprietary libraries is a focus of development and should be expected to change.
PhysX, OpenAL, and DirectX SDK will need to be acquired through the above links.
PhysX and DirectX SDK will need to be acquired through the above links.
All other required libraries are available as precompiled binaries and associated files in the [development libraries bundle](http://guildofwriters.org/tools/devlibs.zip) or can be built using their individual build instructions.
Compiling Instructions
----------------------
Currently, compilation only targets Windows systems and requires Visual Studio 2010 or Visual Studio 2012 (including Express Editions).
To compile:
1. Start **CMake-GUI**.
2. Set the *Where is the source code* option to the location where you cloned the repository.
3. Set the *Where to build the binaries* option to a subfolder of the aforementioned location called *build*.
4. Check the **Grouped** and **Advanced** options.
5. Press **Configure**. Select *Visual Studio 10* (or your preferred version of Visual Studio) as the generator.
6. Set the *CMAKE_INSTALL_PREFIX* option under CMAKE to the *cwe-prefix* folder that you extracted from the [development libraries bundle](http://guildofwriters.org/tools/devlibs.zip).
7. Press **Configure** again.
8. Set the *OpenAL include and library path* options under OPENAL.
- Default Include Path: `C:\Program Files\OpenAL 1.1 SDK\include`
- Default Library Path: `C:\Program Files\OpenAL 1.1 SDK\lib\win32\OpenAL32.lib`
9. Press **Configure** again.
10. Set the *PHYSX_SDK_PATH* option under PHYSX.
- Default Path: `C:\Program Files\AGEIA Technologies\AGEIA PhysX SDK\v2.6.4\SDKs`
11. Press **Configure**... For the last time!
12. Press **Generate**. You will now have a Visual Studio solution file (.sln) in the folder that you specified to build the binaries in.
13. Open the solution in Visual Studio. You can compile CyanWorlds.com Engine by pressing *Build -> Build Solution*. This will take some time.
Currently, compilation only targets Windows systems and requires Visual Studio
2013 (including Visual Studio 2013 Express for Windows Desktop).
**Quick-start instructions:**
1. Run the `prepare_env.bat` script included in the repository.
2. You should now have a *build* folder with a Visual Studio solution file
(.sln) inside.
3. Open the solution in Visual Studio. You can compile CyanWorlds.com Engine by
pressing *Build -> Build Solution*. This will take some time.
**To configure manually with CMake and build:**
1. Start **CMake-GUI**.
2. Set the *Where is the source code* option to the location where you cloned
the repository.
3. Set the *Where to build the binaries* option to a subfolder of the
aforementioned location called *build*.
4. Check the **Grouped** and **Advanced** options.
5. Press **Configure**. Select *Visual Studio 12* as the generator.
6. Set the *CMAKE_INSTALL_PREFIX* option under CMAKE to the *cwe-prefix* folder
that you extracted from the [development libraries
bundle](http://guildofwriters.org/tools/devlibs.zip).
7. Press **Configure** again.
8. Press **Generate**. You will now have a Visual Studio solution file (.sln)
in the folder that you specified to build the binaries in.
9. Open the solution in Visual Studio. You can compile CyanWorlds.com Engine by
pressing *Build -> Build Solution*. This will take some time.
Running Instructions

2
cmake/FindPhysX.cmake

@ -9,7 +9,7 @@ endif()
find_path(PHYSX_SDK_PATH Cooking/Include/NxCooking.h
/usr/local/include
/usr/include
PATH_SUFFIXES "PhysX/v2.7.3/SDKs"
"C:/Program Files/AGEIA Technologies/AGEIA PhysX SDK/v2.6.4/SDKs"
)
if(PHYSX_SDK_PATH)

4
prepare_env.bat

@ -0,0 +1,4 @@
@ECHO OFF
SET wdir=%~dp0
SET src=%wdir%prepare_env.ps1
PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command "& '%src%'";

36
prepare_env.ps1

@ -0,0 +1,36 @@
$devlibs_url = "http://guildofwriters.org/tools/devlibs.zip"
if (!(Test-Path -PathType Container build)) {
Write-Host "Creating build folder... " -noNewLine
New-Item -ItemType directory build | Out-Null
Write-Host "OK" -foregroundColor Green
}
Set-Location build
$path = (Get-Location).Path
if (!(Test-Path -PathType Container devlibs)) {
Write-Host "Downloading development libraries... " -noNewLine
## This only works in PS3+ so we'll download the file directly
# Invoke-WebRequest $devlibs_url -OutFile devlibs.zip
$client = New-Object System.Net.WebClient
$client.DownloadFile($devlibs_url, $path + "\devlibs.zip")
Write-Host "OK" -foregroundColor Green
Write-Host "Extracting development libraries... " -noNewLine
New-Item -ItemType directory devlibs | Out-Null
$shell_app = New-Object -com shell.application
$zip = $shell_app.namespace($path + "\devlibs.zip")
$dest = $shell_app.namespace($path + "\devlibs")
$dest.CopyHere($zip.items(), 0x14)
Write-Host "OK" -foregroundColor Green
}
Write-Host "Running CMake to configure build system... "
cmake -DCMAKE_INSTALL_PREFIX=devlibs -G "Visual Studio 12" ..
if ($Host.Name -eq "ConsoleHost") {
Write-Host ""
Write-Host "Press any key to continue..."
$Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp") > $null
}
Loading…
Cancel
Save