PCSX2 for Fedora
#21
Okay, first off I have an rpm of PCSX2 that works - so I think I should post to this thread without any more ado.

Gregory, is it possible to put this as a sticky at the beginning of the thread:


"At long last here's an rpm for Fedora 15 32-bit. It seems to run okay on my machine, but please post back with any problems as it's currently a beta. Hopefully rpms for other Fedora versions will be ready soon.

Here's what you need to do to install:
1. You'll need the RPM Fusion repositories installed. If you're unsure how to do this check out this guide:
Code:
http://www.mjmwired.net/resources/mjm-fedora-f15.html#yum
2. Download and unpack the rpm package attached below: pcsx2-4841-1.fc15.i686.rpm.tar.gz
3. As root, from the terminal type:
Code:
yum localinstall --nogpgcheck pcsx2-4841-1.fc15.i686.rpm
4. There will be a menu item created under -applications-games-pcsx2 ;select this to start (or as a normal user type pcsx2 at the terminal)
5. You will need a valid PS2 bios in ~/PCSX2/bios to get started!

Enjoy and let me know what you think!"



Attached Files
.gz   pcsx2-4841-1.fc15.i686.rpm.tar.gz (Size: 2,64 MB / Downloads: 824)
Reply

Sponsored links

#22
I'm not sure what you want. The thread is already in important thread. And normally you can edit the first post.

Note: libglewmx is useless (libglew is enough), but it is possible that libglew-devel need both glew and glewmx in some fedora version.

Note2: it is easily possible to move everything from ~/PCSX2 to ~/.config/pcsx2 (Well xdg dir in fact). The patch is debian-unstable-upstream/patches/05_move_data_to_config.patch. Do as you want.
Reply
#23
So we've got a working (I think) package for Fedora 15. But it would be good to get this build for other Fedoras that I don't have. I thought mock would be the best thing for this, as in theory all I need to do to build for (say) Fedora 14 is use the source rpm and type:

mock -r fedora-14-i386-rpmfusion_nonfree rebuild /path/to/your/package-1.src.rpm

But this doesn't work! In fact I can't seem to get mock to work satisfactorily at all. So Seve, I would like your help to build this package in mock.
The initial problem seems to be that one of the packages requested by the spec file doesn't exist in Fedora 14, as mock gives the error:

Code:
Error: No Package found for libGLEWmx

This package definitely exists in Fedora 15:

Code:
$yum search libGLEWmx                                            
Loaded plugins: downloadonly, fastestmirror, langpacks, presto, refresh-packagekit        
Loading mirror speeds from cached hostfile                                                
* fedora: mirror.netrino.co.uk                                                            
* rpmfusion-free: mirrors.coreix.net
* rpmfusion-free-updates: mirrors.coreix.net
* rpmfusion-nonfree: mirrors.coreix.net
* rpmfusion-nonfree-updates: mirrors.coreix.net
* updates: mirror.netrino.co.uk
updates/pkgtags                                                     |  40 kB     00:00    
================================= N/S Matched: libGLEWmx ==================================
libGLEWmx.i686 : libGLEWmx

So my initial question is how we can find what this package is in Fedora 14?

In the longer term it would be great to build a multi-arch (i686 and x86_64) package for Fedora - however I have come to suspect that packages in the spec file can't be specified according to architecture? is this right?

Lets see how we get on with these problems. Once we can build in mock we can work on tidying up the rpm so it doesn't install so many unneeded packages and so on.
I have attached a file containing the spec file and the src.rpm so we're all reading from the same book (as it were).

BTW Gregory, the news about the LD_PRELOAD solution to the sdl problem is very exciting if it can be made to work!
(08-11-2011, 06:56 PM)gregory Wrote: I'm not sure what you want. The thread is already in important thread. And normally you can edit the first post.

Note: libglewmx is useless (libglew is enough), but it is possible that libglew-devel need both glew and glewmx in some fedora version.

Note2: it is easily possible to move everything from ~/PCSX2 to ~/.config/pcsx2 (Well xdg dir in fact). The patch is debian-unstable-upstream/patches/05_move_data_to_config.patch. Do as you want.

Sorry I posted again before I saw this. I didn't realise I could edit the first post Blush
I'll do this now.

I think fedora's rpmbuild command doesn't automatically pull in package dependencies, and that glew-devel depends on libglewmx. When I first tried to build the rpm it failed on this dependency which is why I included it.

2 - I will concentrate on the mock problem for now. I think PCSX2 in the home library is probably okay for most users...?
Reply
#24
Gregory:

Can you tell me where the installation path is set / configured for the FirstTimeIntroPanel, specifically the Readme / FAQ (offline PDF's).
It defaults to usr/bin/Docs

I would like to change the installation directory to a more appropriate directory for the purposes of meeting the packaging guidelines set in Fedora.
e.g /usr/share/games/

Then I can post a working spec file for you / Gumbo to test out.

Thanks
Reply
#25
Hum look at the function
Panels::FirstTimeIntroPanel::FirstTimeIntroPanel in Dialogs/FirstTimeWizard.cpp
The interesting part is around line 78 Smile

Your Fedora specific patch is welcome so I can tune it for ubuntu and put it in the .deb Smile
Reply
#26
Hi Seve,
Just in case it helps, here's the spec file as far as I've got it. I've removed some of the requires packages that I thought might not be needed (most of the -devel ones) and changed the licensing information so it no longer gets an error from rpmlint (well there is one error, but I don't think it's correctable atm). The place I'm still struggling is the %lang files which mock still fails to find at the moment. You may find this a more advanced base to use for your spec file.

Oh, I've used Drayven's icon file (thanks!) as the .xpm file didn't seem to be displayed in the menu - so I've included the current srpm as well.

Thanks for your help Smile


Attached Files
.gz   pcsx2-4841-1.fc15.src.rpm.tar.gz (Size: 3,55 MB / Downloads: 616)
Reply
#27
Gumbo,

Could you try to build sdl as a library:
1/
Code:
--- pcsx2.snapshot-4863.orig/3rdparty/SDL-1.3.0-5387/CMakeLists.txt
+++ pcsx2.snapshot-4863/3rdparty/SDL-1.3.0-5387/CMakeLists.txt
@@ -390,7 +388,8 @@

#include_directories( ${SDL_ROOT}/include /usr/include/kde/artsc /usr/include/directfb)

-add_library(${Output} STATIC ${SDL_sources} )
+#add_library(${Output} STATIC ${SDL_sources} )
+add_library(${Output} SHARED ${SDL_sources} )

# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
2/ Run pcsx2 with a preload. Adapt the path You can also directly use an export in a terminal.
Code:
LD_PRELOAD="/mnt/playstation/emulateur/package/pcsx2.snapshot-4863/obj-x86_64-linux-gnu/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so" pcsx2
It print some error on my side but I think it works.
Quote:ERROR: ld.so: object '/mnt/playstation/emulateur/package/pcsx2.snapshot-4863/obj-x86_64-linux-gnu/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so' from LD_PRELOAD cannot be preloaded: ignored.
Reply
#28
Hello:

Here is a draft spec file.
I was unable to get the application to open the FAQ/Readme pdf's file url unless I installed the renamed files (to version 0.9.9) to usr/bin/Docs
I need some help with this.

The resulting rpm file will install on either x86 or x86_64 Fedora, using yum localinstall
Any i686 requirements to run on x86_64 will be installed automatically.
It will only build on an x86 at this time.

--------------------------------------------------
%global pcsx2_version 0.9.8
%global pcsx2_subversion 4851

Name: pcsx2
Version: %{pcsx2_version}.%{pcsx2_subversion}
Release: 1%{?dist}
Summary: A Sony Playstation2 emulator
Group: Applications/Emulators
License: GPLv3
URL: http://pcsx2.net/
Source0: http://pcsx2.googlecode.com/svn/trunk/%{...n}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.png
BuildArch: i686
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#Build patches


BuildRequires: desktop-file-utils
BuildRequires: cmake
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: Cg
BuildRequires: libXrandr-devel
BuildRequires: freetype-devel
BuildRequires: glew-devel
BuildRequires: gettext
BuildRequires: mesa-libGL-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: alsa-lib-devel
BuildRequires: libCg
BuildRequires: SDL-devel
BuildRequires: gtk2-devel
BuildRequires: portaudio-devel
BuildRequires: sparsehash-devel
BuildRequires: wxGTK-devel
BuildRequires: soundtouch-devel
BuildRequires: subversion
BuildRequires: libX11-devel
BuildRequires: libICE-devel

Requires: joystick
Requires: evince

%description
PCSX2 is an open source Playstation 2 emulator. It's purpose
is to mimic the the PS2 hardware, using a combination MIPS CPU
Interpreters, Recompilers and a Virtual Machine which manages
hardware states and PS2 system memory. It requires a dump of a
real Playstation 2 BIOS, which is not included.

%prep
%setup -q %{pcsx2_subversion}

%build

# Move and cleanup the Docs and such for Fedora rpm installation
# Cosmetic changes to meet some packaging guidelines.
mv %{name}/Docs/License.txt LICENSE
sed -i 's/\r//' LICENSE
mv %{name}/Docs/GPL.txt GPL
sed -i 's/\r//' GPL
mv %{name}/Docs/readme-Docs.txt README
sed -i 's/\r//' README
# Temporarily rename pdf to match version
mv bin/docs/PCSX2_Readme_0.9.8.pdf bin/docs/PCSX2_Readme_0.9.9.pdf
mv bin/docs/PCSX2_FAQ_0.9.8.pdf bin/docs/PCSX2_FAQ_0.9.9.pdf
# Move some misc files for installation inclusion
mv %{name}/Docs/PCSX2_FAQ_0.9.8.doc PCSX2_FAQ
mv %{name}/Docs/PCSX2_Readme_0.9.8.doc PCSX2_README
mv bin/docs/GPL.html GPL.html
mv fps2bios/doc/overview.doc OVERVIEW


# To create a man page format for Fedora and remove executable bits
mv bin/docs/pcsx2.man pcsx2.1
gzip pcsx2.1


# To remove executable bits from doc files
chmod -x GPL OVERVIEW LICENSE README PCSX2_FAQ PCSX2_README pcsx2.1.gz

# Need to to move the installation of usr/bin/Docs as not permitted a subdir in Fedora
# This doesn't work as it is at the moment
# sed -i 's| L"file:///%s/Docs/PCSX2_FAQ_%u.%u.%u.pdf"| L"file:/usr/share/games/pcsx2/PCSX2_FAQ_%u.%u.%u.pdf"|' pcsx2/gui/Dialogs/FirstTimeWizard.cpp

export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"

###
cmake . \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DPACKAGE_MODE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DFORCE_INTERNAL_ALL=FALSE \
-DPLUGIN_DIR="/usr/lib/pcsx2" \
-DFORCE_INTERNAL_SDL=FALSE \
-DFORCE_INTERNAL_ZLIB=FALSE \
-DFORCE_INTERNAL_SOUNDTOUCH=FALSE \
-DFORCE_INTERNAL_SDL=TRUE \
-DGAMEINDEX_DIR="/usr/share/games/pcsx2"


make %{?_smp_mflags} VERBOSE=1


%install
rm -rf %{buildroot}



%makeinstall DESTDIR=%{buildroot}


# Messages are not picked up by find-lang or I can't get it to work.
# Not good at sed so this might be done more effectively. Thanks to Rahul for a model.

pushd %{buildroot}
find -type f -o -type l \
| sed '
s:%{buildroot}/usr::
s:^\.::
s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
s:^\([^%].*\)::
s:%lang© ::
/^$/d' \
> %{name}.lang

# Need to move it back to sources to be picked up by the macro [%files -f].

popd && mv %{buildroot}/%{name}.lang .


# Install icon
%{__mkdir_p} %{buildroot}/%{_datadir}/icons
install -pm 755 %{SOURCE2} %{buildroot}/%{_datadir}/icons

# Install Desktop file
%{__mkdir_p} %{buildroot}/%{_datadir}/applications

desktop-file-install --vendor pcsx2 \
--dir=%{buildroot}/%{_datadir}/applications \
%{SOURCE1}


# Install FAQ README pdf's.
# These are installed but should not be installed to a subdir of bin.
# Needs to be fixed upstream or a working patch.
%{__mkdir_p} %{buildroot}/%{_bindir}/Docs
install -pm 755 bin/docs/*.pdf %{buildroot}/%{_bindir}/Docs
install -pm 755 %{name}/Docs/PCSX2_timeline_0.9.8.xlsx %{buildroot}%{_datadir}/games/%{name}


# Install man page
%{__mkdir_p} %{buildroot}/%{_mandir}/man1
install -p -D -m 644 pcsx2.1.gz %{buildroot}/%{_mandir}/man1

%clean
rm -rf rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-,root,root, 0755)
%doc GPL OVERVIEW LICENSE README PCSX2_FAQ PCSX2_README
%{_bindir}/%{name}
%{_libdir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/%{name}.png
%{_datadir}/games/%{name}/GameIndex.dbf
%{_bindir}/Docs/*.pdf
%{_datadir}/games/%{name}/*.xlsx
%{_mandir}/man1/%{name}.*

%changelog

* Tue Aug 09 2011 Danger Boy <Danger[dot] Boy [at]necac.tv.idl> 0.9.8.4851-1
- initial build

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

Also attached the two SOURCE files (icon, desktop) I had to rename
the desktop file to upload.

Not sure I can upload my scr.rpm or not ... is there a size restriction / limit ?


Attached Files Thumbnail(s)
   

.txt   pcsx2-desktop.txt (Size: 197 bytes / Downloads: 497)
Reply
#29
Thanks for doing all this work Seve, a really professional job Smile

I'm not aware of an upload limit that would preclude you uploading an srpm.

How did you compile your source? the spec file doesn't seem immediately compatible with a source compiled using gregory's "create_pcsx2_tarball_from_svn_repository.sh" script which cuts out a lot of deprecated plugins, windows stuff and other licensing problems (available in the svn repository but I've attached a copy for your convenience). I've set to work modifying your spec file to take account of this - I'll post when I'm done.

...

okay all done: it builds fine and seems to run okay on a clean install.
I'll top post the new rpms for the time being, but look over what I've done with the spec - I don't think I've altered it much - but you may disagree.

Smile




Attached Files
.gz   pcsx2.spec.tar.gz (Size: 2,84 KB / Downloads: 574)
Reply
#30
(08-14-2011, 07:01 PM)gregory Wrote: Gumbo,

Could you try to build sdl as a library:
1/
Code:
--- pcsx2.snapshot-4863.orig/3rdparty/SDL-1.3.0-5387/CMakeLists.txt
+++ pcsx2.snapshot-4863/3rdparty/SDL-1.3.0-5387/CMakeLists.txt
@@ -390,7 +388,8 @@

#include_directories( ${SDL_ROOT}/include /usr/include/kde/artsc /usr/include/directfb)

-add_library(${Output} STATIC ${SDL_sources} )
+#add_library(${Output} STATIC ${SDL_sources} )
+add_library(${Output} SHARED ${SDL_sources} )

# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
2/ Run pcsx2 with a preload. Adapt the path You can also directly use an export in a terminal.
Code:
LD_PRELOAD="/mnt/playstation/emulateur/package/pcsx2.snapshot-4863/obj-x86_64-linux-gnu/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so" pcsx2
It print some error on my side but I think it works.

I wasn't sure if you wanted this on my existing install (with modified wxWidgets) or on a fresh install, so I did a fresh install.

I patched the makefile, then compiled with
Code:
cmake ../CMakeLists.txt -DFORCE_INTERNAL_SDL=TRUE -DCMAKE_BUILD_TYPE=Debug

Then started pcsx2 with
Code:
LD_PRELOAD="/home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so" ~/pcsx2-read-only/bin/pcsx2-dbg

It initialised when started, and started to boot an iso image, but then crashed:
Code:
$ LD_PRELOAD="/home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so" ~/pcsx2-read-only/bin/pcsx2-dbg
Interface is initializing.  Entering Pcsx2App::OnInit!
Applying operating system default language...
sh: symbol lookup error: /home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so: undefined symbol: ceil
sh: symbol lookup error: /home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so: undefined symbol: ceil
sh: symbol lookup error: /home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so: undefined symbol: ceil
sh: symbol lookup error: /home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so: undefined symbol: ceil
Command line parsing...
Command line parsed!
(UserMode) Found portable install ini @ /home/rpmbuild/pcsx2-read-only/bin/portable.ini

(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14

(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14

(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14
Restarting First Time Wizard!
                                                                                
(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14                                          
                                                                                
(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14                                          
                                                                                
(pcsx2-dbg:19181): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 14                                          
sh: symbol lookup error: /home/rpmbuild/pcsx2-read-only/3rdparty/SDL-1.3.0-5387/libpcsx2_SDL.so: undefined symbol: ceil                                        
erminate called after throwing an instance of 'R5900Exception::TLBMiss'        
7mAborted (core dumped)

I'll keep the debug build. Give me instructions if you need a backtrace.
Reply




Users browsing this thread: 2 Guest(s)