..:: PCSX2 Forums ::..
Register | Help | Log In |
Register PCSX2 Site Forums Member List Donate View Today's Posts Search

Current time: 02-09-2010, 04:08 PM Hello There, Guest! (Login — Register)

..:: PCSX2 Forums ::.. / PCSX2 Discussion and Support / Developer Discussion / Compile Guide

2 users browsing this thread: (0 members, and 2 guests).

Pages (56): 1 2 3 4 5 ... 56 Next »
Post Reply 
 
Thread Rating:
  • 16 Votes - 3.63 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Compile Guide
Author Message
chrrox Offline
Newbie

Posts: 2
Joined: Dec 2008
Location:
Post: #1
Compile Guide
Windows Based Guide

Read the extremely detailed Wiki made by n1ckn4m3:

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

Linux Based Guide

(12-14-2008 01:24 PM)Zeydlitz Wrote:  O'k. I do сompilation on newly installed debian/Lenny, so I could made small guide.

1) Packages, need to be installed:
subversion
libbz-dev
libglew1.5-dev
libxxf86vm-dev
nvidia-cg-toolkit
libasound2-dev
joystick
libsdl1.2-dev
libgtk2.0-dev
autoconf
automake

All other packages was already here, so probably you got them all to.

2) Obtain pcsx2
svn checkout http://pcsx2.googlecode.com/svn/trunk/ pcsx2-read-only

3) And run sh build.sh all.

If you want to rebuild all, there is several issues:
1) some slight changes, you could use build.sh install
2) To rebuild only playground bilary, run build.sh in pcsx2 directory
3) If somebody change files in pcsx2/Linux directory, than you should made dist-clean before compilation.
(12-14-2008 01:56 PM)arcum42 Wrote:  As an addition to the Linux compilation guide posted, in the build.sh file, you will see a line that reads something along the line of:
export PCSX2OPTIONS="--enable-sse3 --prefix `pwd`"

This is where the options get passed when compiling. If you want to tweak your build a bit, this is where to do it. Here are the main options.

--enable-sse3 - tells pcsx2 that you have sse3, and to use code that takes advantage of it.
--enable-sse4 - same for sse4. Not very well tested.
--enable-debug - builds just that, a debugging build with no optimization, and all the symbols in the code to make it easy to debug. You would mainly use this if you wanted, for example, to know exactly where a game was crashing.
--enable-devbuild - Similar to the last option, this turns on various logging for pcsx2, to give you a lot more info about what pcsx2 is doing.
--disable-recbuild - Turns off the recompiler, which is where a lot of pcsx2's speed comes from. You almost never want to do this.
--disable-nls - Gets rid of locale support. Doubt you'll ever need to touch this.

Options that are currently in SVN, but not in the official build.
--enable-local-inis - I may have mentioned this one before, though I forgot that it was only in svn. This is actually from a patch from the Gentoo people, to change where the ini files were located, for people that don't want all the pcsx2 files in one folder. If you define LOCAL_PLUGIN_INIS in Linux/Linux.h in the official release, you'd get the same effect.

--enable-customcflags - Also for the Gentoo folk. It just simply makes sure that it uses any system-wide CFLAGS you have set up, in addition to the ones it needs. I may just put this permanently on at some point.

Other notable flags:
--prefix `pwd` - This tells it that the bin folder to install in is in the current directory. Otherwise, it goes straight to /usr/bin, IIRC.
--enable-vmbuild - This actually was broken badly, and I found no evidence that it had ever worked on Linux. So it's been removed for the moment.

Oh, and while current svn still doesn't have the plugins, there is now a bin folder in there you can use.
Note: The 64 bit build was dropped, so currently, the most practical way to compile and run pcsx2 on a 64 bit Linux system is in a 32 bit chroot. The way you do this varies depending on distribution, but if you search, you should be able to find documentation on the subject.
--Arcum42


---------------------

Note from PCSX2 Team:

This question gets asked a lot, so we're stickying this thread so we can have 1-thread with all compiling questions and help.

Please note that the PCSX2 team isn't going to be supporting this; so users will have to help each other out. Tongue
(This post was last modified: 09-07-2009 12:37 PM by Bositman. Edit Reason: Added new compile wiki by n1ckn4m3)
12-13-2008 03:35 AM
Find all posts by this user Quote this message in a reply
Bositman Offline
Angel of Death
********

Posts: 4.921
Joined: Aug 2005
Location: Athens,Greece
Post: #2
RE: Compile Guide
Err seriously if you don't know how to compile a project you shouldn't be messing with it at all...
You just open the visual studio project file,press compile and the exe is created in the /bin folder

[Image: newsig2.jpg]
12-13-2008 03:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Nneeve Offline
Currently editing this post.
*****

Posts: 201
Joined: Dec 2008
Location:
Post: #3
RE: Compile Guide
Just open the .sln fine. If you get an error about afxres.h, change it to afxresmw.h
change the build to release (or whatever you want) in build -> configuration manager
I was able to compile it fine like that.
Are there any particular problems you're having?
12-13-2008 03:43 AM
Find all posts by this user Quote this message in a reply
Master Offline
student

Posts: 24
Joined: Dec 2008
Location: Somwhere nearby...
Post: #4
RE: Compile Guide
yeah, but would you guys provide us with the needed components (such as DX sdk ,tortoise and etc that is needed and considered essential to have the project compiled) to have an error-free compilation?
(This post was last modified: 12-13-2008 05:15 AM by Master. Edit Reason: )
12-13-2008 05:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Blackclaw Offline
Masterblubb
**

Posts: 68
Joined: Dec 2008
Location: 127.0.0.1
Post: #5
RE: Compile Guide
Windows Based Guide (I'm no Linux user... bug arcum about that ^^)

What you need:

Software:
Windows ^^
Tortoise SVN - http://tortoisesvn.tigris.org/
Visual Studio 2008 - http://msdn.microsoft.com/de-de/vstudio/...00831.aspx

Human Ressources:
-a brain
-basic PC knowlage
-ability to read, write and comprehend english

Step by step:

Step 1: Install the software (if you fail at that you might as well stop right here and check 4shared :/ )

Step 2: Create a Folder for the PPsvn (for the guide we use d:\pcsx2\

Step 3: Rightclick the new folder and choose "SVN Checkout" from the context menu (this option appears if you installed tortoise correctly)

Step 4: As URL paste
Code:
http://pcsx2-playground.googlecode.com/svn/trunk/
. Now click ok and let the tool do its work.

Step 5: There should be various subfolders now. Goto: D:\pcsx2\. There open the pcsx2_2008.sln (It should be linked to Visual Studio 2008 if you installed that correctly).

Step 6: Choose Release from the dropdown menu and after that let Visual Studio Build (Build Solution). An executable should now appear in D:\pcsx2\bin\.

Congrats you just compiled ur own version of the Emulator.




Disclaimer:

I take no responsibility for and damage to ur PC, operating system, human body, social live or mental stability.
All mistakes in this text belong to me and are protected by international law.

Thank you and good night.
(This post was last modified: 12-28-2008 11:59 PM by Blackclaw. Edit Reason: )
12-13-2008 11:44 AM
Find all posts by this user Quote this message in a reply
arcum42 Offline
PCSX2 coder
******

Posts: 338
Joined: Dec 2008
Location: Las Vegas, NV
Post: #6
RE: Compile Guide
You know, I'd like some time to actually improve the Linux code here... Sad
12-13-2008 11:47 AM
Find all posts by this user Quote this message in a reply
CidVicious Offline
Junior Member
*

Posts: 32
Joined: Dec 2008
Location:
Post: #7
RE: Compile Guide
Hello everyone. I'd like to add that pcsx2 (both the official and the playground project) is perfectly compilable with the free Visual Studio Express. No need to buy the retail version.

Rig: E5200@3.33Ghz/2gb DDR2-5300/MSI HD4670 512M/Intel P5K Pro/XP Pro SP3 & Win7 RC1
12-13-2008 02:19 PM
Find all posts by this user Quote this message in a reply
sayuke Offline
Newbie

Posts: 6
Joined: Dec 2008
Location:
Post: #8
RE: Compile Guide
for gcc, id like to point out that i got a noticeable speed increase with these flags.

CFLAGS = -O3 -fomit-frame-pointer -march=core2 -mfpmath=sse -ftree-vectorize -funroll-loops -ffast-math

same for CXXFLAGS.
don't forget to change your arch to what you actually use. man gcc for a list of them.
the default is just -O3 -fomit-frame-pointer (-fomit-frame-pointer is enabled by -O3 by default, actually by any -O)

http://www.luxrender.net/forum/viewtopic.php?f=21&t=603
has i nice little benchmark.

also, it would be interesting to throw the intel compiler at it, although this would probably take a fair bit of work, and besides licenses are like 1.4k.
12-13-2008 04:56 PM
Find all posts by this user Quote this message in a reply
arcum42 Offline
PCSX2 coder
******

Posts: 338
Joined: Dec 2008
Location: Las Vegas, NV
Post: #9
RE: Compile Guide
I'd also like to point out that -ffast-math = incorrect math, and ask that if you have any incompatibility problems, you also try it on a binary without that flag. Treat it as a speed hack.

Also, --march=core2 is processor-specific; for anyone using gcc 4.3, I reccommend --march=native...
12-13-2008 10:02 PM
Find all posts by this user Quote this message in a reply
cottonvibes Offline
Pencil Sharpener
******

Posts: 435
Joined: Nov 2008
Location:
Post: #10
RE: Compile Guide
i edited the first post.
everyone please read.
12-14-2008 01:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Pages (56): 1 2 3 4 5 ... 56 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


Current time: 02-09-2010, 04:08 PM

Contact Us | PCSX2 | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication

Powered By MyBB, © 2002-2010 MyBB Group.
Theme created by IncadudeF and modified by bositman