Windows - Compile Guide and Support
#1
Please read the wiki page for the windows compilation guide below:
PCSX2 Documentation/Compiling on Windows

Source code:
GitHub Repository
Reply

Sponsored links

#2
Rainbow 
Outdated guide for Visual Studio 2010

This post is outdated! AFAIK VS 2010 is not officially supported yet, you cannot compile PCSX2 successfully with it, thant's why I hadn't update this post to match VS2010 RTM. Using VS2008 SP1 instead for this moment, you'll have a successful build.



Download Visual Studio 2010 Professional RC from M$ for free.

The only thing you need to install is Visual C++ with its x64 support.

The x64 support here is ONLY a dependency for a few projects including GSdx to be successfully converted from pcsx2_suite_2008.sln, because these projects have x64 thingy within them, or conversion failed to these projects without x64 support. On the other hand, it's a trick and doesn't indicate that you can build a 64-bit pcsx2.
[Image: VS2010_RC_component_for_PCSX2.png]


Onto latest trunk wxGUI (r2591 for now)
Open pcsx2_suite_2008.sln with VS2010RC, Simply click Finish button when the Conversion Wizard prompt you.
[Image: Conversion_Wizard_from_VS2008_to_VS2010_...Finish.png]


You agree with it when you have been asked for overwriting something.
[Image: Conversion_Wizard_from_VS2008_to_VS2010_overwrite.png]


A few seconds passed by until Conversion Complete.
[Image: Conversion_Wizard_from_VS2008_to_VS2010_complete.png]


From my experiment to all plugins and pcsx2.exe, only 7 plugins can be compiled and worked like a charm:
CDVDiso, CDVDolio, GSdx, LilyPad, SPU2-X (need workaround, see below), xpad, ZeroGS

Others toss errors, the most common one is error MSB3073. I'm not a programmer so that I dunno how to deal with.
[Image: pcsx2_suite_2008_project_list_in_VC10RC.png]


Workaround to SPU2-X
Go to folder X:\PCSX2_SVN_NEW_GUI\3rdparty\wxWidgets\src, duplicate directory msw and rename the counterpart to univ. Or you'll encounter missing files.



The Nostalgia of Legacy/Old GUI (r2186)
You need the folder VCProjectDefaults from VS2010 beta1, before you uninstall VS2010 beta 1, backup this folder at
Code:
C:\Program Files\Microsoft Visual Studio 10.0\VC\VCProjectDefaults

After installing VS2010 RC, restore backupped VCProjectDefaults and overwrite the existing one.
Otherwise, the project of pcsx2 couldn't load due to the lack of masm files in folder VCProjectDefaults.

The folder VCProjectDefaults from VS2010 beta1, for guys have never been installed VS2010 beta1

.7z   VCProjectDefaults.7z (Size: 6,73 KB / Downloads: 901)


After opening pcsx2_suite_2010.sln, select a release of SSE first. Right click the pcsx2 project at the bottom of Solution Explorer, then select Properties at bottom in contextual menu.
[Image: context_menu_of_pcsx2_legacy_gui_in_VS2010RC.png]


In the left tree you click Configuration Properties then VC++ Directories, add this line in front of other lines in Include Directories at right pane. Otherwise the build will fail by losing svnrev.h
Code:
X:\PCSX2_SVN_Legacy_GUI\pcsx2\windows\VCprojects;

[Image: Include_Directories_for_pcsx2_legacy_gui...2010RC.png]



Wanna distribute the PCSX2 you compiled?
copy msvcp100.dll and msvcr100.dll to the folder where pcsx2.exe lives in. The two dll files are situated in
Code:
C:\Program Files\Microsoft Visual Studio 10.0\VC\redist\x86\Microsoft.VC100.CRT
durable PC since 2008
CPU : E7200 @ 2.53 GHz 1.04 V / OC 3.7 GHz 1.36 V (390*9.5, 4GB DDR2 780)
GPU : 8600GT (GDDR3, 256 MB) / OC (750 / 900)
BOARD : GA-EP31-DS3L (rev 1.0) broken and bought a second hand one replaced
PSU : 300 W
OS : Windows 7 Home Basic x86
Reply
#3
Does VS2010 contain any substantial compiler improvements over the previous version that affect PCSX2?
Reply
#4
Nothing substantial, no. But it does offer improvements, in particular for C++ optimizations. VS2008 has a limitation in it's ability to propagate constants across C++ object constructors. VS2010 handles them much better. VS2010 also has a more aggressive inliner, which is a big win for modern CPUs with very large L2/L3 caches.

However, in PCSX2 itself we tend to avoid C++ object constructors for knowing they don't optimize well, and we use __forceinline liberally for knowing it doesn't inline as much as it should. So the actual benefits of using VS2010 are minimal.

GSdx on the other hand is very very C++, through and through. It seems to benefit decently from VS2010.
Jake Stine (Air) - Programmer - PCSX2 Dev Team
Reply
#5
Thanks for the information! Once VS2010 leaves beta and enters RC stage and it can be assumed there won't be sweeping changes between it and release, I'll update the posted google code Compilation guide to include the VS2010 specifics. For the time being though, great work putting this info together! Hopefully a lot of the workarounds will not be necessary when VS2010 hits RC/RTM, but in either case, having them documented now is a great help.

Thanks again!
Reply
#6
I didn't backup VCProjectDefaults

Can any one send it to me?
My pc: Core 2 Duo E7200 2,53ghz (overclocked to 3,0ghz)
/ 4GB DDR2 667 / Geforce 8600gt 512mb

[Image: assinaturaforummi1.jpg]
Reply
#7
I got this error compiling GSDX:

1>Creating library D:\SVN\PCSX2\deps\Win32\Release SSE4\GSdx.lib and object D:\SVN\PCSX2\deps\Win32\Release SSE4\GSdx.exp
1>GSdx.exp : warning LNK4070: /OUT:GSdx.dll directive in .EXP differs from output filename 'D:\SVN\PCSX2\bin\plugins\GSdx-SSE4.dll'; ignoring directive
1>GSDevice11.obj : error LNK2001: unresolved external symbol _D3D11CreateDeviceAndSwapChain@48
1>D:\SVN\PCSX2\bin\plugins\GSdx-SSE4.dll : fatal error LNK1120: 1 unresolved externals
My pc: Core 2 Duo E7200 2,53ghz (overclocked to 3,0ghz)
/ 4GB DDR2 667 / Geforce 8600gt 512mb

[Image: assinaturaforummi1.jpg]
Reply
#8
(10-29-2009, 01:32 PM)pcsx2fan Wrote: Rename d3d11.lib to d3d11_beta.lib in included DXSDK library files

There is no need for renaming, just fix the project file or convert the 2008 prj again.

(10-29-2009, 01:32 PM)pcsx2fan Wrote: Before you uninstall VS2010 beta 1, backup the folder VCProjectDefaults at

There is no need to backup that folder. Make the follow changes to the project file

Code:
<Import Project="$(VCINSTALLDIR)\VCProjectDefaults\masm.targets" />
change to
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />

The simplest way to built with vs2010 beta2, is to convert the 2008 solution file again (and all projects with it).

For the new wx gui (r2215) the conversion results in a couple build errors. For those who are interested compiling the new wx gui with vs2010b2 I attached the changes needed to resolve those built errors. Apart from that the new wx gui (and all other projects) build fine without errors Tongue.


Attached Files
.diff   pcsx2-vs2010b2-conv-changes.diff (Size: 63,75 KB / Downloads: 888)
Reply
#9
(11-18-2009, 05:38 PM)ionsmurf Wrote: The simplest way to built with vs2010 beta2, is to convert the 2008 solution file again (and all projects with it).

That's a good sign! In Beta 1, converting the PCSX2 project/solution files resulted in a CRASH. Wink The current VS2010 solution was mostly rolled by hand. The idea of the conversion program working better now is encouraging. Anytime there's less work involved, I'm happy. Tongue2
Jake Stine (Air) - Programmer - PCSX2 Dev Team
Reply
#10
I got a lot of errors building pcsx2, but I could fix almost of them. But these errors were impossible:

AppRes.cpp:
couldn't include:

"Resources/BackgroundLogo.h"

"Resources/ConfigIcon_Cpu.h"
"Resources/ConfigIcon_Video.h"
"Resources/ConfigIcon_Speedhacks.h"
"Resources/ConfigIcon_Gamefixes.h"
"Resources/ConfigIcon_Paths.h"
"Resources/ConfigIcon_Plugins.h"

"Resources/AppIcon16.h"
"Resources/AppIcon32.h"
"Resources/AppIcon64.h"

And I got error including "PSXPad.h"
My pc: Core 2 Duo E7200 2,53ghz (overclocked to 3,0ghz)
/ 4GB DDR2 667 / Geforce 8600gt 512mb

[Image: assinaturaforummi1.jpg]
Reply




Users browsing this thread: 1 Guest(s)