<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Katastrophos.net Blog &#187; Findings</title>
	<atom:link href="http://katastrophos.net/andre/blog/tag/findings/feed/" rel="self" type="application/rss+xml" />
	<link>http://katastrophos.net/andre/blog</link>
	<description>Chaotic solutions and random thoughts from the restless mind of a notorious problem solver (TM), by Andre Beckedorf</description>
	<lastBuildDate>Wed, 08 Feb 2012 00:04:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Setting up the Inno Setup compiler on Debian</title>
		<link>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/</link>
		<comments>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 23:36:22 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Findings]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Quasar Media Player]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/?p=180</guid>
		<description><![CDATA[I&#8217;m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows. The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed. I&#8217;m not a huge fan of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows.<br />
The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed.<br />
I&#8217;m not a huge fan of installers. But when it comes to creating a setup program for a given Windows application I&#8217;m quite accustomed to <a href="http://www.innosetup.com" target="_blank">Inno Setup</a> having used it for years. Unfortunately there is no native Linux version of the Inno Setup compiler available for Linux. <a href="http://nsis.sourceforge.net" target="_blank">NSIS</a> exists as package for Debian but I am not fond of using it, largely because I am a Delphi guy. :)<br />
So, here is a small guide on how to get the Inno Setup compiler up and running on Debian:</p>
<p>First step is to install <a href="http://www.winehq.org" target="_blank">Wine</a> either as super user or by using <strong>sudo</strong>:</p>
<pre name="code" class="bash:nocontrols">
sudo apt-get install wine
</pre>
<p>As normal user fire up your X server and your favourite terminal application and get the latest <a href="http://www.innosetup.com/isdl.php#qsp" target="_blank">Inno Setup QuickStart pack</a>:</p>
<pre name="code" class="bash:nocontrols">
mkdir /tmp/innosetup
cd /tmp/innosetup
wget http://files.jrsoftware.org/ispack/ispack-5.2.3.exe
wine ./ispack-5.2.3.exe
</pre>
<p>This will start the installer in Wine. Note, for the installation you will need a running X11 server since the installer obviously is graphical. If you have not set up Wine before, the default location <strong>C:\Program Files\Inno Setup 5</strong> will install to <strong>~/.wine/drive_c/Programme/Inno Setup 5</strong>.</p>
<p>Luckily the Inno Setup compiler offers a command line interface, ISCC.exe, which will run in Wine without the necessity of having a X server running. So it is ideally suited for automated runs.</p>
<p>Here is a simple wrapper shell script called <strong>iscc</strong>:</p>
<pre name="code" class="bash:nocontrols">
#!/bin/sh
unset DISPLAY
scriptname=$1
[ -f "$scriptname" ] &#038;&#038; scriptname=$(winepath -w "$scriptname")
wine "C:\Program Files\Inno Setup 5\ISCC.exe" "$scriptname" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"
</pre>
<p>I installed this script in my local bin directory (~/bin) and added it to the PATH environment variable.<br />
This will allow running the Inno Setup compiler from anywhere and it also makes it very easy to integrate into a build script. You can even feed a script via stdin, e.g. something like:</p>
<pre name="code" class="bash:nocontrols">
iscc - < ./myscript.iss</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2009/03/16/setting-up-the-inno-setup-compiler-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lazy source code comment stunts</title>
		<link>http://katastrophos.net/andre/blog/2008/12/30/lazy-source-code-comment-stunts/</link>
		<comments>http://katastrophos.net/andre/blog/2008/12/30/lazy-source-code-comment-stunts/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 00:31:08 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Delphi]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Findings]]></category>
		<category><![CDATA[Hack]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/?p=71</guid>
		<description><![CDATA[Double-Slash-Whole-Block-Commenting Here is a simple way to disable or enable whole code blocks with just two slashes: PHP / C++: /* Block (commented block) //*/ ///* Block (active block) //*/ Object Pascal/Delphi: (* Block (commented block) //*) //(* Block (active block) //*) Alternatively you can use { and } in the Object Pascal/Delphi example. Double-Slash-Whole-Block-Switching [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Double-Slash-Whole-Block-Commenting</strong></p>
<p>Here is a simple way to disable or enable whole code blocks with just two slashes:</p>
<p><strong>PHP / C++:</strong></p>
<pre name="code" class="c++:nocontrols">
/*
  Block (commented block)
//*/
</pre>
<pre name="code" class="c++:nocontrols">
///*
  Block (active block)
//*/
</pre>
<p><strong>Object Pascal/Delphi:</strong></p>
<pre name="code" class="delphi:nocontrols">
(*
  Block (commented block)
//*)
</pre>
<pre name="code" class="delphi:nocontrols">
//(*
  Block (active block)
//*)
</pre>
<p>Alternatively you can use <code>{</code> and <code>}</code> in the Object Pascal/Delphi example.</p>
<p><strong><br />
Double-Slash-Whole-Block-Switching (Object Pascal/Delphi only)</strong></p>
<p>The Object Pascal dialect used in Delphi supports three ways of commenting code, two for commenting whole blocks ( <code>{ }</code> and <code>(* *)</code> ) and one for commenting lines ( <code>//</code> ).<br />
We can exploit this feature to switch between two code blocks easily and fast:</p>
<p>Block 2 is in the enabled state:</p>
<pre name="code" class="delphi:nocontrols">
{
  Block 1  (commented block)
(*}
  Block 2  (active block)
//*)
</pre>
<p>Note, I am just adding two slashes in front of the first comment block to activate it again &#8211; similar to Double-Slash-Whole-Block-Commenting trick above. This will also magically disable the second block due to the way the comment marks are arranged:</p>
<pre name="code" class="delphi:nocontrols">
//{
  Block 1  (active block)
(*}
  Block 2  (commented block)
//*)
</pre>
<p>These tricks are probably applicable to other programming languages as well. Please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2008/12/30/lazy-source-code-comment-stunts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Q&#8230;/Free: Bug in QProcess writeToStdin</title>
		<link>http://katastrophos.net/andre/blog/2008/03/15/qfree-bug-in-qprocess-writetostdin/</link>
		<comments>http://katastrophos.net/andre/blog/2008/03/15/qfree-bug-in-qprocess-writetostdin/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 15:57:14 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Findings]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Quasar Media Player]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2008/03/15/qfree-bug-in-qprocess-writetostdin/</guid>
		<description><![CDATA[All right, this post is just to stop somebody else&#8217;s suffering in figuring out why writing to stdin in QProcess on Version 3.3.x-8 of Q&#8230;/Free doesn&#8217;t work on Windows. Well, actually it works but just for the first line you write to stdin. There is a bug in qprocess.cpp at line 730: void QProcess::writeToStdin( const [...]]]></description>
			<content:encoded><![CDATA[<p>All right, this post is just to stop somebody else&#8217;s suffering in figuring out why writing to stdin in QProcess on <a href="http://sourceforge.net/project/showfiles.php?group_id=49109&#038;package_id=42335" target="_blank">Version 3.3.x-8</a> of <a href="http://qtwin.sourceforge.net" target="_blank">Q&#8230;/Free</a> doesn&#8217;t work on Windows. Well, actually it works but just for the first line you write to stdin. There is a bug in qprocess.cpp at line 730:</p>
<pre name="code" class="c++:nocontrols:firstline[727]">
void QProcess::writeToStdin( const QString&#038; buf )
{
    QByteArray tmp = buf.local8Bit();
    tmp.resize( tmp.size() - 1 ); // drop the implicit \0
    writeToStdin( tmp );
}
</pre>
<p>should be:</p>
<pre name="code" class="c++:nocontrols:firstline[727]">
void QProcess::writeToStdin( const QString&#038; buf )
{
    QByteArray tmp = buf.local8Bit();
    tmp.resize( buf.length() );
    writeToStdin( tmp );
}
</pre>
<p>Verision 3.3.7-7 includes the latter method, same as the latest Qt 4.3 sources. So, it&#8217;s actually a regression in 3.3.x-8. If you require the latest Qt 3 / Q&#8230;/Free for your open source application and need to write to some other processes&#8217; stdin, you can just use a wrapper workaround that uses the latter method and directly uses writeToStdin( const QByteArray&#038; buf ) instead of the QString variant.</p>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2008/03/15/qfree-bug-in-qprocess-writetostdin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rdesktop: Connect to Windows 7 and Vista with ClearType font smoothing enabled</title>
		<link>http://katastrophos.net/andre/blog/2008/03/10/rdesktop-connect-to-windows-vista-with-cleartype-font-smoothing-enabled/</link>
		<comments>http://katastrophos.net/andre/blog/2008/03/10/rdesktop-connect-to-windows-vista-with-cleartype-font-smoothing-enabled/#comments</comments>
		<pubDate>Sun, 09 Mar 2008 23:12:01 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Findings]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2008/03/10/rdesktop-connect-to-windows-vista-with-cleartype-font-smoothing-enabled/</guid>
		<description><![CDATA[So Windows Vista finally allows to enable ClearType font smoothing for Remote Desktop / Terminal Services sessions. Update: Windows XP SP3 does too! If you try to connect to a machine running Windows XP SP 3 or later using rdesktop, you won&#8217;t get smoothed font typing since at the time of this writing rdesktop does [...]]]></description>
			<content:encoded><![CDATA[<p>So Windows Vista finally allows to enable ClearType font smoothing for Remote Desktop / Terminal Services sessions. <strong>Update:</strong> Windows XP SP3 does too!<br />
If you try to connect to a machine running Windows XP SP 3 or later using <a href="http://www.rdesktop.org" target="_blank">rdesktop</a>, you won&#8217;t get smoothed font typing since at the time of this writing <a href="http://www.rdesktop.org" target="_blank">rdesktop</a> does not officially offer an option to control this feature. However, here is a workaround:<br />
<span id="more-68"></span><br />
<a href="http://www.rdesktop.org" target="_blank">rdesktop</a> allows to specify the RDP5 experience via the -x experience switch.<br />
One can either define one of three default experiences (modem, broadband, lan) or one can specify a raw hex value that is send to the server. </p>
<p><strong>NOTE: You can skip over this rather technical part, if you&#8217;re not interested in the details. You&#8217;ll find the workaround below.</strong></p>
<p>This hex value is actually a combination of defined bit flags. After some tinkering I found that the hex value 0&#215;80 will enable font smoothing for the connection.<br />
The file constants.h of the rdesktop sources contains these flags:</p>
<pre name="code" class="c:nogutter:nocontrols">
#define RDP5_DISABLE_NOTHING	0x00
#define RDP5_NO_WALLPAPER	0x01
#define RDP5_NO_FULLWINDOWDRAG	0x02
#define RDP5_NO_MENUANIMATIONS	0x04
#define RDP5_NO_THEMING		0x08
#define RDP5_NO_CURSOR_SHADOW	0x20
#define RDP5_NO_CURSORSETTINGS	0x40	/* disables cursor blinking */
</pre>
<p>So, naturally an additional flag constant can be defined like this:</p>
<pre name="code" class="c:nogutter:nocontrols">
#define RDP5_ENABLE_FONT_SMOOTHING 0x80
</pre>
<p>The file rdesktop.c would have to be extended preferably with an additional argument that controls the font smoothing.<br />
If you want to use font smoothing with rdesktop now you have to combine the flags (bitwise OR, addition will do too) and specify the result via the -x switch.</p>
<p><strong>Here is the workaround for the three defaults mentioned above:</strong></p>
<p><code><strong>rdesktop -x 0x8F</strong> mywinserver</code>&nbsp;&nbsp;&nbsp;# equals the <strong>modem default</strong> + font smoothing<br />
<code><strong>rdesktop -x 0x81</strong> mywinserver</code>&nbsp;&nbsp;&nbsp;# equals the <strong>broadband default</strong> + font smoothing<br />
<code><strong>rdesktop -x 0x80</strong> mywinserver</code>&nbsp;&nbsp;&nbsp;# equals the <strong>LAN default</strong> + font smoothing</p>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2008/03/10/rdesktop-connect-to-windows-vista-with-cleartype-font-smoothing-enabled/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Killerkitty</title>
		<link>http://katastrophos.net/andre/blog/2006/10/01/killerkitty/</link>
		<comments>http://katastrophos.net/andre/blog/2006/10/01/killerkitty/#comments</comments>
		<pubDate>Sun, 01 Oct 2006 21:03:28 +0000</pubDate>
		<dc:creator>Andre Beckedorf</dc:creator>
				<category><![CDATA[Findings]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2006/10/01/killerkitty/</guid>
		<description><![CDATA[Isn&#8217;t that cute? Visit Cute Overload for more&#8230; Blogged with Flock]]></description>
			<content:encoded><![CDATA[<p><a title="Visit Cute Overload!" href="http://katastrophos.net/andre/blog/wp-content/photos/mac_kitty.jpg" rel="lightbox[38]"><img src="http://katastrophos.net/andre/blog/wp-content/photos/thumb_mac_kitty.jpg" width="200" height="150" alt="Visit CuteOverload!"/></a><br />
Isn&#8217;t that cute?<br />
Visit <a href="http://mfrost.typepad.com/cute_overload/2006/09/get_back_to_wor.html" target="_blank">Cute Overload</a> for more&#8230;</p>
<p style="text-align: right; font-size: 8px">Blogged with <a href="http://www.flock.com/blogged-with-flock" title="Flock" target="_new">Flock</a></p>
]]></content:encoded>
			<wfw:commentRss>http://katastrophos.net/andre/blog/2006/10/01/killerkitty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

