Zuhaib

A very lazy but meticulous blogger

Archive for May, 2009

Building The E-TextEditor On Ubuntu 9.04 64 Bit

with 10 comments

E-TextEditor a.k.a e is my favorite text editor on windows. AFAIK there is no text editor on linux that matches what e can do except for VIM. When I saw the post about making e open source I was pretty exited and wanted to try it out.

So I grabbed the source from GitHub and thought of building it. I am making this post to explain all the problems that I faced while building e. You may or may not face the same problem or you may face different problem altogether, so good luck.

Grab The Source

Download the latest source code from http://github.com/etexteditor/e/tree/master using the download button available or by using git tool to clone the repository.

Extract the source code somewhere and open the linux-notes.txt in your favorite text editor.

Downloading & Building E-TextEditor

I am a linux n00b so I choose the easiest way to build e according to linux-notes.txt

# The easiest way to build is to use the supplied scripts (example shows debug build):
cd external
sudo ./get-packages-ubuntu.sh bakefile
./get_externals_linux.sh
./build_externals_linux.sh debug
cd ..
cd src
make DEBUG=1
./e.debug

 

I face problem while getting external packages for linux and while building WebKit. The problem was get-packages-ubuntu.sh was unable to install libwxgtk2.8-dev due to header mismatch (Sorry but I don’t remember the exact error. I guess it includes wxWidgets header files) and the link to download tomcrypt and tommath libraries were not found.

I had to download wxWidget headers from their site. I downloaded the amd64 package because I am running Ubuntu 9.04 64 bit

http://apt.wxwidgets.org/dists/jaunty-wx/main/binary-amd64/wx2.8-headers_2.8.10.1-1_amd64.deb

The url’s mentioned in get-external-linux.sh to download tomcrypt and math libraries didn’t resolve because libtomcrypt.com is down at the moment.

wget -nc http://libtomcrypt.com/files/crypt-1.11.tar.bz2
wget -nc http://math.libtomcrypt.com/files/ltm-0.39.tar.bz2

So I had download the crypt-1.11.tar.bz2 and ltm-0.39.tar.bz2 files from http://safari.iki.fi/tom/. You need to be careful here download the exact version mentioned in the script or else it won’t compile.

Now that we have all the dependencies we are now ready to install them and then we can build e.

Install The Dependencies

Double click on the wx2.8-headers_2.8.10.1-1_amd64.deb file and then click on Install Package button to install the file.

Now its time to fix problems in get_external_linux.sh file. If you can write your own script after reading get_external_linux.sh its great, but I am lazy so I just created the arch directory inside the external directory and copied all the files that were supposed to be downloaded by the _download function.

_download()
{
    # Download external libraries
    echo "Downloading external libraries..."
    echo
    pushd arch
    wget -nc http://libtomcrypt.com/files/crypt-1.11.tar.bz2
    wget -nc http://math.libtomcrypt.com/files/ltm-0.39.tar.bz2
    wget -nc http://www.equi4.com/pub/mk/metakit-2.4.9.7.tar.gz
    wget -nc ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.6.tar.gz
    wget -nc http://kent.dl.sourceforge.net/sourceforge/tinyxml/tinyxml_2_5_3.tar.gz
    wget -nc http://biolpc22.york.ac.uk/pub/2.8.10/wxWidgets-2.8.10.tar.bz2
    wget -nc http://builds.nightly.webkit.org/files/trunk/src/WebKit-r43163.tar.bz2
    popd
}

I actually downloaded all the files mentioned in the _download function to some location to save me download time just in case if anything goes wrong. You may copy only the missing files and the script will download rest of the files.

Now run the get_external_linux.sh file again by issuing the command ./get_external_linux.sh.

Everything would work fine after this step (worked fine for me). Now issue rest of the commands

./build_externals_linux.sh debug
cd ..
cd src
make DEBUG=1

It will take sometime to complete all these commands. If you get any error here that mean something is wrong with the code and you are missing a patch. All you need to do now is Google the error or fix it yourself or post it here and wait for somebody to answer.

If everything goes fine as expected you can now see e.debug. But as you can see the size of e.debug file is more than 200MB use the strip command to remove all debug information.

# source : http://fixnum.org/blog/2009/e_on_fedora
strip e.debug -o e.stripped

 

Now you will have a e.stripped executable weighing approximately 26MB.

Getting Themes & Bundles

E-TextEditor will not run without the Themes & Bundles. So it needs to be downloaded and placed inside .e folder in your home directory. Issue the following commands to download and export e themes and bundles.

Install Subversion if you haven’t already.

sudo apt-get install subversion
svn checkout http://ebundles.googlecode.com/svn/trunk/ ebundles-read-onlysvn export ebundles-read-only ~/.e/

 

You will see an message Export Complete. Now you can run the e.stripped or e.debug and e should run.

e-texteditor

Though I was able to build and run E-TextEditor on my machine but its pretty much useless, it has got lots of bugs and it keeps crashing. I still have to download patches from e repository and rebuild my source.

Hope it helps

Written by Zuhaib

May 30th, 2009 at 5:35 pm

MSBuild Context Menu: Build .NET Project/Solution From Explorer

with 3 comments

Sometimes I don’t like opening visual studio just for building the latest source code from the repository. I don’t remember who wrote the original registry tweak for this, but the credit goes to the original author.

The original tweak allowed to compile Visual Studio 2005 solutions as I use Visual Studio 2008 I had to modify the original tweak to make it work with VS2008. Click Here to download the modified files.

image1

Unzip the files and you will see two folders. VS2005 is the original one and VS2008 is the modified version. Each  folder contains two registry files. One to add the commands to windows explorer and another to remove them. If you have both VS2005 and VS2008 installed on your machine you can add both the versions to the registry or you can add either of them.

image2 Once you have merged the files in your windows registry you can see two commands added to your explorer context menu when you right click on any solution or project file. One for Debug build and one for Release build.

When you click on either of the commands a command window will open and you can see you build status.

image3

Download the modified files MSBuild-VS2005-VS2008.zip

Credit goes to the original author.

Written by Zuhaib

May 15th, 2009 at 10:50 am

Installing Adobe Air and TweetDeck on Ubuntu 9.04 64 Bit

with 11 comments

After installing Ubuntu 9.04 x64 when I installed Adobe AIR and TweetDeck it all got installed normally, but TweetDeck or any other AIR application didn’t work.

As of now Adobe AIR binaries are not available for 64 bit OS. However, Adobe AIR 32 bit will work if 32 bit libraries and packages are installed. To install Adobe AIR on a 64 bit OS follow these instructions.

Download Adobe AIR Installer

Download the Adobe AIR Installer from http://get.adobe.com/air/

Download 32 bit Files

Now you need to install all the 32 bit dependencies. To do so use the getlibs utility from http://frozenfox.freehostia.com/cappy/ (thanks to Laurie Cope for the updated link)

After installing getlibs utility issue the following commands in the console.

zuhaib@NerdBox:/$ sudo apt-get install lib32asound2 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32z1 libc6 libc6-i386 lib32nss-mdns
zuhaib@NerdBox:/$ sudo apt-get install ia32-libs
zuhaib@NerdBox:/$ sudo getlibs -l libgnome-keyring.so
zuhaib@NerdBox:/$ sudo getlibs -l libgnome-keyring.so.0
zuhaib@NerdBox:/$ sudo getlibs -l libgnome-keyring.so.0.1.1

 

Install Adobe AIR

Open console and goto the change directory to the location where you downloaded Adobe AIR installer and issue the following commands.

zuhaib@NerdBox:~/Desktop$ chmod +x AdobeAIRInstaller.bin
zuhaib@NerdBox:~/Desktop$ sudo ./AdobeAIRInstaller.bin
zuhaib@NerdBox:~/Desktop$ sudo cp /usr/lib/libadobecertstore.so /usr/lib32

 

You are good to go now.

Sources

http://goblog.vergilhost.info/?p=5

http://kb2.adobe.com/cps/408/kb408084.html

Written by Zuhaib

May 6th, 2009 at 1:08 pm

Posted in How To,Ubuntu