PCSX2 Documentation/Compiling on Windows: Difference between revisions

Line 143: Line 143:


#Under the Win32 Platform, you need to add the following to Include files:
#Under the Win32 Platform, you need to add the following to Include files:
  <nowiki>$(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\atl
<nowiki>$(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\atl
  $(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\mfc</nowiki>
$(ProgramFiles)\Microsoft Platform SDK for Windows Server 2003 R2\include\mfc</nowiki>
Next up is to get around a limitation regarding the compiling 32-bit ATL / MFC solutions in the Express editions of VS.
Next up is to get around a limitation regarding the compiling 32-bit ATL / MFC solutions in the Express editions of VS.
Open the file C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include\atl\atlbase.h in a text editor and search for the following text:
Open the file C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\include\atl\atlbase.h in a text editor and search for the following text:
Line 154: Line 154:
Microsoft Visual Studio (Beta 1) Professional
Microsoft Visual Studio (Beta 1) Professional
Coming soon...
Coming soon...
3. Getting the Source Code
==3. Getting the Source Code==
In order to compile PCSX2, you will need to first download all of the current source code to your local machine. Depending on which branch you are downloading, the repository locations may change.
In order to compile PCSX2, you will need to first download all of the current source code to your local machine. Depending on which branch you are downloading, the repository locations may change.


Line 190: Line 190:
If you are interested in what changes have been made since your last source download, click the "Show Log" button.
If you are interested in what changes have been made since your last source download, click the "Show Log" button.
  1 2
  1 2
4. Compiling PCSX2's Binary
==4. Compiling PCSX2's Binary==
You've now completed all of the "leg work" required in order to compile PCSX2 on your machine. Congratulations!
You've now completed all of the "leg work" required in order to compile PCSX2 on your machine. Congratulations!


Line 210: Line 210:
Build the branch release just like you would the main Trunk release.
Build the branch release just like you would the main Trunk release.
  1
  1
5. Effective Build Troubleshooting Steps
==5. Effective Build Troubleshooting Steps==
So, your build failed. What now? Even in the most perfect of circumstances, there is always the possibility that your build is going to fail for some reason or another. I've included a few things to try that should take care of almost all of the common compiling issues that users have.
So, your build failed. What now? Even in the most perfect of circumstances, there is always the possibility that your build is going to fail for some reason or another. I've included a few things to try that should take care of almost all of the common compiling issues that users have.
If at first you don't succeed...
If at first you don't succeed...
Line 222: Line 222:
Read the Logs - Trace the Errors
Read the Logs - Trace the Errors
When all else fails, the error log and output screens can be a wealth of information. Even if you're not a developer, you can look at the error log and extrapolate what files are involved in the error you're having. Once you know that, search for the files and see if any of them are in the directories that are supposed to be configured in the search paths -- if so, go verify in your VC++ Directories setting that you have properly entered the dependency directories. Mistyping the directory names, including the wrong directory, or overlooking a directory is one of the most common causes of build failure and can be easily and quickly fixed. If that doesn't work, post about your experiences on the PCSX2 forum under the revelant topic and someone should be able to help you out.
When all else fails, the error log and output screens can be a wealth of information. Even if you're not a developer, you can look at the error log and extrapolate what files are involved in the error you're having. Once you know that, search for the files and see if any of them are in the directories that are supposed to be configured in the search paths -- if so, go verify in your VC++ Directories setting that you have properly entered the dependency directories. Mistyping the directory names, including the wrong directory, or overlooking a directory is one of the most common causes of build failure and can be easily and quickly fixed. If that doesn't work, post about your experiences on the PCSX2 forum under the revelant topic and someone should be able to help you out.
6. Files Necessary from Build for PCSX2's Execution
==6. Files Necessary from Build for PCSX2's Execution==
PCSX2 only requires a few files in order to execute. Other files are required in order for it to function as an emulator, such as the plug-in files, but in this section I am referring only to which files are required in order for PCSX2 to execute successfully without errors.
PCSX2 only requires a few files in order to execute. Other files are required in order for it to function as an emulator, such as the plug-in files, but in this section I am referring only to which files are required in order for PCSX2 to execute successfully without errors.


Line 237: Line 237:
If you will be using a debug build of gsDX, the following additional file is necessary and must be put into your pcsx2\bin directory:
If you will be using a debug build of gsDX, the following additional file is necessary and must be put into your pcsx2\bin directory:
  glew32.dll
  glew32.dll
7. Miscellaneous PCSX2 Compiling Options
==7. Miscellaneous PCSX2 Compiling Options==
As with any project, the PCSX2 project has several configurable options in relation to compiling.
As with any project, the PCSX2 project has several configurable options in relation to compiling.


Line 255: Line 255:
When you compile, this solution will be skipped. Best of all, this option is persistent, but does not write to the Solution (.sln) file, so making this change will not cause you to get warned of a Version Conflict every time you update your SVN in the future.
When you compile, this solution will be skipped. Best of all, this option is persistent, but does not write to the Solution (.sln) file, so making this change will not cause you to get warned of a Version Conflict every time you update your SVN in the future.
  1 2
  1 2
8. Running PCSX2 from the Visual Studio Debugger
==8. Running PCSX2 from the Visual Studio Debugger==
It is possible (and quite easy) to run PCSX2 from the Visual Studio Debugger, if you feel so compelled to do so. See below for instructions on how to do it for each supported version of Visual Studio.
It is possible (and quite easy) to run PCSX2 from the Visual Studio Debugger, if you feel so compelled to do so. See below for instructions on how to do it for each supported version of Visual Studio.


Line 270: Line 270:
Setting PCSX2 to Run from the VS2010 Debugger
Setting PCSX2 to Run from the VS2010 Debugger
Specifying Plugins on the PCSX2 Command Line for the VS2010 Debugger
Specifying Plugins on the PCSX2 Command Line for the VS2010 Debugger
9. Packaging PCSX2 with Nullsoft Scriptable Install System
==9. Packaging PCSX2 with Nullsoft Scriptable Install System==
Just Because It Compiles Doesn't Mean It Works!
Just Because It Compiles Doesn't Mean It Works!
The steps included in this guide will pretty much guarantee that you can set up an environment in which you can compile the .NSI file included in the PCSX2 source to a .exe installer, but PLEASE NOTE THE FOLLOWING: Just because you can get it to compile without erroring does not mean that the output file will be a functional installer! Just like any other piece of code, the .NSI installer needs maintenance whenever there are changes to the file and directory structure of PCSX2. The installer is not the highest priority on the list, so it is possible that the .NSI is out of date and may be including out-dated files, or may not be including new files. It may complete compilation but net an installation that crashes every time it's run due to missing or unlinked .DLLs. With that said, it is NOT recommended that you use these installers without testing them in a sandbox / virtualized environment first to ensure that they properly install! A successful .NSI file compile does NOT equate to a truly successful installer build!
The steps included in this guide will pretty much guarantee that you can set up an environment in which you can compile the .NSI file included in the PCSX2 source to a .exe installer, but PLEASE NOTE THE FOLLOWING: Just because you can get it to compile without erroring does not mean that the output file will be a functional installer! Just like any other piece of code, the .NSI installer needs maintenance whenever there are changes to the file and directory structure of PCSX2. The installer is not the highest priority on the list, so it is possible that the .NSI is out of date and may be including out-dated files, or may not be including new files. It may complete compilation but net an installation that crashes every time it's run due to missing or unlinked .DLLs. With that said, it is NOT recommended that you use these installers without testing them in a sandbox / virtualized environment first to ensure that they properly install! A successful .NSI file compile does NOT equate to a truly successful installer build!
ninja
782

edits