Commit 1f7a4627 authored by Yann Leboulanger's avatar Yann Leboulanger

[James Newton] osx port for Gajim. a GREAT thanks!!!

parent 819b3c73
......@@ -48,6 +48,16 @@ MAINTAINERCLEANFILES = \
compile \
depcomp \
config.guess \
config.log \
config.sub \
config.status \
aclocal.m4 \
libtool
libtool \
po/POTFILES.in \
src/trayicon_la-eggtrayicon.loT \
m4/intltool.m4
MAINTAINERCLEANDIRS = \
autom4te.cache \
build \
dist
Introduction
------------
This is an alpha release of Gajim for OS/X using native GTK+. It is not finished
nor is it relatively stable. The native port of GTK+ is alpha and not stable
yet, though it has proven to be usable for Gajim. Having said that it is usable,
basic functionality works. See the TODO file for a list of what is and is not
working.
Installing
----------
Install the GTK+ framework into your /Library/Frameworks directory. It can be
found at http://codepunks.org/misc/gtk/osx.
Copy the Gajim.app into the /Applications directory or any other directory.
Installing language dictionaries
--------------------------------
The codepunks.org build of the GTK+ framework comes with the US English
dictionary pre-installed. If you wish to install a different dictionary download
the appropriate dictionary from here:
http://ftp.gnu.org/gnu/aspell/dict/
Then follow these instructions:
source /Library/Frameworks/GTK+.framework/Versions/Current/bin/env
tar -jxf aspell-<lang>-<version>.tbz2
cd aspell-<lang>-<version>
./configure
make
make install
Compiling Requirements
----------------------
These instructions were gathered for building a universal binary on a PPC. The
steps for building on an i386 should be essentially the same.
Requirements:
- OS/X 10.4, i386 or ppc
- Universal MacPython 2.5
http://www.pythonmac.org/packages/py25-fat/index.html
- Latest XCode (2.4.0 or greater)
- py2app
http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html
Install all of the requirements. Make sure that the universal MacPython is
installed before py2app. Then ensure that this is the first python in your
PATH.
export PATH=/Library/Frameworks/Python.framework/Versions/2.5/bin:$PATH
Then install py2app.
Compiling
---------
In the top level run the configure script. If this is source is from subversion
then run the autogen.sh script. Follow it up with a make:
./configure
or
./autogen.sh
make
Once that is done Gajim can be run from the source tree. You may also create an
app bundle suitable for use or distribution. To do that run:
python setup_osx.py build
The Gajim.app bundle is created in the dist directory. This bundle is ready
for use as is. Copy it to your /Applications directory and you're good to go.
You now have a self contained (almost, requires GTK+.framework still) universal
native build of Gajim.
Optionally to create a distribution of the Gajim app bundle do:
python setup_osx.py dist
Development
-----------
It is possible to run Gajim correctly from the app bundle but still use the
python code in the source tree. This line must be added to the _run() function
in the Gajim.app/Resources/__boot__.py file. It needs to be located just after
the sys module is imported. Font forget to fix the path to match your
environment.
sys.path = ["/Users/user/Source/gajim/src"] + sys.path
The bits that work
------------------
-idle checking
-dbus and gajim-remote, using dbus from GTK+.framework.
-systray icon
-app bundle with universal binaries. Depends on the GTK+.framework.
-notifications through growl, internal fallback works fine as well
-spell checking
-running apps and opening files/urls
-playing sounds
-Network monitoring
-Mostly everything else except for whats below.
The bits that dont work
-----------------------
-Application start/stop/doc/DnD handling
-finish the .app bundle
- setup gajim-remote, maybe install it to /usr/local
- fix user session management
-integrate the Gajim and gajim-remote scripts with autoconf and add GTK
framework detection
-Pass icons to OS/X menu
-set the LSEnvironment in Info.plist for gtk paths instead of hard coding in
gajim.py
-Maybe setup the pasteboard services for an OS/X alternative to the
gajim_remote
-CFBundleDocumentTypes.NSDocument
Native GTK bugs
----------------
-cut and paste blows up Finder and the os/x GUI server. very very nasty.
-with mutiple displays, popup menus show up on the wrong display
......@@ -8,11 +8,19 @@
echo "See README.html for build requirements."
exit 1
fi
set -x
AM_ARGS="--add-missing --gnu --copy"
CONF_ARGS=""
if test x`uname -s 2>/dev/null` = 'xDarwin';then
. /Library/Frameworks/GTK+.framework/Versions/Current/env
#export PATH=/Library/Frameworks/GTK+.framework/Versions/Current/bin/:$PATH
#export PKG_CONFIG_PATH=/Library/Frameworks/GTK+.framework/Versions/Current/lib/pkgconfig
AM_ARGS="${AM_ARGS} --ignore-deps"
CONF_ARGS="${CONF_ARGS} --disable-idle --without-x"
fi
intltoolize --force --automake \
&& aclocal -I ./m4 \
&& libtoolize --copy --force --automake \
&& autoheader \
&& autoconf \
&& automake --add-missing --gnu --copy \
&& ./configure $@
&& automake ${AM_ARGS} \
&& ./configure ${CONF_ARGS} $@
......@@ -6,6 +6,9 @@ AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_MAINTAINER_MODE
dnl Make Objective-C work with automake
AM_CONDITIONAL([am__fastdepOBJC], false)
IT_PROG_INTLTOOL([0.35.0])
PKG_PROG_PKG_CONFIG([0.19])
......@@ -128,6 +131,75 @@ AC_ARG_ENABLE(trayicon,
test "x$enable_trayicon" = "xyes" && have_trayicon=true || have_trayicon=false
AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon)
dnl ****
dnl Cocoa
dnl ****
AC_ARG_ENABLE([cocoa],
[ --disable-cocoa build cocoa integration [default auto]],
enable_cocoa=$enableval, enable_cocoa=yes)
if test "x$enable_cocoa" = "xyes";then
dnl There is no pkgconfig for cocoa; lets do a header check
temp_save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -ObjC"
AC_CHECK_HEADER(Cocoa/Cocoa.h, [have_cocoa=true], [have_cocoa=false])
AC_CHECK_HEADER(AppKit/AppKit.h, [have_appkit=true], [have_appkit=false])
CFLAGS="$temp_save_cflags"
if test "x$have_cocoa" = "xtrue";then
COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker Cocoa"
fi
if test "x$have_appkit" = "xtrue";then
COCOA_LIBS="$COCOA_LIBS -Xlinker -framework -Xlinker AppKit"
fi
if test "x$COCOA_LIBS" != "x";then
AC_SUBST(COCOA_LIBS)
true
fi
fi
AM_CONDITIONAL(BUILD_COCOA, $have_cocoa)
dnl ****
dnl Carbon
dnl ****
AC_ARG_ENABLE([carbon],
[ --disable-carbon build with carbon [default auto]],
enable_carbon=$enableval, enable_carbon=yes)
if test "x$enable_carbon" = "xyes";then
dnl There is no pkgconfig for carbon; lets do a header check
AC_CHECK_HEADER(Carbon/Carbon.h, [have_carbon=true], [have_carbon=false])
AC_CHECK_HEADER(IOKit/IOKitLib.h, [have_iokit=true], [have_iokit=false])
if test "x$have_carbon" = "xtrue";then
CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker Carbon"
fi
if test "x$have_iokit" = "xtrue";then
CARBON_LIBS="$CARBON_LIBS -Xlinker -framework -Xlinker IOKit"
fi
if test "x$CARBON_LIBS" != "x";then
AC_SUBST(CARBON_LIBS)
have_idle_osx=true
dnl Disable X11 idle
have_idle=false
AM_CONDITIONAL(BUILD_IDLE, false)
dnl Disable custom trayicon
have_trayicon=gtk+
AM_CONDITIONAL(BUILD_TRAYICON, false)
dnl Hack to work around failure in gettext package detection on OS/X
if test "x$GMSGFMT" = "x";then
AC_SUBST(GMSGFMT, msgfmt)
AC_SUBST(MSGFMT, msgfmt)
AC_SUBST(XGETTEXT, xgettext)
fi
else
have_carbon=false
have_idle_osx=false
fi
fi
AM_CONDITIONAL(BUILD_IDLE_OSX, $have_carbon)
AM_CONDITIONAL(BUILD_CARBON, $have_carbon)
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)
......@@ -159,6 +231,9 @@ AC_CONFIG_FILES([
data/defs.py
src/Makefile
src/common/Makefile
src/osx/Makefile
src/osx/growl/Makefile
src/osx/syncmenu/Makefile
scripts/gajim
scripts/gajim-remote
po/Makefile.in
......@@ -171,4 +246,6 @@ echo "
idle module ...... ${have_idle}
remote control ... ${have_remote}
trayicon ......... ${have_trayicon}
idle module OSX .. ${have_idle_osx}
cocoa ............ ${have_cocoa}
*****************************"
{
IBClasses = ({CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; });
IBVersion = 1;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>69 10 356 240 0 0 1280 832 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>245 312 185 44 0 0 1280 832 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
</array>
<key>IBSystem Version</key>
<string>8R218</string>
</dict>
</plist>
#!/bin/bash
cd `dirname $0`/src
BASE=`pwd`/`dirname $0`
OS=`uname -s`
if [ "x${OS}" == "xDarwin" ]; then
export RESOURCEPATH="${BASE}/dist/Gajim.app/Contents/Resources"
fi
cd ${BASE}/src
exec -a gajim python -OOt gajim.py $@
"""
Usage:
python setup_osx.py [build | dist]
"""
from setuptools import setup
import sys, glob, os, commands, types
from os import system, unlink, symlink, getcwd, mkdir, utime
from shutil import move, copy, copytree, rmtree
###
### Globals
###
GTK_DIR="/Library/Frameworks/GTK+.framework/Versions/Current"
NAME = 'Gajim'
VERSION = '0.11'
DESCRIPTION = 'A full featured Jabber client'
AUTHOR = 'Gajim Development Team'
URL = 'http://www.gajim.org/'
DOWNLOAD_URL = 'http://www.gajim.org/downloads.php'
LICENSE = 'GPL'
PWD = getcwd()
APP_RS = "dist/Gajim.app/Contents/Resources"
GAJIM_SCRIPT = \
'#!/bin/bash \n\
export DYLD_LIBRARY_PATH=%s/lib \n\
export PATH=%s/bin:$PATH \n\
exec ${0}.bin \n\
' % (GTK_DIR, GTK_DIR)
GAJIM_REMOTE_SCRIPT = \
'#!/bin/bash \n\
export DYLD_LIBRARY_PATH=%s/lib \n\
TOPDIR=${0%%/MacOS/gajim-remote} \n\
echo "${TOPDIR}" | grep -e "^/" \n\
[ $? -ne 0 ] && TOPDIR=`pwd`/${TOPDIR} \n\
export RESOURCEPATH=${TOPDIR}/Resources \n\
export PYTHONHOME=${RESOURCEPATH}/lib/python2.5 \n\
export PYTHONPATH=${RESOURCEPATH}/lib/python2.5/lib-dynload:${RESOURCEPATH}/lib/python2.5/site-packages.zip:${PYTHONPATH} \n\
cd ${RESOURCEPATH} \n\
exec ${TOPDIR}/MacOS/Python ${RESOURCEPATH}/gajim-remote.py $* \n\
' % GTK_DIR
###
### Functions
###
def check(ret):
if type(ret) == types.ListType:
if ret[0] != 0:
raise Exception("Command failed: " + ret[1])
elif type(ret) == types.IntType:
if ret != 0:
raise Exception("Command failed")
return
def force(func):
try:
func()
except:
pass
return
def writeScript(filename, contents):
script = file(filename, "w+")
script.write(contents)
script.close()
system("chmod +x %s" % filename)
return
def cleanup():
force(lambda:rmtree("build"))
force(lambda:rmtree("dist"))
def stageInstall():
check(system("make DATADIR=%s/build/inst LIBDIR=%s/build/inst prefix=%s/build/inst DOCDIR=%s/build/inst/share/doc install" % (PWD, PWD, PWD, PWD)))
force(lambda:unlink("src/osx/growl/_growl.so"))
force(lambda:unlink("src/osx/growl/_growlImage.so"))
force(lambda:unlink("src/osx/idle.so"))
force(lambda:unlink("src/osx/nsapp.so"))
force(lambda:unlink("src/osx/syncmenu.so"))
force(lambda:unlink("src/gtkspell.so"))
symlink("%s/build/inst/lib/gajim/_growl.so" % PWD, "src/osx/growl/_growl.so")
symlink("%s/build/inst/lib/gajim/_growlImage.so" % PWD,
"src/osx/growl/_growlImage.so")
symlink("%s/build/inst/lib/gajim/idle.so" % PWD, "src/osx/idle.so")
symlink("%s/build/inst/lib/gajim/nsapp.so" % PWD, "src/osx/nsapp.so")
symlink("%s/build/inst/lib/gajim/syncmenu.so" % PWD, "src/osx/syncmenu.so")
if os.path.isfile("build/inst/lib/gajim/gtkspell.so"):
symlink("%s/build/inst/lib/gajim/gtkspell.so" % PWD, "src/gtkspell.so")
return
def buildApp():
sys.path.append('src')
sys.path.append(GTK_DIR + "/lib/python2.5/site-packages")
sys.path.append(GTK_DIR + "/lib/python2.5/site-packages/gtk-2.0")
OPTIONS = {'argv_emulation':True,
'excludes':'docutils,Crypto,dbus,OpenSSL,cairo,gtk,gobject,atk,pangocairo',
'iconfile':'data/pixmaps/gajim.icns',
'includes':'osx,ConfigParser,compiler,UserString,history_manager',
'plist':{'LSMinimumSystemVersion':'10.4.0',
'NSHumanReadableCopyright':'GNU General Public License',
'CFBundleIdentifier':'org.gajim',
'NSMainNibFile':'Gajim',
},
}
setup(
name = NAME, version = VERSION, description = DESCRIPTION,
author = AUTHOR, url = URL, download_url = DOWNLOAD_URL,
license = LICENSE,
app=['src/gajim.py'],
data_files=['data/nibs/Gajim.nib'],
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
return
def finishApp():
# setup gajim dirs
copytree("build/inst/share/gajim/data", APP_RS + "/data")
copy("data/pixmaps/gajim.icns", APP_RS + "/data/pixmaps")
copytree("build/inst/locale", APP_RS + "/locale")
copytree("build/inst/share/man", APP_RS + "/man")
force(lambda:unlink("dist/Gajim.app/Contents/data"))
symlink("Resources/data", "dist/Gajim.app/Contents/data")
copy("src/gajim-remote.py", "dist/Gajim.app/Contents/Resources")
# Nuke libs that are in the framework
move("dist/Gajim.app/Contents/Frameworks/Python.framework",
"dist/Gajim.app/Contents/Python.framework")
rmtree("dist/Gajim.app/Contents/Frameworks")
mkdir("dist/Gajim.app/Contents/Frameworks")
move("dist/Gajim.app/Contents/Python.framework",
"dist/Gajim.app/Contents/Frameworks/Python.framework")
# Adjust the running of the app
move("dist/Gajim.app/Contents/MacOS/Gajim",
"dist/Gajim.app/Contents/MacOS/Gajim.bin")
writeScript("dist/Gajim.app/Contents/MacOS/Gajim", GAJIM_SCRIPT)
# Setup the gajim-remote script
writeScript("dist/Gajim.app/Contents/MacOS/gajim-remote",
GAJIM_REMOTE_SCRIPT)
# Touch the top dir so Finder knows to update its idea of this bundle
utime("dist/Gajim.app", None)
return
def distApp():
force(lambda:rmtree("dist/Gajim"))
force(lambda:rmtree("dist/Gajim.tar.bz2"))
mkdir("dist/Gajim")
check(system("tar -cf - -C dist Gajim.app | tar -xf - -C dist/Gajim"))
copy("README.osx", "dist/Gajim/README")
copy("TODO.osx", "dist/Gajim/TODO")
check(system("tar -C dist -jcf dist/Gajim-OSX-`date | awk '{printf(\"%s-%s-%s\", $6, $2, $3);}'`.tar.bz2 Gajim"))
rmtree("dist/Gajim")
return
###
### Start
###
if ((len(sys.argv) != 2) or ((sys.argv[1] != "build") and
(sys.argv[1] != "dist"))):
print "usage: python setup_osx.py [build]"
print " or: python setup_osx.py [dist]"
sys.exit(1)
elif sys.argv[1] == "build":
sys.argv[1] = "py2app"
cleanup()
stageInstall()
buildApp()
finishApp()
elif sys.argv[1] == "dist":
distApp()
"""
Usage:
python setup_osx.py [build | dist]
"""
from setuptools import setup
import sys, glob, os, commands, types
from os import system, unlink, symlink, getcwd, mkdir, utime
from shutil import move, copy, copytree, rmtree
###
### Globals
###
GTK_DIR="/Library/Frameworks/GTK+.framework/Versions/Current"
NAME = 'Gajim'
VERSION = '0.11'
DESCRIPTION = 'A full featured Jabber client'
AUTHOR = 'Gajim Development Team'
URL = 'http://www.gajim.org/'
DOWNLOAD_URL = 'http://www.gajim.org/downloads.php'
LICENSE = 'GPL'
PWD = getcwd()
APP_RS = "dist/Gajim.app/Contents/Resources"
GAJIM_SCRIPT = \
'#!/bin/bash \n\
export DYLD_LIBRARY_PATH=%s/lib \n\
export PATH=%s/bin:$PATH \n\
exec ${0}.bin \n\
' % (GTK_DIR, GTK_DIR)
GAJIM_REMOTE_SCRIPT = \
'#!/bin/bash \n\
export DYLD_LIBRARY_PATH=%s/lib \n\
TOPDIR=${0%%/MacOS/gajim-remote} \n\
echo "${TOPDIR}" | grep -e "^/" \n\
[ $? -ne 0 ] && TOPDIR=`pwd`/${TOPDIR} \n\
export RESOURCEPATH=${TOPDIR}/Resources \n\
export PYTHONHOME=${RESOURCEPATH}/lib/python2.5 \n\
export PYTHONPATH=${RESOURCEPATH}/lib/python2.5/lib-dynload:${RESOURCEPATH}/lib/python2.5/site-packages.zip:${PYTHONPATH} \n\
cd ${RESOURCEPATH} \n\
exec ${TOPDIR}/MacOS/Python ${RESOURCEPATH}/gajim-remote.py $* \n\
' % GTK_DIR
###
### Functions
###
def check(ret):
if type(ret) == types.ListType:
if ret[0] != 0:
raise Exception("Command failed: " + ret[1])
elif type(ret) == types.IntType:
if ret != 0:
raise Exception("Command failed")
return
def force(func):
try:
func()
except:
pass
return
def writeScript(filename, contents):
script = file(filename, "w+")
script.write(contents)
script.close()
system("chmod +x %s" % filename)
return
def cleanup():
force(lambda:rmtree("build"))
force(lambda:rmtree("dist"))
def stageInstall():
check(system("make DATADIR=%s/build/inst LIBDIR=%s/build/inst prefix=%s/build/inst DOCDIR=%s/build/inst/share/doc install" % (PWD, PWD, PWD, PWD)))
force(lambda:unlink("src/osx/growl/_growl.so"))
force(lambda:unlink("src/osx/growl/_growlImage.so"))
force(lambda:unlink("src/osx/idle.so"))
force(lambda:unlink("src/osx/nsapp.so"))
force(lambda:unlink("src/osx/syncmenu.so"))
force(lambda:unlink("src/gtkspell.so"))
symlink("%s/build/inst/lib/gajim/_growl.so" % PWD, "src/osx/growl/_growl.so")
symlink("%s/build/inst/lib/gajim/_growlImage.so" % PWD,
"src/osx/growl/_growlImage.so")
symlink("%s/build/inst/lib/gajim/idle.so" % PWD, "src/osx/idle.so")
symlink("%s/build/inst/lib/gajim/nsapp.so" % PWD, "src/osx/nsapp.so")
symlink("%s/build/inst/lib/gajim/syncmenu.so" % PWD, "src/osx/syncmenu.so")
if os.path.isfile("build/inst/lib/gajim/gtkspell.so"):
symlink("%s/build/inst/lib/gajim/gtkspell.so" % PWD, "src/gtkspell.so")
return
def buildApp():
sys.path.append('src')
sys.path.append(GTK_DIR + "/lib/python2.5/site-packages")
sys.path.append(GTK_DIR + "/lib/python2.5/site-packages/gtk-2.0")
OPTIONS = {'argv_emulation':True,
'excludes':'docutils,Crypto,dbus,OpenSSL,cairo,gtk,gobject,atk,pangocairo',
'iconfile':'data/pixmaps/gajim.icns',
'includes':'osx,ConfigParser,compiler,UserString,history_manager',
'plist':{'LSMinimumSystemVersion':'10.4.0',
'NSHumanReadableCopyright':'GNU General Public License',
'CFBundleIdentifier':'org.gajim',
'NSMainNibFile':'Gajim',
},
}
setup(
name = NAME, version = VERSION, description = DESCRIPTION,
author = AUTHOR, url = URL, download_url = DOWNLOAD_URL,
license = LICENSE,
app=['src/gajim.py'],
data_files=['data/nibs/Gajim.nib'],
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
return
def finishApp():
# setup gajim dirs
copytree("build/inst/share/gajim/data", APP_RS + "/data")
copy("data/pixmaps/gajim.icns", APP_RS + "/data/pixmaps")
copytree("build/inst/locale", APP_RS + "/locale")
copytree("build/inst/share/man", APP_RS + "/man")
force(lambda:unlink("dist/Gajim.app/Contents/data"))
symlink("Resources/data", "dist/Gajim.app/Contents/data")
copy("src/gajim-remote.py", "dist/Gajim.app/Contents/Resources")
# Nuke libs that are in the framework
move("dist/Gajim.app/Contents/Frameworks/Python.framework",
"dist/Gajim.app/Contents/Python.framework")
rmtree("dist/Gajim.app/Contents/Frameworks")
mkdir("dist/Gajim.app/Contents/Frameworks")
move("dist/Gajim.app/Contents/Python.framework",
"dist/Gajim.app/Contents/Frameworks/Python.framework")
# Adjust the running of the app
move("dist/Gajim.app/Contents/MacOS/Gajim",
"dist/Gajim.app/Contents/MacOS/Gajim.bin")
writeScript("dist/Gajim.app/Contents/MacOS/Gajim", GAJIM_SCRIPT)
# Setup the gajim-remote script
writeScript("dist/Gajim.app/Contents/MacOS/gajim-remote",
GAJIM_REMOTE_SCRIPT)
# Touch the top dir so Finder knows to update its idea of this bundle
utime("dist/Gajim.app", None)
return
def distApp():
force(lambda:rmtree("dist/Gajim"))
force(lambda:rmtree("dist/Gajim.tar.bz2"))
mkdir("dist/Gajim")
check(system("tar -cf - -C dist Gajim.app | tar -xf - -C dist/Gajim"))
copy("README.osx", "dist/Gajim/README")
copy("TODO.osx", "dist/Gajim/TODO")
check(system("tar -C dist -jcf dist/Gajim-OSX-`date | awk '{printf(\"%s-%s-%s\", $6, $2, $3);}'`.tar.bz2 Gajim"))
rmtree("dist/Gajim")
return
###
### Start
###
if ((len(sys.argv) != 2) or ((sys.argv[1] != "build") and
(sys.argv[1] != "dist"))):
print "usage: python setup_osx.py [build]"
print " or: python setup_osx.py [dist]"
sys.exit(1)
elif sys.argv[1] == "build":
sys.argv[1] = "py2app"
cleanup()
stageInstall()
buildApp()
finishApp()
elif sys.argv[1] == "dist":
distApp()
SUBDIRS = common
SUBDIRS = common osx
CLEANFILES = \
trayicon.c
INCLUDES = \
$(PYTHON_INCLUDES)
export MACOSX_DEPLOYMENT_TARGET=10.4
if BUILD_GTKSPELL
gtkspelllib_LTLIBRARIES = gtkspell.la
......
......@@ -26,6 +26,7 @@
##
import sys
import re
import copy
import defs
......@@ -50,6 +51,16 @@ opt_treat_incoming_messages = ['', 'chat', 'normal']
class Config:
DEFAULT_ICONSET = 'dcraven'
if sys.platform == 'darwin':
DEFAULT_OPENWITH = 'open'
DEFAULT_BROWSER = 'open -a firefox'
DEFAULT_MAILAPP = 'open -a thunderbird'
DEFAULT_FILE_MANAGER = 'open'
else:
DEFAULT_OPENWITH = 'gnome-open'
DEFAULT_BROWSER = 'firefox'
DEFAULT_MAILAPP = 'mozilla-thunderbird -compose'
DEFAULT_FILE_MANAGER = 'xffm'
__options = {
# name: [ type, default_value, help_string ]
......@@ -108,10 +119,10 @@ class Config:
'sounds_on': [ opt_bool, True ],
# 'aplay', 'play', 'esdplay', 'artsplay' detected first time only
'soundplayer': [ opt_str, '' ],
'openwith': [ opt_str, 'gnome-open' ],
'custombrowser': [ opt_str, 'firefox' ],
'custommailapp': [ opt_str, 'mozilla-thunderbird -compose' ],
'custom_file_manager': [ opt_str, 'xffm' ],
'openwith': [ opt_str, DEFAULT_OPENWITH ],
'custombrowser': [ opt_str, DEFAULT_BROWSER ],
'custommailapp': [ opt_str, DEFAULT_MAILAPP ],
'custom_file_manager': [ opt_str, DEFAULT_FILE_MANAGER ],
'gc-hpaned-position': [opt_int, 430],
'gc_refer_to_nick_char': [opt_str, ',', _('Character to add after nickname when using nick completion (tab) in group chat.')],
'gc_proposed_nick_char': [opt_str, '_', _('Character to propose to add after desired nickname when desired nickname is used by someone else in group chat.')],
......