User(s) browsing this thread: 1 Guest(s)

Post Reply 
 
Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows - Compile Guide and Support
Author Message
Air Offline
PCSX2 Programmer
******

Posts: 1.452
Joined: Nov 2008
Location: Meshoppen, PA
Reputation: 16
Post: #1
Windows - Compile Guide and Support
Read the extremely detailed Wiki made by n1ckn4m3 and hosted at our Googlecode SVN repository:

http://code.google.com/p/pcsx2/wiki/Comp...ForWindows

Amendments to the guide should be posted on the Guide's comments section directly (mistakes, additions). Questions or technical support should be posted here.

Note that the PCSX2 Team supports only Microsoft Visual Studio as a compilation tool under Windows (either Express or commercial editions). We accept patches/fixes for Intel compilers, and generally pay no attention to mingw since it's nearly defunct status since Microsoft released Visual Studio Express (it still uses GCC 3.4.5 for example).
10-27-2009 05:01 PM
Find all posts by this user Quote this message in a reply

Sponsored links

pcsx2fan Offline
Benchmark Designer
****

Posts: 717
Joined: Jun 2009
Location: Republic_of_China_(Taiwan)
Reputation: 4
Post: #2
Rainbow PCSX2 Compilation Handbook for Visual Studio 2010 Professional RC
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: 366)


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)
PSU : 300 W
OS : Windows 7 Home Basic x86
(This post was last modified: 12-10-2010 05:00 AM by pcsx2fan.)
10-29-2009 01:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Xelinis Offline
Junior Member
*

Posts: 28
Joined: Jan 2009
Location:
Reputation: 0
Post: #3
RE: Windows - Compile Guide and Support
Does VS2010 contain any substantial compiler improvements over the previous version that affect PCSX2?
11-09-2009 06:57 AM
Find all posts by this user Quote this message in a reply
Air Offline
PCSX2 Programmer
******

Posts: 1.452
Joined: Nov 2008
Location: Meshoppen, PA
Reputation: 16
Post: #4
RE: Windows - Compile Guide and Support
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
11-09-2009 05:46 PM
Find all posts by this user Quote this message in a reply
n1ckn4m3 Offline
pcsx2 wiki helper

Posts: 21
Joined: Jan 2009
Location:
Reputation: 0
Post: #5
RE: A small guide to Visual Studio 2010 Professional Beta 2
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!
11-13-2009 04:10 PM
Find all posts by this user Quote this message in a reply
edu_dudu Offline
Member
**

Posts: 61
Joined: May 2009
Location:
Reputation: 0
Post: #6
RE: Windows - Compile Guide and Support
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]
11-16-2009 08:09 PM
Find all posts by this user Quote this message in a reply
edu_dudu Offline
Member
**

Posts: 61
Joined: May 2009
Location:
Reputation: 0
Post: #7
RE: Windows - Compile Guide and Support
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]
(This post was last modified: 11-17-2009 07:32 PM by edu_dudu.)
11-17-2009 07:32 PM
Find all posts by this user Quote this message in a reply
ionsmurf Offline
Newbie

Posts: 20
Joined: Jan 2009
Location:
Reputation: 0
Post: #8
RE: Windows - Compile Guide and Support
(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 File(s)
.diff  pcsx2-vs2010b2-conv-changes.diff (Size: 63,75 KB / Downloads: 310)
11-18-2009 05:38 PM
Find all posts by this user Quote this message in a reply
Air Offline
PCSX2 Programmer
******

Posts: 1.452
Joined: Nov 2008
Location: Meshoppen, PA
Reputation: 16
Post: #9
RE: Windows - Compile Guide and Support
(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. Tongue

Jake Stine (Air) - Programmer - PCSX2 Dev Team
(This post was last modified: 11-18-2009 05:49 PM by Air.)
11-18-2009 05:48 PM
Find all posts by this user Quote this message in a reply
edu_dudu Offline
Member
**

Posts: 61
Joined: May 2009
Location:
Reputation: 0
Post: #10
RE: Windows - Compile Guide and Support
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]
(This post was last modified: 11-20-2009 05:35 AM by edu_dudu.)
11-20-2009 05:33 AM
Find all posts by this user Quote this message in a reply
Post Reply 





Current time: 11-26-2014, 11:52 AM