User:Compyx: Difference between revisions
Line 113: | Line 113: | ||
GtkHBox and GtkVBox have been deprecated in favour of GtkBox. | GtkHBox and GtkVBox have been deprecated in favour of GtkBox. | ||
I wrote a wrapper in gtk2legacy.c so Gtk2 code can use GtkBox while using the underlying GtkHBox/GtkVBox widgets. | |||
I wrote a wrapper in gtk2legacy.c so Gtk2 code can use GtkBox while using the underlying GtkHBox/GtkVBox widgets. Naturally these calls aren't fully compatible, gtk_hbox_new() and gtk_vbox_new() use a `homogeneous` argument which determines if all widgets should be the same size. Since all VICE code use FALSE for this, gtk_box_new() works without having to set the homogeneous property afterwards. | |||
==== GtkTable ==== | ==== GtkTable ==== | ||
GtkTable has been deprecated in favour of GtkGrid, porting this should be too much hassle, but lets see. | GtkTable has been deprecated in favour of GtkGrid, porting this should be too much hassle, but lets see. |
Revision as of 16:31, 5 October 2016
Who am I
I'm an old C64 scener, look me up at csdk.dk if you don't believe me ;)
Personal devlog
TODO list
- 2016-09-xx: Try to build VICE on Minix 3.2.x
- 2016-09-29: Test Android SDL2 build
- 2016-09-29:
Fix build system for *BSD ports(2016-10-03: Done for FreeBSD, NetBSD, DragonflyBSD) - 2016-10-02:
Gtk2 crashes NetBSD VirtualBox VM, why? Logging doesn't help, empty log
BSD build system adventures
FreeBSD/PC-BSD
Version(s) tested: PC-BSD 10.3 amd64 (PC-BSD which is a preconfigured X11 install of FreeBSD)
Use gmake when building VICE! Use normal make when installing from the ports system.
Ports
- Xaw: builds and runs
- Gtk2: builds and runs
- Gtk3: builds and runs
- SDL1: builds and runs
- SDL2: builds and runs (very well even, best performance of the ports I've tested, most likely thanks to VirtualBox using HW rendering on my host)
(Tested in VirtualBox VM with guest additions). Still need to do a write-up on which libraries should be installed for building and for each specific port.
NetBSD
Version(s) tested: 7.0.1 amd64 (on VirtualBox 5.1.6)
Use gmake!
Some notes/observations:
- It has few weird conflicts with library interdependencies: a lot of foo.so.x needed but foo.so.y found, etc. May need to test the pkgsrc system, see if that behave any better, and perhaps run the system on bare metal.
- /dev/joy0 and /dev/joy1 can't be opened, <machine/joystick.h> is there and compiling against it works, same goes for USB joysticks, after installing libusb, usbhidapi and some others, configure sees the USB joystick support, but it doesn't work. Most likely a VirtualBox problem.
- HW rendering failed to build (failed at libdrm) while installing MesaLib7 through pkgsrc. So some ports had horrible performance.
- Sounds seems to work, but VBox doesn't output anything, most likely again a VBox issue, there are no guest-additions for NetBSD, there is an effort started in 2013 to port FreeBSD's guest additions to NetBSD, but that was abandoned.
All issues are related to properly configuring NetBSD, not something for VICE to worry about.
Ports
- Xaw: builds and runs
- Gtk2: builds and runs
- Gtk3: builds, starts, but hangs on initializing the Gtk3 widget for displaying the actual screen ("Gtk-WARNING **: Allocating size to GtkWindow 0x7f7ff493cd20 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?")
- SDL1: builds and runs, no HW acceleration yet, needs Mesa, which fails to build
- SDL2: builds and 'runs' (5fps, most likely due to Gallium using software rendering)
OpenBSD
Version(s) tested: 6.0 amd64
Can't get the bloody X server to behave :) (Again in VBox VM)
Dragonfly BSD
Version(s) tested: 4.6 amd64 (inside a VirtualBox 5.1.6 VM, configured as FreeBSD)
Use gmake when building VICE.
Needed to add snd_driver_load="YES" to /boot/loader.conf to get access to dev/dsp for sound output.
Ports
All issues related to VICE hanging on sound buffer problems most likely have to do with me having configured ALSA without really knowing what the hell I was doing. Last time I had to configure ALSA has been over 10 years ago on Linux ;) Using Intel HD audio in VirtualBox at least removes the crashes in the various ports, but buffer overflows are common, but I'm using a VM with a single CPU @ 2GHz and 1GB memory.
- Xaw: builds and runs
- Gtk2: builds and runs, but any selection in the GUI that needs to pop up a dialog hangs VICE, unless you disable sound and then re-enable sound.
- Gtk3: builds and runs, same issues as the Gtk2 port, selecting an item in the GUI causes ALSA to overflow the sound buffer, and VICE hangs
- SDL1: builds and runs
- SDL2: builds and runs
Minix build system
Minix 3.3.0 doesn't provide X11 out of the box (eg binary packages), so I'll start with 3.2.1. I have no experience with Minx, except for installing it once about ten years ago, and deciding it sucked.
Minix 3.2.1
Useless. Subversion must be built from source through pksrc, but building fails with circular dependencies with libtool. GCC is 2.95(!), which is ancient.
Minix 3.3.0
Perhaps I'll look a this when I have absolutely nothing better to do, or am very drunk.
Preparing for removing Gtk2 in favour of Gtk3
Since most modern operating systems used for VICE have support for Gtk3 and Gtk2 is no longer maintained, it makes sense to prepare VICE for using Gtk3 in stead of Gtk2. This means, for now, using a gtk2legacy wrapper module Groepaz started. This provided wrappers around Gtk2 code using the Gtk3 API.
The idea is to use the Gtk3 API in all Gtk/Gnome code while providing wrappers in gtk2legacy that translate those Gtk3 API calls into equivalent Gtk2 API calls. Once the Gtk2 API has finally been deprecated, we can simply remove gtk2legacy and use pure Gtk3.
The minimum Gtk3 version supported should be 3.16, since that introduces GtkGlArea, which should replace GtkGlExt.
TODO: table of OS'es that support Gtk3-3.16
Porting Gtk2 container types to Gtk3 container types
The current advise of Gtk3 is to use GtkGrid for any kind of layout container. Even GtkBox will someday be deprecated in favour of GtkGrid. For now, I'll use GtkBox untill the Gtk2 port has been completely removed, then we can tackle this.
GtkHBox and GtkVBox
GtkHBox and GtkVBox have been deprecated in favour of GtkBox.
I wrote a wrapper in gtk2legacy.c so Gtk2 code can use GtkBox while using the underlying GtkHBox/GtkVBox widgets. Naturally these calls aren't fully compatible, gtk_hbox_new() and gtk_vbox_new() use a `homogeneous` argument which determines if all widgets should be the same size. Since all VICE code use FALSE for this, gtk_box_new() works without having to set the homogeneous property afterwards.
GtkTable
GtkTable has been deprecated in favour of GtkGrid, porting this should be too much hassle, but lets see.