Installing Qt, QtCreator and MinGW for Windows

Ever thought of developing simple & nice cross-platform applications without sweating? Nokia Qt C++ frameworks empowers you to do so. To get started, first install the Qt SDK with IDE and of course famous GNU compiler chain GCC, branded under MinGW for Windows.

Get the framework, IDE & tool chain from: http://qt.nokia.com/downloads/sdk-windows-cpp

If you are interested in particular parts of MinGW, look here: http://sourceforge.net/projects/mingw/files/

Just follow default steps and you are safe. If you are interested in free M$ C/C++ compiler, just download the Qt source and build it yourself.

Now you are ready to play with magic. To appreciate Qt, run QtDemo and also watch some clips & read some stuff:

http://labs.trolltech.com/blogs/author/qtdeclarative/

Building OpenSSL with MinGW on Windows

A number of libraries applications depend on OpenSSL, to name a few: cURL, QtNetwork, WebKit, your IMAP or secure SMTP client, etc. Building of OpenSSL is painstaking, unless you know some tricks. Read more for guidance.

  1. If you yet to have MinGW, read to learn how to install it.
  2. Download Perl from ActiveState site: . Choose version that match your Windows. MSI installer is recommended, unless you are so fluent in Windows and don’t mind spending time with little tweaks like adding PATH, etc
  3. Run the MSI installer and point path to C:\develop\tools\perl . You may choose different path, but that’s what on my machine.
  4. Having installed with Perl, now let’s fetch OpenSSL: (the latest version of OpenSSL 0.9.8 at the time of writing).  I wouldn’t recommend chasing after the version 1.0 for now.
  5. Extract openssl to C:\develop\tools\ and you will obtain directory C:\develop\tools\openssl-0.9.8n . Get inside it.
  6. Before you start building anything, take note that the macro OPENSSL_IMPLEMENT_GLOBAL causes fatal errors. Find it inside the files openssl-0.9.8n\e_os2.h , openssl-0.9.8n\include\openssl\e_os2.h and openssl-0.9.8n\outinc\openssl\e_os2.h . Find the macro’s definition and change

static type _hide_##name

to

/* static type _hide_##name */ type _hide_##name

  1. Now let’s build shared & static versions of OpenSSL with a single command (you are now inside C:\develop\tools\openssl-0.9.8n):

ms\mingw32.bat shared

Navigate to YouTube and have some snack. It may take 15-20 mins to finish building.

  1. When building is finished, you can copy outinc\openssl to your mingw\include directory. You also can copy generated *.a and *.dll files to mingw\lib directory and the *.dll to mingw\bin directory. If you hate copying, remember to make use of -I and -L flags to appropriate folders when building with MinGW.

Building & installation of OpenSSL is done.

Edit: As noted by Darrell Walisser in the comments part, Perl distributed with msys was the culprit. Installing ActiveState Perl will solve the issue without this workaround. Thanks Darrell!

References:

[1]

Chrome wins Safari by a few tipping points

A winner app does not need a mind blowing or much superior feature or difference. Many times, a small bit of improvement can make a huge difference in user satisfaction and perception. Seeing Safari or Firefox designs, I perceive them as “heavy” and “slow”. Their design filled with dark colors and appear to be very “thick”. Chrome, conversely, delivers lightweight look and feel through its design. Lightweight appearance of Chrome makes me feel more pleasing and feel it much faster than Safari and Firefox. Opera design is even worse. 

Not only is Chrome more lightweight in design but also outperforms other GUI browsers. But that’s a huge topic. I just focus on little bits that make users more satisfied and better informed. I tried uploading files to IVLE https://ivle.nus.edu.sg/ countless number of times using Safari and it stalls on medium and big uploads (300KB and more). It sit clueless and impatience takes over me when I have to upload submission over 9MB. There are no indication of speed, progress or even a single notice like “loading” or “uploading”. Firefox does not do much better. Chrome is different. It keeps me informed about the progress. It’s just a tiny bit but has big impact: I know that it’s running, I know the progress and I can expect when it finishes and I feel staying in control. Here’s the tiny screenshot that makes me happy:

I deduce that good design and good application cares about keeping users informed, making them feel staying in control and reduces the degree of uncertainties.

Posted via email from Scriptwriting

Posterous is awesome!

Learn few great thing about Posterous: You can create your themes and add custom domain for free! It’s super simple and no PHP needed, while WordPress requires designer to learn PHP to be able to create themes. One more thing, owners can publish by just sending an email. The technique is simple but the usability and convenience have been greatly improved.

There’s a few shortcomings too:

  1. No image embedding in web posting interface
  2. No predefined styles (such as H1, H2, Body Text, …) but only font sizes in web posting interface
  3. Searching sucks! I can never find anything, even tags and content match!

But one still can add images by going to the raw HTML editing. Here’s my image and YouTube:

 

 

 

Posted via web from Scriptwriter’s Creation

NTFS for Mac made easy

There are only 2 steps to enabled write option to NTFS partitions on Mac.

1. Install MacFUSE: http://code.google.com/p/macfuse/

2. Install NTFS-3G: http://macntfs-3g.blogspot.com/ , http://sourceforge.net/projects/catacombae/files/

You will be required to reboot and upon next start-up, you can write to NTFS partitions with ease. Successful installation will similar screenshot (MacFUSE & NTFS-3G at the bottom):

Successful installation of MacFUSE and NTFS-3G
Successful installation of MacFUSE and NTFS-3G

Recovery of 15GB+ of stolen space on Leopard

I’ve noticed that my Leopard partition suddenly got fat and GBs were gone somewhere. I decided to find out truth and hope for the way to get back that free space. I checked every single folder under the /. System folders were OK (access to them needs root permissions so clearly no one could dump garbage there). One important folder was suspicious, that was Users. I smelled that my home folder was that fat guy. It turned out right. Diving deeper into each sub-directory of my home folder, I found ~/Library extremely interesting: 15GB+. I was shocked how much garbage was collected in a few days time. It turned out that the Apple Mail was culprit. I downloaded everything it could from my GMail account. It weighed more than 14GB. I deleted that GMail account from Mail and then removed all related folders of that mail account inside ~/Library/Mail. Further, I found that Copernicus (a lousy screen recorder that I removed days before) has collected almost 700MB inside ~/Library/Application Support/Copernicus. I removed it with zero mercy and happy to see more than 15GB came back to me.

Building PyQt 4.7 on Leopard

PyQt is a great Python wrapper around Nokia Qt C++ framework. Binary release is not provided for Mac and Linux by the developers and maintainers of PyQt. No problem, you can build your own without sweating. 30 mins and you are done with it.

1. The first ever thing you have to do is install Qt release for Mac by Nokia: http://qt.nokia.com/downloads. For my case, it was Qt 4.6.2 (latest version).

2. The next step is to build QScintilla2. Go to your temporary directory and do the following:

[cc lang=”bash”]
wget http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.4.2.tar.gz
tar zxvf QScintilla-gpl-2.4.2.tar.gz
cd QScintilla-gpl-2.4.2
cd Qt4/
qmake -spec macx-g++
make
sudo make install
cd ..
[/cc]

3. Now proceed to building SIP

[cc lang=”bash”]
wget http://www.riverbankcomputing.co.uk/static/Downloads/sip4/sip-4.10.tar.gz
tar zxvf sip-4.10.tar.gz
cd sip-4.10
python configure.py
make
sudo make install
cd ..
[/cc]

4. The last step is to build PyQt. It’s pretty simple but may take up 20-30 minutes to build. Grab a meal or watch GAGS while waiting for it.

[cc lang=”bash”]
wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.7.tar.gz
tar zxvf PyQt-mac-gpl-4.7.tar.gz
cd PyQt-mac-gpl-4.7
python configure.py
make
sudo make install
cd ..
[/cc]

5. So you have PyQt ready! Go to the examples directory of PyQt-mac-gpl-4.7 and check the sample code, demos. Enjoy!