This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OSX] Implement the initial PAL backend for native rendering on OSX
This is a young implementation of the PAL backend for Moonlight. It can render animations, text, probably transforms if built will gallium support. Mouse events are fully hooked up, the keyboard is about 80% done. Check README.darwin for a rough TODO list and instructions on how to get things started.
- Loading branch information
Geoff Norton
committed
Nov 4, 2010
1 parent
4b50058
commit 056fbf0
Showing
64 changed files
with
2,458 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
You must have cairo 1.10 from macport currently. | ||
|
||
sudo /opt/local/bin/port install cairo +quartz | ||
|
||
You can then make a moon/mono/mono-basic parallel checkout and run with: | ||
|
||
PATH=/opt/local/bin/:$PATH ./autogen.sh --prefix=/opt/darwoon --with-pal=cocoa --with-curl=system --host=i386-apple-darwin10 --with-cairo=system CFLAGS="-arch i386" CXXFLAGS="-arch i386" LDFLAGS="-arch i386" | ||
|
||
You need to symlink /opt/darwoon/lib/moonlight/plugin/libmoonplugin.dylib -> /opt/darwoon/lib/moonlight/plugin/libmoon.dylib | ||
|
||
To run the hacked up lunar-launcher use something like this: | ||
|
||
DYLD_FALLBACK_LIBRARY_PATH=/opt/darwoon/lib/moonlight/plugin/ DYLD_INSERT_LIBRARIES=/usr/lib/libiconv.dylib MOON_TRACE=E:all MOONLIGHT_DEBUG=deployment /opt/darwoon/lib/moonlight/plugin/lunar-launcher 1 | ||
|
||
Put an xap in /tmp/Application.xap | ||
|
||
TODO: | ||
1> Subclass NSWindow to properly deliver window realized, resize, et all events | ||
2> Figure out why Invalidate is upside down on the MoonNSView | ||
3> Figure out a proper idle loop | ||
4> Implement mouse events | ||
5> Implement keyboard events | ||
6> Add AppKit and iconv linkage | ||
7> Figure out how [DllImport ("moon")] when running in lunarlauncher doesn't load both shared libs | ||
8> Where or where have my debug syms gone? | ||
|
||
LONG TERM TODO: | ||
1> Figure out a proper API for public consumption in monomac | ||
2> Native font backend | ||
3> Plugin? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
SUBDIRS = desklet | ||
if GTK_PAL | ||
SUBDIRS = desklet | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,70 @@ | ||
AC_DEFUN([MOONLIGHT_CHECK_PAL], | ||
[ | ||
dnl | ||
dnl eventually we need to replace all this with platform and/or --enable checks, but for now... | ||
dnl | ||
AC_ARG_WITH([pal],[ --with-pal=gtk|cocoa Specify which PAL to build (defaults to gtk)], [], [with_pal=gtk]) | ||
if test "x$with_pal" = "x"; then | ||
AC_MSG_ERROR([unknown PAL specified]) | ||
elif test "x$with_pal" = "xgtk"; then | ||
AC_DEFINE([PAL_GTK_WINDOWING],1,[Hack in support for the pal-gtk so we can start using it.]) | ||
pal_windowing="gtk (hardcoded)" | ||
pal_windowing="gtk" | ||
AC_DEFINE([PAL_GLIB_MESSAGING],1,[Hack in support for the pal-glib so we can start using it.]) | ||
pal_messaging="glib+unix (hardcoded)" | ||
pal_messaging="glib+unix" | ||
AC_DEFINE([PAL_LINUX_NETWORKAVAILABILITY],1,[Hack in support for the linux network container.]) | ||
pal_networking="linux (hardcoded)" | ||
pal_networking="linux" | ||
AC_DEFINE([PAL_DBUS_NETWORKAVAILABILITY],1,[Hack in support for the dbus-glib so we can start using it.]) | ||
pal_networking="$pal_networking dbus-glib (hardcoded)" | ||
pal_networking="$pal_networking dbus-glib" | ||
AC_DEFINE([PAL_LINUX_CAPTURE],1,[Hack in support for the linux capture container]) | ||
pal_capture="linux (hardcoded)" | ||
pal_capture="linux" | ||
AC_DEFINE([PAL_V4L2_VIDEO_CAPTURE],1,[Hack in support for pal-v4l2 so we can start using it.]) | ||
pal_video_capture="v4l2 (hardcoded)" | ||
pal_video_capture="v4l2" | ||
dnl AC_DEFINE([PAL_PULSE_AUDIO_CAPTURE],1,[Hack in support for pal-pulse so we can start using it.]) | ||
pal_audio_capture="none (hardcoded)" | ||
]) | ||
pal_audio_capture="none" | ||
PKG_CHECK_MODULES(GTK, gtk+-2.0 gthread-2.0 atk) | ||
PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1) | ||
PKG_CHECK_MODULES(XRANDR, xrandr, [ | ||
AC_DEFINE([USE_RANDR], [1], | ||
[Include support for the XRANDR extension for querying a monitor's refresh rate]) | ||
], [xrandr_present=no]) | ||
PKG_CHECK_MODULES(FREETYPE2, freetype2) | ||
PKG_CHECK_MODULES(FONTCONFIG, fontconfig) | ||
PKG_CHECK_MODULES(GLIB, glib-2.0) | ||
PAL=gtk | ||
elif test "x$with_pal" = "xcocoa"; then | ||
dnl We force parsing as objective-c++ since thats what we are, but automake doesn't understand .mm | ||
OBJCFLAGS="-x objective-c++ $CFLAGS" | ||
LDFLAGS="$LDFLAGS -liconv -framework AppKit" | ||
AC_DEFINE([PAL_COCOA_WINDOWING],1,[Hack in support for the pal-cocoa so we can start using it.]) | ||
pal_windowing="cocoa" | ||
AC_DEFINE([PAL_OSX_MESSAGING],1,[Hack in support for the pal-osx so we can start using it.]) | ||
pal_messaging="cocoa" | ||
pal_networking="none" | ||
pal_capture="none" | ||
pal_video_capture="none" | ||
pal_audio_capture="none" | ||
dnl We need to flesh out eglib enough to drop this dep | ||
PKG_CHECK_MODULES(GLIB, glib-2.0) | ||
PAL=cocoa | ||
fi | ||
AM_CONDITIONAL(GTK_PAL, test x$with_pal = xgtk) | ||
AM_CONDITIONAL(COCOA_PAL, test x$with_pal = xcocoa) | ||
AC_SUBST([PAL]) | ||
]) |
Oops, something went wrong.