Difference between revisions of "User:Nicky Perian/Visual Studio 10 Autobuild"
Nicky Perian (talk | contribs) |
Nicky Perian (talk | contribs) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Establish your programming environment== | ==Establish your programming environment== | ||
This is needed for compiling any viewer based on the LL open source code, but only needs to be done once. | This is needed for compiling any viewer based on the LL open source code, but only needs to be done once. | ||
#Obtain Visual Studio 2010 (Express is OK) | |||
[http://www.microsoft.com/express/download/ Click here to download Visual C++ Express - current version is VS2010] | #:[http://www.microsoft.com/express/download/ Click here to download Visual C++ Express - current version is VS2010] | ||
#Install Microsoft Platform & DirectX SDKs | |||
Download and install [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35aeda01-421d-4ba5-b44b-543dc8c33a20 Windows SDK for Windows 7 and .NET Framework 4 (ISO)] or [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6B6C21D2-2006-4AFA-9702-529FA782D63B Windows SDK for Windows 7 and .NET Framework 4 (Web Install)] and | #:Download and install [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35aeda01-421d-4ba5-b44b-543dc8c33a20 Windows SDK for Windows 7 and .NET Framework 4 (ISO)] or [http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6B6C21D2-2006-4AFA-9702-529FA782D63B Windows SDK for Windows 7 and .NET Framework 4 (Web Install)] and | ||
[http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba Download and install DirectX SDK (June 2010)] | #:[http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba Download and install DirectX SDK (June 2010)] | ||
#Run Microsoft update and keep running it until no updates are needed. This may take 6~8 iterations on older versions of windows. | |||
#Install other development tools | |||
[http://code.google.com/p/unsis/downloads/list UniCode NSIS(download Unicode NSIS)] | #*[http://code.google.com/p/unsis/downloads/list UniCode NSIS(download Unicode NSIS)] | ||
This is the package installer used to build Setup.exe. Note: As of this writing the file is downloaded with an *.exec extension that needs renamed *.exe. | #*:This is the package installer used to build Setup.exe. Note: As of this writing the file is downloaded with an *.exec extension that needs renamed *.exe. | ||
*CMake ([http://www.cmake.org/files/v2.8/ download CMake]) | #*CMake ([http://www.cmake.org/files/v2.8/ download CMake]) | ||
should be version 2.8.1 Kitware corrected a bug related to VS2010 at 2.8.1 and it came back in the current versions but, is due to be fixed in version 2.8.4. (and ensure any other versions aren't in your PATH environment variables) | #*:should be version 2.8.1 Kitware corrected a bug related to VS2010 at 2.8.1 and it came back in the current versions but, is due to be fixed in version 2.8.4. (and ensure any other versions aren't in your PATH environment variables) | ||
*Cygwin ([http://www.cygwin.com/ download Cygwin]) | #*Cygwin ([http://www.cygwin.com/ download Cygwin]) | ||
When you run the cygwin setup utility make sure you have selected to | #*:When you run the cygwin setup utility make sure you have selected to install unzip (under Archive), patchutils, flex, bison (all located under "devel"), and curl (under Web) which are not part of the default install. Do not install Cygwin Python. | ||
*Python ([http://www.python.org/download/ download either Python.org Standard Python] or [http://www.activestate.com/activepython/downloads ActivePython]) Note: build scripts support Python 2.6, not 2.7 yet. | #*Python ([http://www.python.org/download/ download either Python.org Standard Python] or [http://www.activestate.com/activepython/downloads ActivePython]) Note: build scripts support Python 2.6, not 2.7 yet. | ||
*TortoiseHg ([http://tortoisehg.bitbucket.org/ download TortoiseHg]) or ([http://mercurial.selenic.com/release/windows/Mercurial-1.7.5.exe Mercurial Hg]) | #*TortoiseHg ([http://tortoisehg.bitbucket.org/ download TortoiseHg]) or ([http://mercurial.selenic.com/release/windows/Mercurial-1.7.5.exe Mercurial Hg]) | ||
You need to use an editor that conforms to the [ | #*:You need to use an editor that conforms to the [[Coding Standard]]. In particular, you must not check in files with DOS line endings except in very limited circumstances; see [[How to avoid DOS line endings in Windows tools]]. | ||
*Notepad++ ([http://notepadplusplus.org/ download Notepad++]) (Optional) | #*Notepad++ ([http://notepadplusplus.org/ download Notepad++]) (Optional) | ||
Note: If the installer for a particular package does not update your PATH environment setting you will have to do this manually. | Note: If the installer for a particular package does not update your PATH environment setting you will have to do this manually. | ||
Line 31: | Line 31: | ||
The customization of this file follows into all solutions. The example from the content of Microsoft.Cpp.Win32.user.props below has extra line feeds inserted for display purposes. '''Do not copy/paste and expect it to work'''. | The customization of this file follows into all solutions. The example from the content of Microsoft.Cpp.Win32.user.props below has extra line feeds inserted for display purposes. '''Do not copy/paste and expect it to work'''. | ||
<Project> | |||
<PropertyGroup> | |||
<ExecutablePath>$(ExecutablePath); | |||
C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29; | |||
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin; | |||
C:\Python26; | |||
C:\Program Files %28x86%29\NSIS\Unicode; | |||
C:\cygwin\bin | |||
</ExecutablePath> | |||
<IncludePath>C:\Program Files\Microsoft SDKs\Windows\v7.1\Include; | |||
C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\gl; | |||
C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include; | |||
$(IncludePath) | |||
</IncludePath> | |||
<LibraryPath>C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib; | |||
C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29; | |||
$(LibraryPath) | |||
</LibraryPath> | |||
</PropertyGroup> | |||
</Project> | </Project> | ||
}} | }} | ||
Line 59: | Line 59: | ||
If comfortable with editing xml files then, after making an oh gosh backup, direct editing of | If comfortable with editing xml files then, after making an oh gosh backup, direct editing of | ||
''Microsoft.Cpp.Win32.user.prop'' may be the way to go. If not, the following is a true windows approach: Invoke VS2010, once | ''Microsoft.Cpp.Win32.user.prop'' may be the way to go. If not, the following is a true windows approach: Invoke VS2010, once up go to Tools->Settings and check mark Expert Settings then, open an existing project or make a New Project. At this point it doesn't need to be a Second Life solution just any project because the file ''Microsoft.Cpp.Win32.user.prop'' is what needs edited. | ||
Now to drill down to the file. VS2010 should now display at the left the Solution Explorer window with a solution and projects displayed as in the below example: | Now to drill down to the file. VS2010 should now display at the left the Solution Explorer window with a solution and projects displayed as in the below example: |
Latest revision as of 13:21, 30 May 2011
Establish your programming environment
This is needed for compiling any viewer based on the LL open source code, but only needs to be done once.
- Obtain Visual Studio 2010 (Express is OK)
- Install Microsoft Platform & DirectX SDKs
- Run Microsoft update and keep running it until no updates are needed. This may take 6~8 iterations on older versions of windows.
- Install other development tools
- UniCode NSIS(download Unicode NSIS)
- This is the package installer used to build Setup.exe. Note: As of this writing the file is downloaded with an *.exec extension that needs renamed *.exe.
- CMake (download CMake)
- should be version 2.8.1 Kitware corrected a bug related to VS2010 at 2.8.1 and it came back in the current versions but, is due to be fixed in version 2.8.4. (and ensure any other versions aren't in your PATH environment variables)
- Cygwin (download Cygwin)
- When you run the cygwin setup utility make sure you have selected to install unzip (under Archive), patchutils, flex, bison (all located under "devel"), and curl (under Web) which are not part of the default install. Do not install Cygwin Python.
- Python (download either Python.org Standard Python or ActivePython) Note: build scripts support Python 2.6, not 2.7 yet.
- TortoiseHg (download TortoiseHg) or (Mercurial Hg)
- You need to use an editor that conforms to the Coding Standard. In particular, you must not check in files with DOS line endings except in very limited circumstances; see How to avoid DOS line endings in Windows tools.
- Notepad++ (download Notepad++) (Optional)
- UniCode NSIS(download Unicode NSIS)
Note: If the installer for a particular package does not update your PATH environment setting you will have to do this manually.
Working with Visual Studio 10 (VS2010)
There are internal setup difference between VS2010 and earlier versions. This write up will not address specific differences. However, differences may be expanded / clarified in the discussion page. The intent this wiki is to guide a new or a new to windows developer to a successful viewer build.
Visual Studio 10 build customization directories for Executable, Include and Library files are set in the Property Sheet xml file:\Users\MyUserName\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props This property sheet is included in each project within a given solutions.sln file.
{{
The customization of this file follows into all solutions. The example from the content of Microsoft.Cpp.Win32.user.props below has extra line feeds inserted for display purposes. Do not copy/paste and expect it to work.
<Project> <PropertyGroup> <ExecutablePath>$(ExecutablePath); C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29; C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin; C:\Python26; C:\Program Files %28x86%29\NSIS\Unicode; C:\cygwin\bin </ExecutablePath> <IncludePath>C:\Program Files\Microsoft SDKs\Windows\v7.1\Include; C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\gl; C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include; $(IncludePath) </IncludePath> <LibraryPath>C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib; C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29; $(LibraryPath) </LibraryPath> </PropertyGroup> </Project>
}}
If you are using Visual Studio 10 for more than Second Life viewer builds then you should investigate other directory setting methods. The following links have background for this and additional directory setting methods: Introduction to Solutions, Projects, and Items How to: Create Directories for Solutions VC++ Directories
If comfortable with editing xml files then, after making an oh gosh backup, direct editing of Microsoft.Cpp.Win32.user.prop may be the way to go. If not, the following is a true windows approach: Invoke VS2010, once up go to Tools->Settings and check mark Expert Settings then, open an existing project or make a New Project. At this point it doesn't need to be a Second Life solution just any project because the file Microsoft.Cpp.Win32.user.prop is what needs edited.
Now to drill down to the file. VS2010 should now display at the left the Solution Explorer window with a solution and projects displayed as in the below example:
Cursor to and select the Property Manager Tab. It's full name is partly hidden but, it is the one to the right.
Now cursor up and expand a project, config and highlight Microsoft.Cpp.Win32.user.
Right click and select Properties then, cursor to VC++ Directories.
This is where the build environment is pulled together into a functional VC2010 build system and also where much hand ringing, hair pulling, and fist pounding frustration takes place.
Unfortunately, there isn't a good way to present this so below will be images of the Libraries, Include and Executable Directories entries. There is an image for Libraries, Include and Executable Directories.