How To - Make a DMG package from GNS3

Posted by Ahsan Tasneem | 9:50 PM | , , , , , , | 0 comments »


This step-by-step procedure will show you how to make a DMG package from the GNS3 source code. I’ve built the package on Mac OS X Snow Leopard and used Py2app to make a Mac OS X application. Also, have a look at this article that really helped me.
This procedure worked for me, please let me know if you encounter any issue and I’ll update it. Also, please tell me if you can make it work on Mac OS X Leopard (10.5.x).

Setting up Python

First, install zlib library:
wget http://zlib.net/zlib-1.2.5.tar.gz
tar xzf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure --64
make
make test
sudo make install
Compile and install the latest version of python:
wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tar.bz2
tar xvjf Python-2.6.5.tar.bz2
cd Python-2.6.5
./configure --with-universal-archs=intel --enable-universalsdk=/ --enable-shared
make
make test
sudo make install

Setting up Qt and PyQt

Install Qt libraries:
To limit the DMG size, I compiled a minimum of components.
wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz
tar xvzf qt-everywhere-opensource-src-4.6.2.tar.gz
cd qt-everywhere-opensource-src-4.6.2
./configure -arch x86_64 -cocoa -no-dbus -no-cups -no-nis -no-openssl -no-scripttools -no-libtiff -no-libmng -no-script -no-javascript-jit -no-webkit -no-phonon-backend -no-phonon -no-audio-backend -no-multimedia -no-xmlpatterns -no-qt3support  -no-accessibility -opensource -no-dwarf2  -qt-libpng  -qt-libjpeg -no-multimedia -no-mediaservices
make
sudo make install
Install sip:
tar xvzf sip-4.10.2.tar.gz
wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.10.2.tar.gz
python configure.py
cd sip-4.10.2
make
sudo make install
Install PyQt:
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.7.3.tar.gz
tar xvzf PyQt-mac-gpl-4.7.3.tar.gz
cd PyQt-mac-gpl-4.7.3
python configure.py -q /usr/local/Trolltech/Qt-4.6.2/bin/qmake
make
sudo make install

Setting up Py2app

Install setup tools:
wget http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
mv setuptools-0.6c11-py2.6.egg.sh setuptools-0.6c11-py2.6.egg
sh setuptools-0.6c11-py2.6.egg
Install macholib:
mkdir macholib
cd macholib
svn co http://svn.pythonmac.org/macholib/macholib/trunk/ .
python setup.py install
Install a patched version of py2app with 64-bit support:
You will need to install mercurial if you haven’t already.
hg clone http://hg.hardcoded.net/py2app
cd py2app
python setup.py install

Making the DMG package

Now you can download the source and make the DMG. If you are interested in the details, have a look at setup.py where you can find every instruction to tell py2app how to make an Mac OS X application from GNS3.
wget http://code.gns3.net/gns3-devel/archive/tip.tar.bz2
tar xvjf tip.tar.bz2
cd gns3-devel-xxx
wget http://downloads.sourceforge.net/gns-3/dynamips-0.2.8-RC2-OSX-Leopard.intel.bin?download
mv gns3 gns3.py
python setup.py py2app
If everything work, you should find the DMG the the dist directory.






Related Articles
How To - Run GNS3 on Mac OS X


0 comments

Related Posts Plugin for WordPress, Blogger...