Archive

Author Archives:

Since there is a guide on how to build emesene on Windows, I thought I would make a similar guide for OS X.

These instructions are for Snow Leopard and Lion only!

Prerequisites:

  • Git
  • A Text Editor

Method:

Step 1: Create a working directory

Open Terminal and run:

mkdir ~/Desktop/emeseneworkingdir && cd ~/Desktop/emeseneworkingdir

(you can change this to whatever you want, make a note of it as you will need it later)

Step 2: Building PyGTK

emesene uses the PyGTK toolkit to provide a GUI, unfortunately it is a pain in the ass to get working on OS X. I recommend using a prebuilt binary like this one. If you are building from source please change the install path to /Applications/emesene.app/Contents/Resources/gtk. Guides for building PyGTK on OS X  can be found using Google.  You will also need to build PyCrypto if building from source. If using JHBuild edit ~/.jhbuildrc to change the install path. Once gtk has been built or downloaded, copy the gtk folder into the working directory you created earlier.

Step 3: Get the required files

Platypus expects certain files to be present in your working directory, these are:

  • emesene.sh (main shell script)
  • emesene.icns (icon file)
  • gtk (pygtk directory)
  • Uninstall.command (the uninstaller, only needed for release)
  • emesenedmg.png (dmg background, only needed for release)
  • emesenepygtkpatch.patch (patch for emesene to work with gtk)

All of these can be found in reqfiles.zip (except gtk, you should have that already from step 2)
Open Terminal and run:

curl -o reqfiles.zip http://sidhosting.co.uk/misc/emesene/reqfiles.zip
unzip reqfiles.zip
rm reqfiles.zip && rm -r __MACOSX

Step 4: Install Platypus

Download Platypus from here and drag to your applications folder. Open Platypus, click on preferences and click the “Install” button where it say “Command line tool”.

Step 5: Build emesene

First we need to fetch my build script.

curl -O http://sidhosting.co.uk/misc/emesene/build && chmod +x build

Open up build in a text editor and at the top where it says builder variables change workdir and buildpath to suit your needs. If your workdir is inside your home directory, please use /Users/USER/Desktop rather than ~/Desktop.

The emesene builder works in two ways, it can either create a local version for use on your own machine or it can create a release version of emesene.

The build script takes three variables: version, build, release/local

So to build emesene version 2.12.3 build 1 for release you would run the following in Terminal:

./build 2.12.3 1 release

So to build emesene version 2.12.4-dev build 2 for your own local use you would run the following in Terminal:

./build 2.12.4-dev 2 local

If you  get an error saying “…. not identified as an Apple .icns file” do not worry about it.

You should now have a emesene.app  on your desktop (local use) or an emesene folder (release use)

Emesene is now ready to go!

N.B. To build a newer version of emesene, just run ./build again, setting the variables to the version and build you want to create. You do not need to repeat steps 1-4.

Recently I decided, to redesign the site’s downloads system. Originally I was using the excellent PHP Click Counter from PHPJunkyard to count downloads. However the script was far from perfect and presented problems each time I released a new download. For the revamp I decided I wanted to use MySQL databases to store the data. Unfortunately I could not find a script which would do exactly what I required. So I made my own.

Three hours later the PHP and MySQL Link/Download Tracker was born.

What it does: The script will count link clicks and store its results in a database.

Setup:

  1. Create a new database using you web hosts control panel
  2. Select your new database in Phpmyadmin
  3. Go to the query tab and paste the following in the box:
    CREATE TABLE `Data` (
    `id` VARCHAR( 50 ) NOT NULL ,
    `count` INT( 10 ) NOT NULL default '0' ,
    PRIMARY KEY ( `id` )
    ) ENGINE = MYISAM ;
  4. Open up config.php and change the database values to match your settings
  5. Open up get.php and change the id’s and url’s in the links array to reflect the id’s you want to use. See below for an example:
    $links = array(
    "mydownload1" => "http://some.site/mydownload1.zip",
    "mydownload2" => "http://some.site/mydownload2.zip"
    );

    So if your download was called mytest, you would change mydownload1 to mytest and set the url to the download url of the file. You can add as many id’s as you wish.

  6. Upload get.php, show.php and config.php to your server
  7. Done

Usage:

The script is called like this: /get.php?id=mydownload1

So instead of linking to /mydownload1.zip, link to /get.php?id=mydownload1

To show your download stats simply call show.php rather than get.php

Download
Source

Update: See here.

In the next few months the emesene OS X build is going to change dramatically. The new version will include:

  • Sparkle integration
  • A 64 bit binary
  • A rewritten uninstaller
  • Various other Mac OS X integration tweaks

emesene menu check for updates
emesene with a touch of sparkleemesene 64bit

These changes are ready, i am purely waiting for Sparkle to be updated to work with Lion. If you are running Snow Leopard and are interested in beta testing the new version, please contact me.

Due to the hard work of Gabriele “Whisky” Visconti, emesene 2 now has a Qt interface. The interface needs a lot of work, but it is a step toward integrating emesene with OS X. If you want to get the Qt interface working on Snow Leopard, follow the instructions below.

Update: As pointed out by Gabriele “Whisky” Visconti, you will also need GObject and PyCrypto. For instructions on how build/install these see here.

  1. Download Qt from here (You want the Cocoa binary package)
  2. Mount the DMG and install the Qt package
  3. Download SIP from here (You want Linux, UNIX, MacOS/X source)
  4. Unzip the downloaded file
  5. Move the unzipped folder to your home directory
  6. Open terminal and run:
    cd sip-x.x.x (Change depending on SIP version)
    python setup.py
    make
    sudo make install
  7. Download PyQt from here (You want MacOSX/source)
  8. Unzip the downloaded file
  9. Move the unzipped folder to your home directory
  10. Open terminal and run:
    cd PyQt-mac-gpl-snapshot-x.x-xxxxx
    python setup.py
    make
    sudo make install
  11. Download the latest version of emesene from GitHub and unzip
  12. Test it out
    cd /emesene-emesene-xxxxxx
    ./emesene -e main:qt4_main
  13. You can delete the folders you moved into your home directory if you wish

Note: This guide is pretty outdated, use at your own risk

You will need:

  • Git (http://code.google.com/p/git-osx-installer/downloads/list?can=3)
  • Apple developer tools
  • A text editor (I recommend TextMate)
  • Terminal

NOTE: IF YOU HAVE USED MACPORTS/FINK, REMOVE ALL TRACES OF IT BEFORE CONTINUING

I assume you want to install gtk at ~/gtk, if not change the instructions accordingly.

First we need to install JHBuild:

curl -o gtk-osx-build-setup.sh https://raw.github.com/jralls/gtk-osx-build/master/gtk-osx-build-setup.sh
sh gtk-osx-build-setup.sh

Once JHBuild is installed run these commands:

PATH=$HOME/.local/bin:$PATH
export PATH

By default JHBuild will install gtk to ~/gtk, if you want a different location edit ~/.jhbuildrc and change the install directory.

We are now ready to build GTK:

jhbuild bootstrap
jhbuild build meta-gtk-osx-bootstrap

Now we need to edit ~/.cache/jhbuild/gtk-osx.modules and remove the line:

<patch file=”https://github.com/jralls/gtk-osx-build/raw/master/patches/gtk-relocation.patch” strip=”1″/>

Once done run:

jhbuild build meta-gtk-osx-core
jhbuild build meta-gtk-osx-python

If you get this error: “checking whether to build Python bindings… configure: error: Couldn’t find the required Python tools.” See here.

Optional: Edit file: ~/.cache/jhbuild/gtk-osx-themes.modules and disable all engines except for clearlooks by adding:

autogenargs="--disable-all --enable-clearlooks"

Then build the themes:

jhbuild build meta-gtk-osx-themes

GTK and PyGTK should now have been built.

Now navigate to ~/gtk/inst/lib/python2.6/site-packages and copy the contents of the site-packages folder to /Library/Python/2.6/site-packages

Or run:

echo "import site; site.addsitedir('~/gtk/inst/lib/python2.6/site-packages')" && /Library/Python/2.6/site-packages/gtkredirect.pth

Next we need to build Pycrypto:

curl -o pycrypto-2.3.tar.gz http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.3.tar.gz
tar -xf pycrypto-2.3.tar.gz
cd pycrypto-2.3
sudo python setup.py install
mv /Library/Python/2.6/site-packages/Crypto ~/gtk/inst/lib/python2.6/site-packages

Now all the dependencies are in place, lets download emesene 2 from GitHub.

git clone https://github.com/emesene/emesene.git
cd emesene
git submodule init
git submodule update

Now browse to navigate to the emesene/emesene directory and double click the executable.

Enjoy!

emesene 2 about

emesene 2 beta is here. MSN works, Jabber works and it is pretty stable. No need for complex hacking of emesene files to run it. Simple drag and drop to install.

Currently sounds are not working and there is no theme at the moment.

Some more pictures…

emesene 2 chat window

emesene 2 contact list

emesene 2 login window

emesene 2 service selector

Interested?

A beta will be available soon. Request to be a beta tester and then check the beta page.

Update:

emesene 2 with clearlooks theme

We have GTK theme engines at last. Currently ClearLooks is included but Murrine and other engines will be included in the future.

I guess you could call this a plea for help…

I am having serious problems getting emesene 2 to run on OS X. Currently Papyon will not work, libpyglib keeps crashing and the menu bar does not work.

Without Papyon, WLM does not work. Rather a large problem in a WLM client.

PyGlib Problem

If you know how to fix any of these problems, please fork the emesene repo and contact me if you manage to get emesene 2 running successfully.