Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More build fixes, renamed to moonshine

  • Loading branch information...
commit ecec3876c3fe4c5a413bc5ebdf1d80d80e91503c 1 parent c9e180d
Aaron Bockover authored
View
8 README
@@ -1,7 +1,7 @@
-Moonlight Media Player leverages the Windows Media capabilities from
-Silverlight, provided by the Moonlight browser plugin on Linux, and the
-Firefox web browser framework to enable the playback of legacy embedded
-Windows Media content on the web and local files on a user's desktop.
+Moonshine leverages the Windows Media capabilities from Silverlight,
+provided by the Moonlight browser plugin on Linux, and the Firefox web
+browser framework to enable the playback of legacy embedded Windows
+Media content on the web and local files on a user's desktop.
It consists of two components:
View
3  configure.ac
@@ -1,5 +1,5 @@
dnl automake/autoconf setup
-AC_INIT([moon-mp-plugin], [0.1])
+AC_INIT([moonshine], [0.1])
AC_CONFIG_SRCDIR(README)
AC_CANONICAL_SYSTEM
AC_PREREQ(2.13)
@@ -51,6 +51,7 @@ Makefile
player/Makefile
plugin/Makefile
xulrunner/Makefile
+xulrunner/icon-theme-hicolor/Makefile
])
cat <<EOF
View
4 plugin/mmp-plugin-proxy.c
@@ -15,7 +15,7 @@ static struct {
const gchar *extensions;
} mmp_plugin_proxy_mime_types [] = {
// Special application type for this plugin
- { "application/x-moon-media", "*" },
+ { "application/x-moonshine-player", "*" },
// Generic/WMP types?
{ "application/x-mplayer2", "*" },
@@ -265,7 +265,7 @@ NP_GetValue (gpointer future, NPPVariable variable, gpointer value)
{
switch (variable) {
case NPPVpluginNameString:
- *((gchar **)value) = (gchar *)"Windows Media Player Plug-in 10 (compatible; Moonlight Media Player)";
+ *((gchar **)value) = (gchar *)"Windows Media Player Plug-in 10 (compatible; Moonshine Media Player)";
return NPERR_NO_ERROR;
case NPPVpluginDescriptionString:
*((gchar **)value) = (gchar *)"A media player powered by <a href=\"http://go-mono.com/moonlight\">Moonlight</a>, largely "
View
56 xulrunner/Makefile.am
@@ -1,13 +1,40 @@
+SUBDIRS = icon-theme-hicolor
+
BUILD_ID = `date +%Y%m%d%H%M%S`
IN_FILES = \
application.ini.in \
- moonlight-media-player.desktop.in
+ moonshine.desktop.in \
+ moonshine.in
+
+OUT_FILES = $(IN_FILES:.in=)
+
+desktopdir = $(datadir)/applications
+desktop_DATA = moonshine.desktop
+
+launcherdir = $(bindir)
+launcher_SCRIPTS = moonshine
-OUT_FILES = $(foreach infile, $(IN_FILES), \
- $(patsubst %.in, %, $(infile)))
+appdir = $(pkgdatadir)
+app_DATA = application.ini
+app_chromedir = $(pkgdatadir)/chrome
+app_chrome_DATA = chrome/chrome.manifest
+app_chrome_contentdir = $(pkgdatadir)/chrome/content
+app_chrome_content_DATA = $(wildcard chrome/content/*)
+app_chrome_content_playerdir = $(pkgdatadir)/chrome/content/player
+app_chrome_content_player_DATA = $(wildcard chrome/content/player/*)
+app_defaults_preferencesdir = $(pkgdatadir)/defaults/preferences
+app_defaults_preferences_DATA = defaults/preferences/prefs.js
-all: $(OUT_FILES)
+PLAYER_TARGETS = $(foreach res, \
+ $(wildcard $(top_srcdir)/player/*.js) \
+ $(wildcard $(top_srcdir)/player/*.xaml), \
+ $(addprefix chrome/content/player/,$(notdir $(res))))
+
+all: $(PLAYER_TARGETS) $(OUT_FILES)
+
+moonshine: moonshine.in
+ sed -e "s|\@pkgdatadir\@|$(pkgdatadir)|g;" < $< > $@
application.ini: application.ini.in
sed -e " \
@@ -17,9 +44,8 @@ application.ini: application.ini.in
s/\@MIN_GECKO_VERSION\@/$(MIN_GECKO_VERSION)/g; \
" < $< > $@
-moonlight-media-player.desktop: moonlight-media-player.desktop.in
- cp $< $@
- echo "MimeType=`awk -F'{' '{ \
+moonshine.desktop: moonshine.desktop.in
+ (cat $< && echo "MimeType=`awk -F'{' '{ \
if ($$0 ~ /mmp_plugin_proxy_mime_types.*=.*{/) \
start = 1; \
else if ($$0 ~ /\}\;/) \
@@ -30,13 +56,21 @@ moonlight-media-player.desktop: moonlight-media-player.desktop.in
if ($$2 ~ /[a-z]+\/[a-z0-9\-]/) \
printf $$2 ";"; \
} \
- }' < $(top_srcdir)/plugin/mmp-plugin-proxy.c`" >> $@
+ }' < $(top_srcdir)/plugin/mmp-plugin-proxy.c`") > $@
+
+chrome/content/player/%: $(top_srcdir)/player/%
+ mkdir -p $(dir $@)
+ cp -a $< $@
+
+clean-local:
+ rm -rf chrome/content/player
-run: application.ini
- xulrunner $<
+run: all
+ xulrunner application.ini
EXTRA_DIST = $(IN_FILES) \
- chrome/
+ chrome \
+ defaults
CLEANFILES = $(OUT_FILES)
MAINTAINERCLEANFILES = Makefile.in
View
BIN  xulrunner/hicolor/64x64/apps/moonlight-media-player.png
Deleted file not rendered
View
BIN  xulrunner/hicolor/72x72/apps/moonlight-media-player.png
Deleted file not rendered
View
BIN  xulrunner/hicolor/96x96/apps/moonlight-media-player.png
Deleted file not rendered
View
27 xulrunner/icon-theme-hicolor/Makefile.am
@@ -0,0 +1,27 @@
+theme = hicolor
+themedir = $(datadir)/icons/$(theme)
+theme_icons = \
+ apps,moonshine-16.png \
+ apps,moonshine-22.png \
+ apps,moonshine-24.png \
+ apps,moonshine-32.png \
+ apps,moonshine-48.png \
+ apps,moonshine-128.png
+
+install_icon_exec = $(SHELL) $(srcdir)/icon-theme-installer \
+ -t "$(theme)" \
+ -s "$(srcdir)" \
+ -d "x$(DESTDIR)" \
+ -b "$(themedir)" \
+ -m "$(mkinstalldirs)" \
+ -x "$(INSTALL_DATA)"
+
+install-data-local:
+ @-$(install_icon_exec) -i $(theme_icons)
+
+uninstall-hook:
+ @-$(install_icon_exec) -u $(theme_icons)
+
+EXTRA_DIST = $(wildcard *.png *.svg) icon-theme-installer
+MAINTAINERCLEANFILES = Makefile.in
+
View
177 xulrunner/icon-theme-hicolor/icon-theme-installer
@@ -0,0 +1,177 @@
+#!/bin/bash
+
+# icon-theme-installer
+# Copyright (C) 2006 Novell, Inc.
+# Written by Aaron Bockover <abock@gnome.org>
+# Licensed under the MIT/X11 license
+#
+# This script is meant to be invoked from within a Makefile/Makefile.am
+# in the install-data-local and uninstall-data sections. It handles the
+# task of properly installing icons into the icon theme. It requires a
+# few arguments to set up its environment, and a list of files to be
+# installed. The format of the file list is critical:
+#
+# <category>,<local-src-file-name>
+#
+# apps,music-player-banshee.svg
+# apps,music-player-banshee-16.png
+# apps,music-player-banshee-22.png
+#
+# <category> is the icon theme category, for instance, apps, devices,
+# actions, emblems...
+#
+# <local-src-file-name> must have a basename in the form of:
+#
+# proper-theme-name[-<SIZE>].<EXTENSION>
+#
+# Where <SIZE> should be either nothing, which will default to scalable
+# or \-[0-9]{2}, which will expand to <SIZE>x<SIZE>. For example:
+#
+# music-player-banshee-16.png
+#
+# The <SIZE> here is -16 and will expand to 16x16 per the icon theme spec
+#
+# What follows is an example Makefile.am for icon theme installation:
+#
+# ---------------
+# theme=hicolor
+# themedir=$(datadir)/icons/$(theme)
+# theme_icons = \
+# apps,music-player-banshee.svg \
+# apps,music-player-banshee-16.png \
+# apps,music-player-banshee-22.png \
+# apps,music-player-banshee-24.png \
+# apps,music-player-banshee-32.png
+#
+# install_icon_exec = $(top_srcdir)/build/icon-theme-installer -t $(theme) -s $(srcdir) -d "x$(DESTDIR)" -b $(themedir) -m "$(mkinstalldirs)" -x "$(INSTALL_DATA)"
+# install-data-local:
+# $(install_icon_exec) -i $(theme_icons)
+#
+# uninstall-hook:
+# $(install_icon_exec) -u $(theme_icons)
+#
+# MAINTAINERCLEANFILES = Makefile.in
+# EXTRA_DIST = $(wildcard *.svg *.png)
+# ---------------
+#
+# Arguments to this program:
+#
+# -i : Install
+# -u : Uninstall
+# -t <theme> : Theme name (hicolor)
+# -b <dir> : Theme installation dest directory [x$(DESTDIR)] - Always prefix
+# this argument with x; it will be stripped but will act as a
+# placeholder for zero $DESTDIRs (only set by packagers)
+# -d <dir> : Theme installation directory [$(hicolordir)]
+# -s <dir> : Source directory [$(srcdir)]
+# -m <exec> : Command to exec for directory creation [$(mkinstalldirs)]
+# -x <exec> : Command to exec for single file installation [$(INSTALL_DATA)]
+# <remainging> : All remainging should be category,filename pairs
+
+while getopts "iut:b:d:s:m:x:" flag; do
+ case "$flag" in
+ i) INSTALL=yes ;;
+ u) UNINSTALL=yes ;;
+ t) THEME_NAME=$OPTARG ;;
+ d) INSTALL_DEST_DIR=${OPTARG##x} ;;
+ b) INSTALL_BASE_DIR=$OPTARG ;;
+ s) SRC_DIR=$OPTARG ;;
+ m) MKINSTALLDIRS_EXEC=$OPTARG ;;
+ x) INSTALL_DATA_EXEC=$OPTARG ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if test "x$INSTALL" = "xyes" -a "x$UNINSTALL" = "xyes"; then
+ echo "Cannot pass both -i and -u"
+ exit 1
+elif test "x$INSTALL" = "x" -a "x$UNINSTALL" = "x"; then
+ echo "Must path either -i or -u"
+ exit 1
+fi
+
+if test -z "$THEME_NAME"; then
+ echo "Theme name required (-t hicolor)"
+ exit 1
+fi
+
+if test -z "$INSTALL_BASE_DIR"; then
+ echo "Base theme directory required [-d \$(hicolordir)]"
+ exit 1
+fi
+
+if test ! -x $(echo "$MKINSTALLDIRS_EXEC" | cut -f1 -d' '); then
+ echo "Cannot find '$MKINSTALLDIRS_EXEC'; You probably want to pass -m \$(mkinstalldirs)"
+ exit 1
+fi
+
+if test ! -x $(echo "$INSTALL_DATA_EXEC" | cut -f1 -d' '); then
+ echo "Cannot find '$INSTALL_DATA_EXEC'; You probably want to pass -x \$(INSTALL_DATA)"
+ exit 1
+fi
+
+if test -z "$SRC_DIR"; then
+ SRC_DIR=.
+fi
+
+for icon in $@; do
+ size=$(echo $icon | sed s/[^0-9]*//g)
+ category=$(echo $icon | cut -d, -f1)
+ build_name=$(echo $icon | cut -d, -f2)
+ install_name=$(echo $build_name | sed "s/[0-9]//g; s/-\././")
+ install_name=$(basename $install_name)
+
+ if test -z $size; then
+ size=scalable;
+ else
+ size=${size}x${size};
+ fi
+
+ install_dir=${INSTALL_DEST_DIR}${INSTALL_BASE_DIR}/$size/$category
+ install_path=$install_dir/$install_name
+
+ if test "x$INSTALL" = "xyes"; then
+ echo "Installing $size $install_name into $THEME_NAME icon theme"
+
+ $($MKINSTALLDIRS_EXEC $install_dir) || {
+ echo "Failed to create directory $install_dir"
+ exit 1
+ }
+
+ $($INSTALL_DATA_EXEC $SRC_DIR/$build_name $install_path) || {
+ echo "Failed to install $SRC_DIR/$build_name into $install_path"
+ exit 1
+ }
+
+ if test ! -e $install_path; then
+ echo "Failed to install $SRC_DIR/$build_name into $install_path"
+ exit 1
+ fi
+ else
+ if test -e $install_path; then
+ echo "Removing $size $install_name from $THEME_NAME icon theme"
+
+ rm $install_path || {
+ echo "Failed to remove $install_path"
+ exit 1
+ }
+ fi
+ fi
+done
+
+gtk_update_icon_cache_bin="$((which gtk-update-icon-cache || echo /opt/gnome/bin/gtk-update-icon-cache)2>/dev/null)"
+gtk_update_icon_cache="$gtk_update_icon_cache_bin -f -t $INSTALL_BASE_DIR"
+
+if test -z "$INSTALL_DEST_DIR"; then
+ if test -x $gtk_update_icon_cache_bin; then
+ echo "Updating GTK icon cache"
+ $gtk_update_icon_cache
+ else
+ echo "*** Icon cache not updated. Could not execute $gtk_update_icon_cache_bin"
+ fi
+else
+ echo "*** Icon cache not updated. After (un)install, run this:"
+ echo "*** $gtk_update_icon_cache"
+fi
+
View
0  ...r/128x128/apps/moonlight-media-player.png → ...nner/icon-theme-hicolor/moonshine-128.png
File renamed without changes
View
0  ...lor/16x16/apps/moonlight-media-player.png → ...unner/icon-theme-hicolor/moonshine-16.png
File renamed without changes
View
0  ...lor/22x22/apps/moonlight-media-player.png → ...unner/icon-theme-hicolor/moonshine-22.png
File renamed without changes
View
0  ...lor/24x24/apps/moonlight-media-player.png → ...unner/icon-theme-hicolor/moonshine-24.png
File renamed without changes
View
0  ...lor/32x32/apps/moonlight-media-player.png → ...unner/icon-theme-hicolor/moonshine-32.png
File renamed without changes
View
0  ...lor/48x48/apps/moonlight-media-player.png → ...unner/icon-theme-hicolor/moonshine-48.png
File renamed without changes
View
0  xulrunner/moonlight-media-player.desktop.in → xulrunner/moonshine.desktop.in
File renamed without changes
View
4 xulrunner/moonshine.in
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+xulrunner @pkgdatadir@/application.ini "$@"
+
Please sign in to comment.
Something went wrong with that request. Please try again.