EvilDir, create an EVIL named directory in Windows

A little “fun” Qt5 console application to create a directory (a.k.a. folder) ending with a space character (” “). This directory can not be removed with standard Windows tools, including most console applications.

#include <QCoreApplication>
#include <QDir>

int main(int argc, char *argv[])
{
  QCoreApplication a(argc, argv);

  QString evil_dir_name("Remko is a little Evil !!! ");

  for(int i=1; i<a.arguments().count(); i++)
  {
    if(a.arguments().at(i).compare("-d", Qt::CaseInsensitive) != 0)
    {
      evil_dir_name = a.arguments().at(i);
      evil_dir_name.append(" ");
      break;
    }
  }

  if(a.arguments().contains("-d"))
  {
    if(QDir(evil_dir_name).exists())
    {
      QDir().rmdir(evil_dir_name);
    }
  }
  else
  {
    QDir().mkdir(evil_dir_name);
  }
 
  return 0;
}

Color Picker 1.1

I build a simple Color Picker 1.1 application that samples the pixel color under the mouse cursor point (because I needed it). The application is a stand alone (static build) Qt5 application with some minor Win32 API stuff, to sample the color at the cursor position.

ColorPicker 1.1

The application supports a number of RGB based color formats and formating formats. The application can run in the background, and used the CTRL+1, CTRL+2, and CTRL+3 hotkey combinations to sample a color in one of its three sample slots. The CTRL+SHIFT+1, CTRL+SHIFT+2, and CTRL+SHIFT+3 hotkey combinations can be used to copy the sample slot content to the clibboard. This enables easy copy and paste access to the sampled color values.

Reduce size (static) executables

This little (cross-platform) executable compression tool Ultimate Packer for eXecutables (UPX) can greatly reduce the size of (static build) executables. The executable filesize will be reduced to the size of a ZIP file containing the same executable.

The tool is very easy to use, just drag-and-drop your executable onto the upx.exe to use the default (fast) compression option of the tool, or type “upx <filename>” in the command-line. Adding the (much slower) “–utra-brute” command-line argument will reduce the filesize even further.

A static build Qt5.1.1 MinGW compiled application with a filesize of 12.972.032 bytes (12.3MB):

DEFAULT: 12.972.032 bytes (12.3MB) is reduced to 5.218.816 bytes (4.97 MB) using the (fast) default settings.

ULTRA-BRUTE: 12.972.032 bytes (12.3MB) is reduced to 4.488.704 bytes (4.28 MB) using the (much slower) “–ultra-brute” argument.

Qt 5.1.1 static build with MinGW

This is a small step-by-step howto compile a static Qt5.1.1 framework from source, using the MinGW 4.8.1 development environment.

Download MinGW Installer:
http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/

Download Qt5 Source Zip:
http://download.qt-project.org/official_releases/qt/5.1/5.1.1/single/qt-everywhere-opensource-src-5.1.1.zip

Patch mkspecs (line 69):
<Qt5.1.x>\qtbase\mkspecs\win32-g++\qmake.conf

QMAKE_LFLAGS = -static -static-libgcc

Patch mkspecs (line 28) optional (reduce file size static builds):

QMAKE_CFLAGS = -ffunction-sections -fdata-sections ...

Patch Makefile.win32 (line 50):
<Qt5.1.x>\qtbase\qmake\Makefile.win32

LFLAGS = -static-libgcc ...

Patch for MinGW 4.8.1 (older MinGW 4.6.x works with-out patch):
https://codereview.qt-project.org/#change,63747

Replace file with patched version:
<Qt5.1.x>\qtbase\src\corelib\ioqfilesystemengine_win.cpp
https://codereview.qt-project.org/#patch,sidebyside,63747,3,src/corelib/io/qfilesystemengine_win.cpp

Patch for MinGW 4.8.1 (older MinGW 4.6.x works with-out patch):
https://codereview.qt-project.org/#change,64330,patchset=1

Replace file with patched version:
<Qt5.1.x>\qtbase\src\plugins\platforms\windows\qwindowstheme.cpp
https://codereview.qt-project.org/#patch,sidebyside,64330,1,src/plugins/platforms/windows/qwindowstheme.cpp

Python (needed by the qtjsbackend to fix the v8 error):
http://www.python.org/download/releases/

Add Python to Path:

set PATH=%PATH%;C:\Python33

Add MinGW to Path:

set PATH=%PATH%;C:\MinGWx32\mingw32\bin

Configure in <Qt5.1.x>\:

configure -platform win32-g++ -release -static -opensource -no-opengl -qt-zlib -qt-libpng -qt-libjpeg -nomake examples

Build with MinGW make in <Qt5.1.x>\:

mingw32-make -j

Build with Qt Creator:

Tools->Options
Build & Run
Compilers -> Add MinGW used to build Qt5.1.x -> Add->MinGW -> Browse to <MinGW>\bin\g++.exe (Apply)
Qt Versions -> Add Qt5.1.x static MinGW build -> Add -> browse to <Qt5.1.x>\qtbase\bin\qmake.exe (Apply)
Kits -> Add Qt5.1.x static with MinGW compiler -> Add -> compiler:MinGW & qtVersion:Qt5.1.xStaticMinGW & qtmkspecs:win32-g++

Ready to build !!!

Coffee Tray 1.0 App for the iPad

Your relationships with your colleagues is important! Provide some work delight by getting a round of coffee once in a while (or get some colleague to do it for you).

Coffee Tray 1.0 main screen

This application will help you to remember and transport the hot beverage of choice for up-to five colleagues (plus one additional beverage for your self). Make great use of the perfectly flat surface of your own (or the companies) iPad.

Coffee Tray 1.0 icon

The current version provides a width range of hot beverages to choose from:
– Coffee black
– Coffee sugar
– Coffee creamer
– Coffee sugar & cream
– Bean coffee black
– Bean coffee sugar
– Cappuccino
– Cappuccino sugar
– Espresso
– Espresso sugar
– Chocolate
– Chocolate sugar
– Tea
– Tea sugar
– (Hot) Water

Start using the full office environment potential of your iPad today, and download this application!

Coffee Tray 1.0 selection screen

Apples reason to not approve the application for the App Store:
“We found your app encourages behavior that could result in damage to the user’s device, which is not in compliance with the App Store Review Guidelines.

Specifically, your App encourages the user to transport hot liquids on the device.”