Friday, July 31, 2009

Little bit about my Dictionary (Part One)


I made a small English to Bengali dictionary based on Qt4. In this post I gonna describe the environment setup process for it. I was so excited cause it was my first opensource desktop project.

Properties of the project:
Primary language: C++
Primary toolkit: QT4
Primary IDE: CodeBlocks with MinGW,QDevelop
Objective: Open Source cross platform English to Bengali Dictionary.
Setting Up the Environment:
OS: Windows XP
#install codeblocks-8.02mingw.I used C:\Program Files\CodeBlocks path
use gcc as default compiler
#install qt-win-opensource-4.4.3-mingw I used C:\Qt4 path
#install Qdevelop (optional)
Setting up environment variables:
Right click on My Computer and open properties box. Click on the advanced tab and go to
Environment Variable option.On user variable area click on New button and set the following
environment variables.

Variable name: PATH
Variable Values: C:\Qt\4.4.3\bin;C:\Program Files\CodeBlocks\MinGW\bin;
Variable name: QMAKESPEC
Variable Values: win32-g++
Variable name: QTDIR
Variable Values: C:\Qt\4.4.3

You may need to restart windows.
Go to Start menu..Run...cmd
Give the command:

qmake -v
make -v
gcc -v

Go to C:\Program Files\CodeBlocks\mingw\bin and create a batch file named make.bat
file: make.bat
contained text:

@echo off
mingw32-make %*

run that batch file from cmd.
then u will have to type make instead of mingw32-make
***In Windows You must Enable Unicode based Bengali.You can use a Bangla Keyboard Utility
which supports Unicode.***
OS: Linux
Install g++,QT4 with your package manager or from source code.
Compiling Shadhinota:
Command line compilation:
go to source folder from command line and give the following command:

qmake -project
qmake
make

Compiling using Qdevelop:
Open Qdevelop
Click on Project menu
select Open Project and open the *.pro file of Shadhinota's source directory.
Use Build or Rebuild option from Build menu.
Run the executable from the source folder.
Under Windows:
copy the mingwm10.dll,QtCore4.dll,QtCored4.dll,QtGuid4.dll from codeBlock/mingw/bin
and Qt4.4.3/bin directory to your executable's directory for portability.

In the next post I will write about the GUI part of Shadhinota and the algorithm
used in this software.

No comments: