Difference between revisions of "User:Jodiah Jensen"

From Second Life Wiki
Jump to navigation Jump to search
Line 68: Line 68:
     )
     )


NOTE: Thanks to [https://wiki.secondlife.com/wiki/User:Lear_Cale Lear Cale] for the above code, however, on my system, simply adding the registry key check does not work. Apparently, the install of Python 2.6 does not create the 'InstallPath' key. Even after manually adding the key, the CMake script 'Python.cmake' does not find the python interpreter. If the above solution does not work for you, try the code listed below:
NOTE: Thanks to [https://wiki.secondlife.com/wiki/User:Lear_Cale Lear Cale] for the above code. I originally tried this code, but for some reason when I installed Python 2.6, it failed to create the InstallPath key. So, I manually inserted the path to my python.exe in the Python.cmake file. This worked fine. However, after seeing Lear Cale's modification to my page, I decided to re-install Python and check again. It seems to work now, as the proper keys were created in the registry this time. IF you try this method and are still getting "Python Interpreter Not Found" error, try uninstalling then re-installing Python 2.6.
  find_program(PYTHON_EXECUTABLE
    NAMES python25.exe python23.exe python.exe
    NO_DEFAULT_PATH # added so that cmake does not find cygwin python
    PATHS
    C:\\Python26\\        #this is the path to 'python.exe' on MY system, replace the drive letter and path with your own, make sure to use the \\ rather than \
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
    )
 


'''OUTPUT from develop.py''':
'''OUTPUT from develop.py''':

Revision as of 20:13, 28 October 2008

HOW I COMPILED SL SOURCE w/ VC++ 2008 Express Edition

CAVEAT: although I was able to successfully build the source using these steps, it hangs after loading the settings

ASSUMPTIONS:

Source version 1.21-r99587

Windows 32bit OS


REQUIREMENTS

Cygwin (make sure that patchutils, flex and bison (all under "devel") are installed) http://www.cygwin.com/

Python (the cmake scripts specifically EXCLUDE the cygwin version of the Python interpreter, in the Python.cmake script, see step 3 below)

Get Python here: http://www.python.org/download/

Get DirectX SDK November 2007 from Microsoft -- Warning 400MB+ http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en

PREREQUISITES:

SETUP CMAKE:

Download CMAKE 2.4.8 from http://www.cmake.org/files/v2.4/cmake-2.4.8-win32-x86.exe

Install CMAKE

Make sure both CMake and Python are in the windows PATH environment variable

STEP 1

DOWNLOAD SOURCE: http://secondlife.com/developers/opensource/downloads/2008/10/slviewer-src-viewer_1-21-r99587.zip

DOWNLOAD LIBS http://secondlife.com/developers/opensource/downloads/2008/10/slviewer-win32-libs-viewer_1-21-r99587.zip

DOWNLOAD ARTWORK http://secondlife.com/developers/opensource/downloads/2008/10/slviewer-artwork-viewer_1-21-r99587.zip


STEP 2

EXTRACT ALL THREE ZIP FILES TO SAME PATH (no spaces in the path name) ie "D:\SL_SRC\"

this will result in a single folder inside D:\SL_SRC\ called "linden" ("D:\SL_SRC\linden")

TODO: insert directory tree here

STEP 3

RUN develop.py SCRIPT

run a command prompt in the "D:\SL_SRC\linden\indra" path

run the script using "develop.py -G VC90"

NOTE: to get the develop.py script to find the python interpreter when using Python 2.6, I needed to modify the D:\SL_SRC\linden\indra\cmake\Python.cmake file as follows:

 find_program(PYTHON_EXECUTABLE
   NAMES python25.exe python23.exe python.exe
   NO_DEFAULT_PATH # added so that cmake does not find cygwin python
   PATHS
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]       <-- add this line
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath]
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath]
   [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath]
   )

NOTE: Thanks to Lear Cale for the above code. I originally tried this code, but for some reason when I installed Python 2.6, it failed to create the InstallPath key. So, I manually inserted the path to my python.exe in the Python.cmake file. This worked fine. However, after seeing Lear Cale's modification to my page, I decided to re-install Python and check again. It seems to work now, as the proper keys were created in the registry this time. IF you try this method and are still getting "Python Interpreter Not Found" error, try uninstalling then re-installing Python 2.6.

OUTPUT from develop.py:

   ...
   ...
   -- Version of viewer is 1.21.6.0
   -- Configuring done
   -- Generating done
   -- Build files have been written to: D:/SL_SRC/linden/indra/build-VC90
   Running 'tools\\vstool\\VSTool.exe --solution build-VC90\\SecondLife.sln --config RelWithDebInfo --startup secondlife-bin' in 'D:\\SL_SRC\\linden\\indra'
   Editing solution: build-VC90\SecondLife.sln
   Looking for existing VisualStudio instance...
     Didn't find open solution, starting new background VisualStudio instance...
     Reading .sln file version...
     Using version: VC90...
   Value cannot be null.
   Parameter name: type
   Quitting do to error opening: D:\SL_SRC\linden\indra\build-VC90\SecondLife.sln

NOTE: this appears to be a problem with using VStools with the express version of VC++, I had to manually set the Startup Project, Build Type, and Working directory (see step 5)

STEP 4

place FMOD files in proper places

Copy "fmodapi375win\api\inc\fmod.h" to "linden\libraries\include"

Copy "fmodapi375win\api\inc\fmod_errors.h" to "linden\libraries\include"

Copy "fmodapi375win\api\lib\fmodvc.lib" to "linden\libraries\i686-win32\lib\release" and to "linden\libraries\i686-win32\lib\debug"

Copy "fmodapi375win\api\fmod.dll" to "linden\indra\newview"

STEP 5

OPEN D:\SL_SRC\linden\indra\build-VC90\secondlife.sln in VC++

set 'secondlife-bin' (in Solution Explorer) as Startup Project

set the working directory to 'D:\SL_SRC\linden\indra\newview' (select secondlife-bin and use Project > Properties > Configuration Properties > Debugging)

select build type 'RelWithDebInfo' (in the dropdown to the right of the green arrow on the toolbar)

Remove the llkdu.dll.rule entries (three of them) from the copy_win_libs project CMake Rules folder (per the notes from Cristopher Omega at https://wiki.secondlife.com/wiki/Talk:CMake#CMake_and_Visual_Studio_C.2B.2B_2005_Express_Edition )

click the green arrow (start debugging)

POST MORTEM:

Build was successful, but the executable doesn't run properly, it hangs , looping through code in the XTREE source file. I suspect this is due to problems with the BOOST libraries and using the 2008 version of VC++ (see Michelle Zenovka's page https://wiki.secondlife.com/wiki/User:Michelle2_Zenovka/cmake#boost_hell ).

I am working on compiling boost 1.36 with VC++2008 EXPRESS to use with the 1.21.6 source code.

REFERENCES

https://wiki.secondlife.com/wiki/CMake

https://wiki.secondlife.com/wiki/Talk:CMake

https://wiki.secondlife.com/wiki/Compiling_the_viewer

https://wiki.secondlife.com/wiki/User:Michelle2_Zenovka/cmake