Skip to content

Commit

Permalink
Backout changeset 95e6d5d4d8fc956e8cfadce738b1f11e4fb9ab5e
Browse files Browse the repository at this point in the history
  • Loading branch information
sinbad committed Jan 12, 2013
1 parent 9395fed commit 978533d
Show file tree
Hide file tree
Showing 2,431 changed files with 105,501 additions and 12,102 deletions.
4 changes: 3 additions & 1 deletion .hgignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax: glob
testTerrain*.dat
*.dll
*.filters
Dependencies/include/FreeImage.h
#*.vcxproj
#*.filters
*.vcxproj.user
*.pdb
*.ilk
Expand All @@ -15,7 +15,9 @@ Dependencies/*
build/*
Samples/Browser/WinRT/Debug
Samples/Browser/WinRT/Release
Samples/Browser/WinRT/Generated Files
Samples/Browser/WinRT/Media
Samples/Browser/WinRT.Xaml/Debug
Samples/Browser/WinRT.Xaml/Release
Samples/Browser/WinRT.Xaml/Generated Files
Samples/Browser/WinRT.Xaml/Media
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ c974a42f23b7092a370d1c594eb1e782da9f61c8 v1-7-1
123466e1905576be1e4cdee82de0f2782d73885e v1-8-0RC1
3467d92e149c044b3c9a3527827f49f4ef9ae604 v1-7-4
41fc194167fae2d5a6f590edd5f4977eb29ca3eb v1-8-0
525a7f3bcd4e51b1085c42a8b55fe07eb7700458 v1-8-1
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,4 @@ Edoardo Molinatti (edomoli/edoardo)
Jeremy Altavilla (fedyakin)
Peter Krattze (vouti / douvitoui)
Martin Dub� (arcanemartz)
Microsoft Open Technologies, Inc.
2 changes: 1 addition & 1 deletion BUGS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To submit patches, please use the tracker at SourceForge:

OGRE (www.ogre3d.org) is made available under the MIT License.

Copyright (c) 2000-2012 Torus Knot Software Ltd
Copyright (c) 2000-2013 Torus Knot Software Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
66 changes: 44 additions & 22 deletions BuildingOgreWinRT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,80 @@ Windows 8 Developer/Consumer Preview (build 8102/8250) are not supported.
We recommend using the final version of Windows 8. You can get a trial version
from the Microsoft site, google for it.

3. Change to latest cmake (CMake versions before 2.8.8 are missing
the special target properties: VS_WINRT_EXTENSIONS and VS_WINRT_REFERENCES).
(http://www.cmake.org/)
5. Download and install this cmake http://www.cmake.org/files/v2.8/cmake-2.8.9-win32-x86.exe
Now we need to fix cmake to support visual studio express.
6. Run visual studio express for windows phone 8 as admin (right click panel then "run as admin")
7. open this file in visual studio "C:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\CMakeVS11FindMake.cmake"
8. Goto line 19 and change it from:
NAMES devenv
To
NAMES devenv VPDExpress

4. You need Visual Studio 2012 Release Preview or later.
Note: There have been reports of issues with the express version.
We recommend using one of final version of Visual Studio 2012. You can get a
trial version from the Microsoft site, google for it.

5. Patched dependencies must be used, compiled with #define WINAPI_FAMILY = 2.
(https://bitbucket.org/eugene_gff/ogre-dependencies-winrt)
(https://bitbucket.org/assaframan/ogre-dependencies-winrt)
Cg is not supported, and only headers from OIS are needed.

6. Compile dependencies for all configurations that you plan to use before running CMake.
Dependencies for Win32 and for WinRT must be located in separate folders, Win32 version
can be built from OgreDependencies.VS2012.sln, WinRT from OgreDependencies.VS2012.WinRT.sln
Run CMake, select "Visual Studio 11" generator, specify source and binaries folders,
than "Configure", specify WinRT dependencies folder, again "Configure", set
OGRE_BUILD_PLATFORM_WINRT check ignoring other errors, again "Configure", should be
no more errors and "Generate".
OGRE_BUILD_PLATFORM_WINRT check ignoring other errors, again "Configure", should be
no more errors and "Generate". Also set OGRE_STATIC to on.
If you want build time to be shorter - set OGRE_UNITY_BUILD to on.


7. Remove the following projects from the solution: ALL_BUILD, INSTALL, PACKAGE.

8. In WinRT mode VS2012 by default uses precompiled headers, and CMake can not yet prevent this.
So, open OGRE.sln in Visual Studio, select All projects (but not the solution itself)
Right click, than go to "Properties" select "Configuration Properties", than "All Configurations"
and under "Configuration Properties > C/C++ > Precompiled Headers > Precompiled Header" choose
"Not Using Precompiled Headers". (if you still have precompiled header issues when compiling
do this step one more time - I guess this a vs bug)
Then go to "Configuration Properties > General > Metro Style App Support"
choose "Yes".
Right click, than go to "Properties" select "Configuration Properties", than "All Configurations"
and under "Configuration Properties > General > Windows Store App Support" choose "Yes". After this
(not before) go to "Configuration Properties > C/C++ > Precompiled Headers > Precompiled Header"
and choose "Not Using Precompiled Headers".

9. As CMake can not generate valid WinRT app project we need to use our own.
Therefore "File > Add > Existing Project ..." and select
"Samples > Browser > WinRT > SampleBrowserWinRT.vcxproj".
Therefore "File > Add > Existing Project ..." and select
"Samples > Browser > WinRT > SampleBrowserWinRT.vcxproj".
Repeat this for "Samples > Browser > WinRT.Xaml > SampleBrowserWinRTXaml.vcxproj".
if this is your first time on that computer - you will be asked for a developer licence, do the
required steps.

10. Add project dependencies: "SampleBrowserWinRT > Properties", than
10. Add dependencies to solution by right clicking the solution, selecting add existing project,
select "solution" in the combo next to the file select edit at the bottom then select the
dependencies solution, all the dependencies should be now a part of the solution. Remove OIS
project that you just add - but leave the rest in.

11. Add project dependencies: "SampleBrowserWinRT > Properties", than
"Common Properties > Framework and References", remove all existing references
and then "add" and in that window add a check mark next to all the projects on the list,
note - it takes a long time to add them. But this way - the dlls will be deployed with
the resulted exe.
and then "add" and in that window add a check mark next to all the projects on the list (except
for the SampleBrowser projects...)
Repeat this for SampleBrowserWinRTXaml.
In prerelease version of VS2012 it take big amount of time, but this bug was fixed in RTM.

12. Select only RenderSystem_Direct3D11 project in the solution tree, right click, properties, select all configs and "win32" platform in the combos at the top of the properties window, select "configuration properties"->"C++"->"Command line" on the tree on the left of that window, add
/ZW /AI "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcpackages"
To the command line

13. right click SampleBrowserWP8 -> Properties -> C++ -> General -> Additional Include Directories
Add the path of
[your build directory]\include ex: c:\ogre\build6\include
[your dependencies dir]\include ex: C:\ogre\dep\include
[your dependencies dir]\include\ois

11. Try to build the solution.
14. Try to build the solution.

9. If you have a compile issue with finding OIS.h - this is becouse SampleBrowserWinRT.vcxproj
15. If you have a compile issue with finding OIS.h - this is becouse SampleBrowserWinRT.vcxproj
wasn't generated by cmake, the way to fix it is just to copy paste the ois path from one of the
other projects "additional include directories" to SampleBrowserWinRT.vcxproj "additional
include directories" config.

10. If you get any compile\link error with "...mklink /J..." failed - it mean that the
16. If you get any compile\link error with "...mklink /J..." failed - it mean that the
code is not on a local drive (VMWare shared folder will not work for this...)

11. Select SampleBrowserWinRT as the start up project and run.
17. Select SampleBrowserWinRT or SampleBrowserWinRTXaml as the start up project and run.
64 changes: 64 additions & 0 deletions BuildingOgreWindowsPhone.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
To build Ogre for Windows Phone some manual steps are required:

1. Install Windows Phone 8 SDK.
2. Get the OGRE WinRT dependencies from here: https://bitbucket.org/assaframan/ogre-dependencies-for-windows-phone/changesets
3.
4. Build dependencies in debug and release config.
5. Download and install this cmake http://www.cmake.org/files/v2.8/cmake-2.8.9-win32-x86.exe
Now we need to fix cmake to support visual studio express.
6. Run visual studio express for windows phone 8 as admin (right click panel then "run as admin")
7. open this file in visual studio "C:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\CMakeVS11FindMake.cmake"
8. Goto line 19 and change it from:
NAMES devenv
To
NAMES devenv VPDExpress
9. Open cmake, select source path (make sure you are using OGRE 1.9 or above) and create a build project (visual studio 11 project...)
10. Set the following cmake parameters:
OGRE_DEPENDENCIES_DIR = the path of the dependencies from previous steps
OGRE_STATIC = ON
OGRE_UNITY_BUILD = ON
OGRE_BUILD_PLATFORM_WINDOWS_PHONE = ON
Press Config button then set:
OGRE_BUILD_PLATFORM_WINRT = ON

11. Generate solution
12. Open it
13. Remove ALL_BUILD, INSTALL and PACKAGE projects from the solution
14. Select all projects in the solution tree, right click, properties, select all configs and "win32" platform in the combos at the top of the properties window, select "configuration properties" on the tree on the left of that window, then change "platform toolset" on the right of the window to v110_wp80
15. Select only RenderSystem_Direct3D11 project in the solution tree, right click, properties, select all configs and "win32" platform in the combos at the top of the properties window, select "configuration properties"->"C++"->"Command line" on the tree on the left of that window, add
/ZW /AI "c:\Program Files (x86)\Windows Phone Kits\8.0\Windows Metadata"
To the command line

16. Delete OgreWin32Resources.rc from Sample_CubeMapping
17. Open the configuration manager by right clicking the solution in the solution tree, on the right, active solution platform combo, select new, select arm, copy setting from win32
18. Add dependencies to solution by right clicking the solution, selecting add existing project, select "solution" in the combo next to the file select edit at the bottom then select the dependencies solution, all the dependencies should be now a part of the solution. Remove OIS Project.
19. Add the following project to the solution - Samples\Browser\WinRT\SampleBrowserWP8.vcxproj
20. Change to Phone debug or Phone release config.
21. Select Win32 or arm platform (win32 for emulation, arm for running on the device)
22. You may need to add the references to all of the solution projects for this project, so check by opening the "common properties"->"configuration properties" - and see that you don't have any error icons in the references.
23. Right click SampleBrowserWP8 -> Properties -> C++ -> General -> Additional Include Directories
24. Select debug config, select all projects, right click any project from the selected ones -> Properties -> C++ -> Code generation -> Multi threaded Debug DLL (then do the same to release -> Multi threaded DLL)

25. right click SampleBrowserWP8 -> Properties -> C++ -> General -> Additional Include Directories
Add the path of
[your build directory]\include ex: c:\ogre\build6\include
[your dependencies dir]\include ex: C:\ogre\dep\include
[your dependencies dir]\include\ois
26. Compile.
27. Before you run for the first time make sure you have a shader cache for the project you are running - as you can't compile shader on the phone. (TODO - explain more)
28. In Windows Phone and (Store versions of WinRT) you don't have the shader compiler, meaning you have to use the shader cache, they tricky part is that you need to create the shader cache, to do that, compile OGRE for WinRT and add ENABLE_SHADERS_CACHE_SAVE to the preprocessor definitions in the config, run the project, act out all the use cases you are going to do in the final version, then go to the home directory of the WinRT (I find the home directory by putting a breakpoint in FileSystemLayerImpl_WIN32.cpp line 138) and copy the file cache.bin from the OGRE dir there to Samples\Browser\WinRT.


Note about adding resources - you must right click each resource you want to be copied as part of the release, select "properties", select all configurations and all platforms, set "exclude from build" to "No", "Content" to "Yes", "Item type" to "Does not participate in build" and press the "OK" button. You can also multi select a group of resource and set the properties for all of them together. Note that if the file is under the path of project file - the file will be copied with the relative path to the project file, else it will be at the root of the resources folder of the deployed project.
Resource related troubleshooting:
1. When you compile you get shader compiler issues (like "VS_2_0 is doesn't support doing this") - it mean that you didn't set "Item type" to "Does not participate in build".
2. Missing file exception for some file - you didn't use the relative path, or the file is not in a sub folder in the deployed project because you didn't put it under the project dir, or you didn't set "Content" to "Yes".
3. A strange compiler\linker error - no message, something about FCX.exe error, this mean that the resource doesn't exist on your drive anymore or that you forgot to set "Item type" to "Does not participate in build". The FCX.exe is a compiler that can compile some resource types - to help with performance, like images and shader. Microsoft idea was that it will help runtime performance - by compiling shaders as part of the compile, this is why they didn't include the shader compiler as part of WinRT. I guess they didn't think of our scenario of runtime shader generation. The way to disable that nice compiler is to "Item type" to "Does not participate in build".


Note about running using VMware:
We were able to run the emulation and debug without an issue by following the following two steps:
Under the settings of the VM > CPU, make sure you have the option to pass-through the Intel VT-x/EPT feature.
Edit the config file .vmx and add the parameter: hypervisor.cpuid.v0 = "FALSE"

All versions of Visual Studio 2012 have a window refresh issue when running in VMware and the window is maximized, the solution is just to change the size of the Visual Studio window to be less the the screen width and height.
18 changes: 18 additions & 0 deletions CMake/ConfigureBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ set(OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE 0)
set(OGRE_SET_DISABLE_GLES2_CG_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES2_GLSL_OPTIMISER 0)
set(OGRE_SET_DISABLE_GLES2_VAO_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES_STATE_CACHE_SUPPORT 0)
set(OGRE_SET_DISABLE_GLES2_STATE_CACHE_SUPPORT 0)
set(RTSHADER_SYSTEM_BUILD_CORE_SHADERS 0)
set(RTSHADER_SYSTEM_BUILD_EXT_SHADERS 0)
set(OGRE_STATIC_LIB 0)
Expand Down Expand Up @@ -130,6 +132,12 @@ endif()
if (NOT OGRE_CONFIG_ENABLE_GLES2_VAO_SUPPORT)
set(OGRE_SET_DISABLE_GLES2_VAO_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_GLES_STATE_CACHE_SUPPORT)
set(OGRE_SET_DISABLE_GLES_STATE_CACHE_SUPPORT 1)
endif()
if (NOT OGRE_CONFIG_ENABLE_GLES2_STATE_CACHE_SUPPORT)
set(OGRE_SET_DISABLE_GLES2_STATE_CACHE_SUPPORT 1)
endif()
if (OGRE_STATIC)
set(OGRE_STATIC_LIB 1)
endif()
Expand Down Expand Up @@ -227,6 +235,16 @@ if (UNIX)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Property.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)
endif ()

if (OGRE_BUILD_COMPONENT_OVERLAY)
configure_file(${OGRE_TEMPLATES_DIR}/OGRE-Overlay.pc.in ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Overlay.pc @ONLY)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Overlay.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)
endif ()

if (OGRE_BUILD_COMPONENT_VOLUME)
configure_file(${OGRE_TEMPLATES_DIR}/OGRE-Volume.pc.in ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Volume.pc @ONLY)
install(FILES ${OGRE_BINARY_DIR}/pkgconfig/OGRE-Volume.pc DESTINATION ${OGRE_LIB_DIRECTORY}/pkgconfig)
endif ()

if (CMAKE_CXX_COMPILER MATCHES ".*clang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif ()
Expand Down
23 changes: 11 additions & 12 deletions CMake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ include(FindPkgMacros)
getenv_path(OGRE_DEPENDENCIES_DIR)
if(OGRE_BUILD_PLATFORM_APPLE_IOS)
set(OGRE_DEP_SEARCH_PATH
${OGRE_DEPENDENCIES_DIR}
${ENV_OGRE_DEPENDENCIES_DIR}
"${OGRE_BINARY_DIR}/iOSDependencies"
"${OGRE_SOURCE_DIR}/iOSDependencies"
"${OGRE_BINARY_DIR}/../iOSDependencies"
Expand Down Expand Up @@ -78,10 +76,10 @@ macro_log_feature(FreeImage_FOUND "freeimage" "Support for commonly used graphic

# Find FreeType
find_package(Freetype)
macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" TRUE "" "")
macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "")

# Find X11
if (UNIX AND NOT APPLE AND NOT ANDROID)
if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT FLASHCC)
find_package(X11)
macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "")
macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "")
Expand All @@ -96,11 +94,15 @@ endif ()
#######################################################################

# Find OpenGL
if(NOT ANDROID)
if(NOT ANDROID AND NOT FLASHCC)
find_package(OpenGL)
macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")
endif()

# Find OpenGL 3+
find_package(OpenGL)
macro_log_feature(OPENGL_FOUND "OpenGL 3+" "Support for the OpenGL 3+ render system" "http://www.opengl.org/" FALSE "" "")

# Find OpenGL ES 1.x
find_package(OpenGLES)
macro_log_feature(OPENGLES_FOUND "OpenGL ES 1.x" "Support for the OpenGL ES 1.x render system (DEPRECATED)" "http://www.khronos.org/opengles/" FALSE "" "")
Expand All @@ -120,7 +122,7 @@ endif()
#######################################################################

# Find Cg
if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR OGRE_BUILD_PLATFORM_WINRT OR ANDROID))
if (NOT (OGRE_BUILD_PLATFORM_APPLE_IOS OR OGRE_BUILD_PLATFORM_WINRT OR ANDROID OR FLASHCC))
find_package(Cg)
macro_log_feature(Cg_FOUND "cg" "C for graphics shader language" "http://developer.nvidia.com/object/cg_toolkit.html" FALSE "" "")
endif ()
Expand All @@ -134,9 +136,9 @@ else ()
set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
endif ()
if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
set(Boost_COMPILER "-xgcc42")
set(Boost_USE_MULTITHREADED OFF)
endif()
set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
set(Boost_ADDITIONAL_VERSIONS "1.53" "1.53.0" "1.52" "1.52.0" "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
# Components that need linking (NB does not include header-only components like bind)
set(OGRE_BOOST_COMPONENTS thread date_time)
find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
Expand Down Expand Up @@ -218,10 +220,7 @@ macro_log_feature(CppUnit_FOUND "CppUnit" "Library for performing unit tests" "h
#######################################################################
# Apple-specific
#######################################################################
if (APPLE)
find_package(iOSSDK)
macro_log_feature(iOSSDK_FOUND "iOS SDK" "iOS SDK" "http://developer.apple.com/ios" FALSE "" "")

if (APPLE)
if (NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
find_package(Carbon)
macro_log_feature(Carbon_FOUND "Carbon" "Carbon" "http://developer.apple.com/mac" TRUE "" "")
Expand Down
Loading

0 comments on commit 978533d

Please sign in to comment.