Page 1 of 1
Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 6:51 am
by robn
Fyi, Pioneer has just been updated to use
SDL2. SDL makes different platforms look the same to our code, so we don't need to care too much about differences between operating systems, keyboards, joysticks and whatever else. Its very cool. Build 201309.116 will be up shortly containing this new code.
The single player-visible difference is that keybindings are now stored differently in the config file. So when you start the game you will likely have to reconfigure your bindings. To reset them entirely, open your config.ini and remove all the lines starting with "Bind". They will be reset to defaults on next game run.
I've done extensive testing on the Linux version, minimal on Windows and none at all on OS X. Please create an issue if you see anything that seems to be broken as a result of this change.
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 3:08 pm
by walterar
First view.
The good: The management of windows in linux seems to have improved. :)
The bad: In Ubuntu 12.04 (LTS) must be installed libsdl2 :(
The good: I found a easy way to install Ubuntu 12.04 LTS libsdl2 :)
sudo add-apt-repository ppa:zoogie/sdl2-snapshots
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-image-dev
Have not tried Ubuntu 12.10
In Ubuntu 13.03 no need to install ppa
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 7:07 pm
by lwho
The bad: This PPA contains snapshots, not stables of libsdl2. I would be a lot happier if there was PPA with a release version, but I did not find one. Alternatively download the source of the stable release (
http://libsdl.org/download-2.0.php) and build myself. Caught between a rock and a hard place, I would say.
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 7:56 pm
by Nyankosensei
i don't have the build by now but you can try to install saucy packages
http://packages.ubuntu.com/saucy/libsdl2-2.0-0
i don't have dependecies problems
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 8:06 pm
by lwho
I downloaded the 2.0.0 source packages and had dpkg-buildpackage build deb packages out of them, which I then installed with "dpkg -i". All without problems.
However, I get linker errors now:
/home/lw/pioneer/lwho_pioneer/src/gui/Gui.cpp:40: error: undefined reference to 'Gui::MouseButtonEvent::BUTTON_WHEELUP'
/home/lw/pioneer/lwho_pioneer/src/gui/Gui.cpp:40: error: undefined reference to 'Gui::MouseButtonEvent::BUTTON_WHEELDOWN'
As far as I can tell, those are only declared in GuiEvents.h but not defined anywhere.
I think src/gui/Gui.cpp should contain
Code: Select all
namespace Gui {
const Uint8 MouseButtonEvent::BUTTON_WHEELUP;
const Uint8 MouseButtonEvent::BUTTON_WHEELDOWN;
}
C++ requires static class members to be defined somewhere, even if they are constants initialized in the class.
Edit: Happens with the default gcc 4.6.4 and gcc 4.7.4 installable on Ubuntu 12.04.
Works without changes with gcc 4.8.1 installed from a PPA. Maybe because this is valid in C++11?
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 9:24 pm
by Nyankosensei
without install ppa i have build it with pioneer-thirdparty just added glew sources
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 11:30 pm
by walterar
"The bad: This PPA contains snapshots,"
Yes, but zoogie does things right.
The good: github.com/pioneerspacesim/pioneer... too.
Yes, but its developers, does things right.
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 11:50 pm
by robn
lwho wrote:C++ requires static class members to be defined somewhere, even if they are constants initialized in the class.
Edit: Happens with the default gcc 4.6.4 and gcc 4.7.4 installable on Ubuntu 12.04.
Works without changes with gcc 4.8.1 installed from a PPA. Maybe because this is valid in C++11?
No idea off the top of my head. But I've pushed a workaround anyway :)
Re: Pioneer updated to SDL2
Posted: Mon Sep 30, 2013 11:51 pm
by robn
I didn't realise Ubuntu wasn't carrying SDL2. Actually I didn't realise Debian wheezy wasn't either - I got my copy from sid, it seems.
I'll update COMPILING.txt telling people they need thirdparty.
Re: Pioneer updated to SDL2
Posted: Wed Oct 02, 2013 7:08 am
by Tichy
In ArchLinux, compiling from git using the AUR PKGBUILD works (sdl2 is in the main repositories), but the user must edit the PKGBUILD and update the dependences.
https://aur.archlinux.org/packages/pioneer-git/