Showing posts with label how-to. Show all posts
Showing posts with label how-to. Show all posts

Thursday, September 24, 2009

Building Qt4 for Windows using MSVC 2008

  1. Make directories C:\Qt\src and C:\Qt\build (the build procedure really doesn't like fancy paths, so do use something this simple)
  2. Download and unzip Qt Open Source SDK to C:\Qt\src
  3. Copy C:\Qt\src\qt\mkspecs C:\Qt\build\
  4. Open your Visual Studio Command Prompt
  5. $ "bin\vcvars32.bat"
  6. $ cd C:\Qt\src
  7. $ bin\qtenv.bat
  8. $ cd qt\
  9. $ configure -opensource -platform win32-msvc2008 -prefix C:\Qt\build
  10. $ nmake
  11. $ nmake install
  12. set QTDIR=C:\Qt\build
note: Qt will hard-code the prefix path into it's binaries. It cannot be relocated in the file-system.
note: if you get link errors warning about inability to find MOC-related problems (mine was in WebCore), you may want to delete the mocinclude.tmp file (src/3rdparty/webkit/WebCore/tmp/moc/{debug,release}_shared/mocinclude.tmp).

Tuesday, May 26, 2009

Compiling WebKit on Windows

  1. If you're doing any open source programming, you'll need to constrain yourself to the Cairo-based WebKit, as Apple's CoreGraphics-based rendering is non-redistributable.
  2. You'll need VS 2005, as anything newer isn't supported. If you're using Express edition, make sure you have the Windows Platform SDK.
  3. You'll need cygwin to run the build scripts. Make sure you install perl (in cygwin) -- but not GCC, as this may interfere with the scripts finding Visual Studio's compiler.
  4. If cygwin has any problems with "/r" character in text files, run the command "dos2unix $(find . -name '*.sh' -o -name '*.pm')" in "C:\cygwin\home\$username", to convert bash and perl files to UNIX new-lines.
  5. Run "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" to enable the path's needed to run the compiler from command line.
  6. Check out your source from SVN. Nightly tarballs have some sort processing step specific to the platform that may remove things you might want.
  7. Check out the SVN into "C:\cygwin\home\$username", as the build scripts assume this.
  8. Set the environment variables "WEBKITLIBRARIESDIR=C:\cygwin\home\$username\WebKitSupportLibrary\win" and "WEBKITOUTPUTDIR=C:\cygwin\home\$username\webkit\WebKitBuild".
  9. Configure WebCore/config.h to build with Cairo instead of "Safari", as according to this.
  10. Run WebKit/WebKitTools/Scripts/update-webkit
  11. Run WebKit/WebKitTools/Scripts/update-webkit-support-libs
  12. Run WebKit/WebKitTools/Scripts/update-webkit-auxiliary-libs
  13. Run WebKit/WebKitTools/Scripts/build-webkit --cairo-win32 --debug
  14. To be continued!

Saturday, June 9, 2007

how to add social bookmarking sites to your blogger footer

1. Click on Customize->Template->Edit HTML
2. Click the Expand Widget Templates button
3. Search for "post-footer-line-3" and place your links within the <p> tag
4. Your links would look something like this:
<a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&title=" + data:post.title' title="del.icio.us">

note: the expr namespace is necessary for the engine to convert the data:post into dynamic content for each post.

Monday, May 21, 2007

Smoking a pipe is a bit of an art form. When you can have a good smoke, its one of life's sublime, meditative pleasures. When you have a bad smoke, its an exercise in masochism that puts you off your pipe for months.

Recently, due to lack of a place where I could buy pipe-cleaners, my pipe had become clogged with tar, which was totally ruining the whole proposition -- but recently Ive found a method to clean it decently, and tonight I had a wonderful half-bowl that really elevated the evening.

1. Wait until the pipe is cool and disassemble it, wiping out the remains with a tissue.
2. Draw a thimble of dark rum (I hear scotch will also do), and grab a couple q-tips.
3. Dip the clean cotton end in the rum and swab the inside of the bowl and stem. The alcohol should act as a solvent to clean out the tar, but leave the desirable layer of carbon (cake) intact.
4. When the pipe is clean (about 3 q-tips), turn the pipe upside down an let the flame of your match dry the inside out. This should also carbonize the sugars in the rum to add to the clean layer of cake.
5. Rinse out your mouth with the remaining rum. After all, those same tars are left in your mouth as well.