<?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>Biplab's Blog &#187; C++</title>
	<atom:link href="http://biplab.in/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://biplab.in</link>
	<description>About My Passion</description>
	<lastBuildDate>Sun, 26 Apr 2009 03:37:05 +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>Creating Portable Code::Blocks: Part 2</title>
		<link>http://biplab.in/2009/04/creating-portable-codeblocks-part-2/</link>
		<comments>http://biplab.in/2009/04/creating-portable-codeblocks-part-2/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 15:07:41 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=83</guid>
		<description><![CDATA[To update all I have committed patch in trunk (in revision 5334). It should be available with the next nightly. To run Code::Blocks portably you can write a batch file, set APPDATA variable to any directory you want and then launch Code::Blocks. Alternatively you can download the CbLauncher v0.1.1 from my blog to run Code::Blocks [...]]]></description>
			<content:encoded><![CDATA[<p>To update all I have committed patch in trunk (in revision 5334). It should be available with the next nightly.</p>
<p>To run Code::Blocks portably you can write a batch file, set <strong>APPDATA</strong> variable to any directory you want and then launch Code::Blocks.</p>
<p>Alternatively you can download the <strong>CbLauncher v0.1.1</strong> from my blog to run Code::Blocks portably.</p>
<p>Steps to use Cblauncher:<span id="more-83"></span></p>
<ol>
<li>Download a nightly build with revision > 5334.</li>
<li>Extract them to a folder.</li>
<li>Extract CbLauncher.exe to  same folder. After extraction CbLauncher.exe and codeblocks.exe should be in same folder.</li>
<li>Now double click on on CbLauncher.exe file to run Code::Blocks in a portable manner.</li>
</ol>
<p>I&#8217;ve uploaded a binary package to the following link to try out Code::Blocks in a portable manner.</p>
<p><a href="http://files.filefront.com/Portable+CB+5526+bin7z/;13582845;/fileinfo.html" target="_blank">http://files.filefront.com/Portable+CB+5526+bin7z/;13582845;/fileinfo.html</a></p>
<p>CbLauncher package can be downloaded from this post&#8217;s attachment.</p>
<p><br class="spacer_" /></p>
<p>Known Issues:</p>
<ol>
<li>Code::Blocks still creates an empty folder inside USERPROFILE folder.</li>
</ol>
<p>Download link: <a href="http://biplab.in/wp-content/uploads/2009/04/cblauncher_v_0_1_1.7z">cblauncher_v_0_1_1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2009/04/creating-portable-codeblocks-part-2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Creating Portable Version of Code::Blocks</title>
		<link>http://biplab.in/2009/04/creating-portable-version-of-codeblocks/</link>
		<comments>http://biplab.in/2009/04/creating-portable-version-of-codeblocks/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 11:54:25 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=62</guid>
		<description><![CDATA[Recently I was irritated by the fact that Code::Blocks is not truly portable on Windows. Usually I keep two versions of Code::Blocks in my PC. One is the last released nightly and the other one is the one that I build from trunk. I use last released nightly to write code. However as Code::Blocks is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was irritated by the fact that Code::Blocks is not truly portable on Windows. Usually I keep two versions of Code::Blocks in my PC. One is the last released nightly and the other one is the one that I build from trunk. I use last released nightly to write code. However as Code::Blocks is not truly portable, these two versions of Code::Blocks share same configuration file.  Sometimes I run my newly built Code::Blocks from trunk, it crashes and corrupts my customised configuration file. And this irritates me a lot.</p>
<p>Other than this, you really can&#8217;t copy your configuration folder in a portable drive and expect entire Code::Blocks installation to behave as a truly portable software. There is one way; using personality feature of Code::Blocks. but that solves only one half of the problem. Yes, this makes your Code::Blocks portable. But your plugins are not! They still read their own settings from the default folder which is <strong>%APPDATA%\CodeBlocks</strong> folder.<span id="more-62"></span></p>
<p>So I started to investigate it. To give you a peek of Code::Blocks internals, ConfigManager uses <tt>wxStandardPathsBase::Get().GetUserConfigDir()</tt> to determine it&#8217;s configuration directory. wxWidgets internally uses <tt>SHGetFolderPath()</tt> function to resolve this call.<strong> </strong>This function call has higher precedence over environment variables. Thus if you try to set APPDATA before launching Code::Blocks it has no effects.</p>
<p>Now coming to a solution (you may call it a hack, too!), following patch fixes this issue. It reads APPDATA Environment variable first. If it fails to do so, it falls back to wxWidgets based implementation. In this way you can temporarily set APPDATA variable before launching Code::Blocks. You can point to any directory using APPDATA variable and Code::Blocks will use it to save settings.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">Index<span style="color: #008080;">:</span> src<span style="color: #000040;">/</span>sdk<span style="color: #000040;">/</span>configmanager.<span style="color: #007788;">cpp</span>
<span style="color: #000080;">===================================================================</span>
<span style="color: #000040;">---</span> src<span style="color: #000040;">/</span>sdk<span style="color: #000040;">/</span>configmanager.<span style="color: #007788;">cpp</span>	<span style="color: #008000;">&#40;</span>revision <span style="color: #0000dd;">5519</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+++</span> src<span style="color: #000040;">/</span>sdk<span style="color: #000040;">/</span>configmanager.<span style="color: #007788;">cpp</span>	<span style="color: #008000;">&#40;</span>working copy<span style="color: #008000;">&#41;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">60</span>,<span style="color: #0000dd;">6</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">60</span>,<span style="color: #0000dd;">23</span> @@
 wxString ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">temp_folder</span><span style="color: #008080;">;</span>
 <span style="color: #0000ff;">bool</span> ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">relo</span> <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #000040;">+</span><span style="color: #339900;">#ifdef __WINDOWS__</span>
<span style="color: #000040;">+</span>wxString GetPortableConfigDir<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span><span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>    DWORD bufLen <span style="color: #000080;">=</span> <span style="color: #0000dd;">32780</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    TCHAR buffer<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">32780</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">int</span> ret <span style="color: #000080;">=</span> GetEnvironmentVariable<span style="color: #008000;">&#40;</span>_T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;APPDATA&quot;</span><span style="color: #008000;">&#41;</span>, buffer, bufLen<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>ret <span style="color: #000080;">==</span> <span style="color: #0000dd;">0</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">return</span> wxStandardPathsBase<span style="color: #008080;">::</span><span style="color: #007788;">Get</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">GetUserDataDir</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">else</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">return</span> wxString<span style="color: #008080;">::</span><span style="color: #007788;">Format</span><span style="color: #008000;">&#40;</span>_T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;%s<span style="color: #000099; font-weight: bold;">\\</span>codeblocks&quot;</span><span style="color: #008000;">&#41;</span>, buffer<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span><span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#endif</span>
<span style="color: #000040;">+</span>
 <span style="color: #0000ff;">namespace</span> CfgMgrConsts
 <span style="color: #008000;">&#123;</span>
     <span style="color: #0000ff;">const</span> wxString app_path<span style="color: #008000;">&#40;</span>_T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;app_path&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">172</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">189</span>,<span style="color: #0000dd;">11</span> @@
&nbsp;
     <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>cfg.<span style="color: #007788;">IsEmpty</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
     <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #339900;">#ifdef __WINDOWS__</span>
<span style="color: #000040;">+</span>        cfg <span style="color: #000080;">=</span> GetPortableConfigDir<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> wxFILE_SEP_PATH <span style="color: #000040;">+</span> personality <span style="color: #000040;">+</span> _T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;.conf&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #339900;">#else</span>
         cfg <span style="color: #000080;">=</span> wxStandardPathsBase<span style="color: #008080;">::</span><span style="color: #007788;">Get</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">GetUserDataDir</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> wxFILE_SEP_PATH <span style="color: #000040;">+</span> personality <span style="color: #000040;">+</span> _T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;.conf&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #339900;">#endif</span>
         doc <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> TiXmlDocument<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
         doc<span style="color: #000040;">-</span><span style="color: #000040;">&amp;</span>gt<span style="color: #008080;">;</span>InsertEndChild<span style="color: #008000;">&#40;</span>TiXmlDeclaration<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;1.0&quot;</span>, <span style="color: #FF0000;">&quot;UTF-8&quot;</span>, <span style="color: #FF0000;">&quot;yes&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
         doc<span style="color: #000040;">-</span><span style="color: #000040;">&amp;</span>gt<span style="color: #008080;">;</span>InsertEndChild<span style="color: #008000;">&#40;</span>TiXmlElement<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;CodeBlocksConfig&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">187</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">208</span>,<span style="color: #0000dd;">11</span> @@
 <span style="color: #008000;">&#123;</span>
     wxPathList searchPaths<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #000040;">+</span><span style="color: #339900;">#ifdef __WINDOWS__</span>
<span style="color: #000040;">+</span>    wxString u<span style="color: #008000;">&#40;</span>GetPortableConfigDir<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> wxFILE_SEP_PATH <span style="color: #000040;">+</span> filename<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#else</span>
     wxString u<span style="color: #008000;">&#40;</span>wxStandardPathsBase<span style="color: #008080;">::</span><span style="color: #007788;">Get</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">GetUserDataDir</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> wxFILE_SEP_PATH <span style="color: #000040;">+</span> filename<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#endif</span>
     wxString e<span style="color: #008000;">&#40;</span><span style="color: #008080;">::</span><span style="color: #007788;">DetermineExecutablePath</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">+</span> wxFILE_SEP_PATH <span style="color: #000040;">+</span>filename<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
     <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #008080;">::</span><span style="color: #007788;">wxFileExists</span><span style="color: #008000;">&#40;</span>u<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">1369</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">1394</span>,<span style="color: #0000dd;">11</span> @@
&nbsp;
 <span style="color: #0000ff;">void</span> ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">InitPaths</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
 <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#ifdef __WINDOWS__</span>
<span style="color: #000040;">+</span>    ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">config_folder</span> <span style="color: #000080;">=</span> GetPortableConfigDir<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#else</span>
     ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">config_folder</span> <span style="color: #000080;">=</span> wxStandardPathsBase<span style="color: #008080;">::</span><span style="color: #007788;">Get</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">GetUserDataDir</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span><span style="color: #339900;">#endif</span>
     ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">home_folder</span> <span style="color: #000080;">=</span> wxStandardPathsBase<span style="color: #008080;">::</span><span style="color: #007788;">Get</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>.<span style="color: #007788;">GetUserConfigDir</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     ConfigManager<span style="color: #008080;">::</span><span style="color: #007788;">app_path</span> <span style="color: #000080;">=</span> <span style="color: #008080;">::</span><span style="color: #007788;">DetermineExecutablePath</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     wxString res_path <span style="color: #000080;">=</span> <span style="color: #008080;">::</span><span style="color: #007788;">DetermineResourcesPath</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>So far the result is good enough. Core code::Blocks is portable. I&#8217;ve checked few plugins. They are now portable too. I&#8217;ve written a small launcher. This launcher will run Code::Blocks from the local directory. An AppData folder will be created which Code::Blocks will use to save it&#8217;s settings.</p>
<p>Please note following points.</p>
<ol>
<li>Patch is meant for Windows only.</li>
<li>Patch is made against latest svn revision. Patch may not work with 8.02 release.</li>
<li>A launcher is made available to launch Code::Blocks in a portable way.</li>
</ol>
<p>Portable Code::Blocks Launcher Source &amp; Binary Download link: <a rel="attachment wp-att-71" href="http://biplab.in/2009/04/creating-portable-version-of-codeblocks/cblauncher-01/"></a><a href="http://biplab.in/wp-content/uploads/2009/04/cblauncher-v0_1.7z">cblauncher-v0_1</a></p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2009/04/creating-portable-version-of-codeblocks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>File permission bug of C::B</title>
		<link>http://biplab.in/2008/06/file-permission-bug-of-cb/</link>
		<comments>http://biplab.in/2008/06/file-permission-bug-of-cb/#comments</comments>
		<pubDate>Sun, 22 Jun 2008 16:11:07 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=58</guid>
		<description><![CDATA[A nasty bug was discovered by one of our user couple of months ago. The bug was affecting our last stable release as well as our latest nightly. The bug was due to the way a file was being saved by C::B to avoid corrupting the existing file. C::B used to write the new contents [...]]]></description>
			<content:encoded><![CDATA[<p>A nasty bug was discovered by one of our user couple of months ago. The bug was affecting our last stable release as well as our latest nightly.</p>
<p>The bug was due to the way a file was being saved by C::B to avoid corrupting the existing file. C::B used to write the new contents to a temporary file before deleting the old one and then renaming the temp file to new file. But this created a bug as the temporary file may/may not get the file permission attributes of the original.<span id="more-58"></span></p>
<p>Following patch has been committed into latest svn trunk which fixes this issue.</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #000040;">---</span> <span style="color: #000040;">/</span>trunk<span style="color: #000040;">/</span>src<span style="color: #000040;">/</span>sdk<span style="color: #000040;">/</span>filemanager.<span style="color: #007788;">cpp</span>	<span style="color: #0000dd;">2008</span><span style="color: #000040;">/</span><span style="color: #208080;">06</span><span style="color: #000040;">/</span><span style="color: #0000dd;">22</span> <span style="color: #0000dd;">11</span><span style="color: #008080;">:</span><span style="color: #208080;">05</span><span style="color: #008080;">:</span><span style="color: #0000dd;">11</span>	<span style="color: #0000dd;">5103</span>
<span style="color: #000040;">+++</span> trunk<span style="color: #000040;">/</span>src<span style="color: #000040;">/</span>sdk<span style="color: #000040;">/</span>filemanager.<span style="color: #007788;">cpp</span>	<span style="color: #0000dd;">2008</span><span style="color: #000040;">/</span><span style="color: #208080;">06</span><span style="color: #000040;">/</span><span style="color: #0000dd;">22</span> <span style="color: #0000dd;">15</span><span style="color: #008080;">:</span><span style="color: #0000dd;">57</span><span style="color: #008080;">:</span><span style="color:#800080;">09</span>	<span style="color: #0000dd;">5104</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">58</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">58</span>,<span style="color: #0000dd;">7</span> @@
     len <span style="color: #000080;">=</span> file.<span style="color: #007788;">Length</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
     data <span style="color: #000080;">=</span> <span style="color: #0000dd;">new</span> <span style="color: #0000ff;">char</span><span style="color: #008000;">&#91;</span>len<span style="color: #000040;">+</span><span style="color: #0000dd;">4</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>	<span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>dp <span style="color: #000080;">=</span> data <span style="color: #000040;">+</span> len<span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>dp <span style="color: #000080;">=</span> data <span style="color: #000040;">+</span> len<span style="color: #008080;">;</span>
     <span style="color: #000040;">*</span>dp<span style="color: #000040;">++</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">'<span style="color: #006699; font-weight: bold;">\0</span>'</span><span style="color: #008080;">;</span>
     <span style="color: #000040;">*</span>dp<span style="color: #000040;">++</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">'<span style="color: #006699; font-weight: bold;">\0</span>'</span><span style="color: #008080;">;</span>
     <span style="color: #000040;">*</span>dp<span style="color: #000040;">++</span> <span style="color: #000080;">=</span> <span style="color: #FF0000;">'<span style="color: #006699; font-weight: bold;">\0</span>'</span><span style="color: #008080;">;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">100</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">100</span>,<span style="color: #0000dd;">7</span> @@
&nbsp;
     data <span style="color: #000080;">=</span> buffer.<span style="color: #007788;">Data</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     len <span style="color: #000080;">=</span> buffer.<span style="color: #007788;">Length</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>	buffer.<span style="color: #007788;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;<span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span>&quot;</span>, <span style="color: #0000dd;">4</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    buffer.<span style="color: #007788;">Append</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;<span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span><span style="color: #006699; font-weight: bold;">\0</span>&quot;</span>, <span style="color: #0000dd;">4</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     Ready<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
 <span style="color: #008000;">&#125;</span>
&nbsp;
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">274</span>,<span style="color: #0000dd;">19</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">274</span>,<span style="color: #0000dd;">40</span> @@
     wxString tempName<span style="color: #008000;">&#40;</span>name <span style="color: #000040;">+</span> _T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;.cbTemp&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     <span style="color: #0000ff;">do</span>
     <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">-</span>        wxFile f<span style="color: #008000;">&#40;</span>tempName, wxFile<span style="color: #008080;">::</span><span style="color: #007788;">write</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>        <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>f.<span style="color: #007788;">IsOpened</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span> <span style="color: #000040;">!</span>wxCopyFile<span style="color: #008000;">&#40;</span>name, tempName<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#123;</span>
             <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #000040;">+</span>        wxFile f<span style="color: #008000;">&#40;</span>name, wxFile<span style="color: #008080;">::</span><span style="color: #007788;">write</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> <span style="color: #000040;">!</span>f.<span style="color: #007788;">IsOpened</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>            <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#125;</span>
         <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>f.<span style="color: #007788;">Write</span><span style="color: #008000;">&#40;</span>data, len<span style="color: #008000;">&#41;</span> <span style="color: #000040;">!</span><span style="color: #000080;">=</span> len<span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
             f.<span style="color: #007788;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>            wxRemoveFile<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>            <span style="color: #666666;">// Keep the backup file as the original file has been destroyed</span>
<span style="color: #000040;">+</span>            <span style="color: #666666;">//wxRemoveFile(tempName);</span>
             <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
         <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>
<span style="color: #000040;">+</span>        f.<span style="color: #007788;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>
     <span style="color: #008000;">&#125;</span><span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #000040;">-</span>    <span style="color: #0000ff;">return</span> ReplaceFile<span style="color: #008000;">&#40;</span>name, tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>Manager<span style="color: #008080;">::</span><span style="color: #007788;">IsAppShuttingDown</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #666666;">// app shut down, forget delayed deletion</span>
<span style="color: #000040;">+</span>        wxRemoveFile<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">else</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #666666;">// issue a delayed deletion of the back'd up (old) file</span>
<span style="color: #000040;">+</span>        delayedDeleteThread.<span style="color: #007788;">Queue</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">new</span> DelayedDelete<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span>
 <span style="color: #008000;">&#125;</span>
&nbsp;
 <span style="color: #0000ff;">bool</span> FileManager<span style="color: #008080;">::</span><span style="color: #007788;">Save</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> wxString<span style="color: #000040;">&amp;</span>amp<span style="color: #008080;">;</span> name, <span style="color: #0000ff;">const</span> wxString<span style="color: #000040;">&amp;</span>amp<span style="color: #008080;">;</span> data, wxFontEncoding encoding, <span style="color: #0000ff;">bool</span> bom<span style="color: #008000;">&#41;</span>
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">309</span>,<span style="color: #0000dd;">19</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">330</span>,<span style="color: #0000dd;">39</span> @@
     wxString tempName<span style="color: #008000;">&#40;</span>name <span style="color: #000040;">+</span> _T<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;.cbTemp&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
     <span style="color: #0000ff;">do</span>
     <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">-</span>        wxFile f<span style="color: #008000;">&#40;</span>tempName, wxFile<span style="color: #008080;">::</span><span style="color: #007788;">write</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>        <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>f.<span style="color: #007788;">IsOpened</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>wxCopyFile<span style="color: #008000;">&#40;</span>name, tempName<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#123;</span>
             <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #000040;">+</span>        wxFile f<span style="color: #008000;">&#40;</span>name, wxFile<span style="color: #008080;">::</span><span style="color: #007788;">write</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span> <span style="color: #000040;">!</span>f.<span style="color: #007788;">IsOpened</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>            <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>        <span style="color: #008000;">&#125;</span>
         <span style="color: #0000ff;">if</span><span style="color: #008000;">&#40;</span>WriteWxStringToFile<span style="color: #008000;">&#40;</span>f, data, encoding, bom<span style="color: #008000;">&#41;</span> <span style="color: #000080;">==</span> <span style="color: #0000ff;">false</span><span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
             f.<span style="color: #007788;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">-</span>            wxRemoveFile<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>            <span style="color: #666666;">// Keep the backup file as the original file has been destroyed</span>
<span style="color: #000040;">+</span>            <span style="color: #666666;">//wxRemoveFile(tempName);</span>
             <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
         <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>
<span style="color: #000040;">+</span>        f.<span style="color: #007788;">Close</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>
     <span style="color: #008000;">&#125;</span><span style="color: #0000ff;">while</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
&nbsp;
<span style="color: #000040;">-</span>    <span style="color: #0000ff;">return</span> ReplaceFile<span style="color: #008000;">&#40;</span>name, tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>Manager<span style="color: #008080;">::</span><span style="color: #007788;">IsAppShuttingDown</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #666666;">// app shut down, forget delayed deletion</span>
<span style="color: #000040;">+</span>        wxRemoveFile<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">else</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#123;</span>
<span style="color: #000040;">+</span>        <span style="color: #666666;">// issue a delayed deletion of the back'd up (old) file</span>
<span style="color: #000040;">+</span>        delayedDeleteThread.<span style="color: #007788;">Queue</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">new</span> DelayedDelete<span style="color: #008000;">&#40;</span>tempName<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #000040;">+</span>    <span style="color: #008000;">&#125;</span>
<span style="color: #000040;">+</span>    <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span>
 <span style="color: #008000;">&#125;</span>
&nbsp;
 <span style="color: #0000ff;">bool</span> FileManager<span style="color: #008080;">::</span><span style="color: #007788;">ReplaceFile</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">const</span> wxString<span style="color: #000040;">&amp;</span>amp<span style="color: #008080;">;</span> old_file, <span style="color: #0000ff;">const</span> wxString<span style="color: #000040;">&amp;</span>amp<span style="color: #008080;">;</span> new_file<span style="color: #008000;">&#41;</span></pre></div></div>

<p><br class="spacer_" /></p>
<p>The patch is required for our last release (version 8.02).</p>
<p>Thanks for the bug report.</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2008/06/file-permission-bug-of-cb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode Support in Code::Blocks</title>
		<link>http://biplab.in/2007/10/unicode-support-in-codeblocks/</link>
		<comments>http://biplab.in/2007/10/unicode-support-in-codeblocks/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 16:08:08 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/2007/10/26/unicode-support-in-codeblocks/</guid>
		<description><![CDATA[Code::Blocks (C::B) had a long known problem of crashing / locking up while an accented character is used in the code. Or even worse when the encoding of a file is changed from one encoding to another. It was able to support upto UTF-8 encoding with occasional lock-up. I started working on this around 2-3 [...]]]></description>
			<content:encoded><![CDATA[<p>Code::Blocks (C::B) had a long known problem of crashing / locking up while an accented character is used in the code. Or even worse when the encoding of a file is changed from one encoding to another. It was able to support upto UTF-8 encoding with occasional lock-up.</p>
<p>I started working on this around 2-3 months back. But during testing we found that C::B still hangs and it is due to Code-Completion (CC) plugin. The issue was due to the presence of some ANSI functions in Code-Completion parser. Morten then started his work to fix this. It almost resulted to a small re-write of Code-Completion. And we could finally test our Unicode changes with CC enabled.</p>
<p>We tested it for couple of weeks before we found it to be stable enough for further real-life testing by our users. In revision 4548, the first collection of patches were committed (including Morten&#8217;s patch on CC). Few users posted some issues which were then quickly resolved. As of writing, the code seems to be quite stable.</p>
<p><strong>So what are the changes that have been made??</strong></p>
<p>There were a number of changes that has been made.</p>
<ol>
<li>Encoding detection code has been improved by using a portion of MadEdit&#8217;s encoding detection code. Currently it can detect, UTF-8, UTF-16 BE/LE, UTF-32 BE/LE with/without BOM. The fall back code has been kept to ANSI (CP-1252 on Windows).</li>
<li>Encoding conversion routine has been overhauled. Now it converts back and forth all supported encodings flawlessly.</li>
<li>Now all the encoding detection and conversion code is much more efficient as it involves minimum disk reads and most of the operation is done in memory buffers (Thanks Thomas for keeping this strict criteria).</li>
<li>The file load routine has been moved from a all in one load-plus-encoding detection code to efficiently distributed code.</li>
<li>File save routine was overhauled to save files with all supported encodings.</li>
<li>Project load routine has been tweaked to reduce the stalling while opening a large project with a large number of open files in it.</li>
<li>Morten made CC parser Unicode compliant so that it can now parse any files without a single lock-up.</li>
</ol>
<p>I would request users to use Build Revision 4553 onwards to get the most benefit out of it. Please post any related issues in the forum itself. <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/10/unicode-support-in-codeblocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code::Blocks and wxWidgets 2.8.4</title>
		<link>http://biplab.in/2007/05/codeblocks-and-wxwidgets-284/</link>
		<comments>http://biplab.in/2007/05/codeblocks-and-wxwidgets-284/#comments</comments>
		<pubDate>Fri, 25 May 2007 19:46:07 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=47</guid>
		<description><![CDATA[wxWidgets (wx) 2.8.4 has been released recently. Since Code::Blocks was switched to wx 2.8.x series wx-2.8.3 runtime dll was being used on Windows. But wx 2.8.3 had some serious issues which were crippling some of the features of Code::Blocks on Windows and as well as on Linux. Well let me explain them. On Windows, the [...]]]></description>
			<content:encoded><![CDATA[<p>wxWidgets (wx) 2.8.4 has been released recently. Since Code::Blocks was switched to wx 2.8.x series wx-2.8.3 runtime dll was being used on Windows. But <em>wx 2.8.3 had some serious issues</em> which were crippling some of the features of Code::Blocks on Windows and as well as on Linux. Well let me explain them.</p>
<p><strong>On Windows</strong>, the pop-up menu were not responding to clicks. This became an annoying issue for Code::Blocks as a major portion of pop-up menus were not working. This bug existed in wx-2.8.3 and has been fixed in wx-2.8.4.</p>
<p>So if you are facing such issue where the Pop-Up menus are not working, just upgrade to wx-2.8.4. A link to a new DLL is now available with the Nightly Build links. Please check the Code::Blocks forum for the link.</p>
<p><strong>On Linux</strong> the issue was quite serious, though. There is a bug in wx-2.8.3 in which an application may run into an endless loop if a <em>statictext control</em> is added to menu. This issue was making Code::Blocks to <em>hang-at-start-up</em>. So if your Code::Blocks installation is showing such weird behaviour, it&#8217;s time to upgrade.</p>
<p>For Linux, you need to upgrade on your own. As such no wxGTK runtime will be provided by Code::Blocks team (including me). You may build it on your own or can check wxWidgets website&#8217;s Download section.</p>
<p>So if you face any of these two issues, please don&#8217;t file a bug-report. Rather update wxWidgets runtime.</p>
<p>Signing off today.  <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/05/codeblocks-and-wxwidgets-284/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxWidgets Wizard Update: Apr 2007</title>
		<link>http://biplab.in/2007/05/update-wxwidgets-wizard-of-codeblocks-apr-2007/</link>
		<comments>http://biplab.in/2007/05/update-wxwidgets-wizard-of-codeblocks-apr-2007/#comments</comments>
		<pubDate>Fri, 04 May 2007 02:48:34 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=46</guid>
		<description><![CDATA[Hello all, The wxWidgets Wizard of Code::Blocks have been updatd recently. In this article I&#8217;ll explain the changes that I&#8217;ve committed. Earlier wizard had two pages to add additional libraries in Non-Monolithic build of wxWidgets in Windows. Now those two pages have been changed to a more user-friendly one page list. All the libraries are [...]]]></description>
			<content:encoded><![CDATA[<p>Hello all,</p>
<p>The wxWidgets Wizard of Code::Blocks have been updatd recently. In this article I&#8217;ll explain the changes that I&#8217;ve committed.</p>
<p>Earlier wizard had two pages to add additional libraries in Non-Monolithic build of wxWidgets in Windows. Now those two pages have been changed to a more user-friendly one page list. All the libraries are now available as a single list and selecting them is also easier. Please see the following screenshot for more details.</p>
<p style="text-align: center"><a href="http://biplab.in/wp-content/uploads/2007/08/wxaddllibpage.png" rel="thumbnail" title="wxaddllibpage.png"><img src="http://biplab.in/wp-content/uploads/2007/08/wxaddllibpage.thumbnail.png" alt="wxaddllibpage.png" /></a></p>
<p>Another important update has been committed in the wizard. Wizard is now able to add additional dependencies if you&#8217;ve forgot to add them in your project. This would be helpful in resolving linking errors due to missing dependencies.</p>
<p>In past couple of months, several users requested to add support for a wxWidgets target addition. In this update I&#8217;ve added that, too. Now you&#8217;ll be able to add a target to an existing project even with a different compiler and configuration.</p>
<p>To use this, please click <strong>File &gt; New &gt; Build target</strong> menu. Now you&#8217;ll see the following screen.</p>
<p style="text-align: center"><a href="http://biplab.in/wp-content/uploads/2007/08/wxintarget.png" rel="thumbnail" title="wxintarget.png"><img src="http://biplab.in/wp-content/uploads/2007/08/wxintarget.thumbnail.png" alt="wxintarget.png" /></a></p>
<p>Select wxWidgets from the list and the target wizard will start. Now follow the steps in the wizard and use appropriate settings. The wizard will create a New target for you.</p>
<p>Please note that to add a new target, a project should be open in Code::Blocks.</p>
<p>Hopefully you&#8217;ll find this new addition to be useful.</p>
<p>Regards,</p>
<p>Biplab</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/05/update-wxwidgets-wizard-of-codeblocks-apr-2007/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>wxWidgets 2.6.4: New Release with New Issues</title>
		<link>http://biplab.in/2007/04/wxwidgets-264-new-release-with-new-issues/</link>
		<comments>http://biplab.in/2007/04/wxwidgets-264-new-release-with-new-issues/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 07:38:31 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=35</guid>
		<description><![CDATA[Hi All, Posting after a long time. Got busy with studies and coding. Last month wxWidgets-2.6.4 was released. This is primarily a bug-fix release. Though newer releases are already available, a number of projects are still using wxWidgets 2.6.x for their projects. Code::Blocks is one such example. Since it&#8217;s release I&#8217;ve been compiling Code::Blocks with [...]]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>Posting after a long time. Got busy with studies and coding.</p>
<p>Last month wxWidgets-2.6.4 was released. This is primarily a bug-fix release. Though newer releases are already available, a number of projects are still using wxWidgets 2.6.x for their projects. Code::Blocks is one such example.</p>
<p>Since it&#8217;s release I&#8217;ve been compiling Code::Blocks with it to find out any issues. The first issue that I noticed was incorrect <em>File-type</em> icons in Code::Blocks. All the icons that C::B associates with different file types were getting mangled after I compiled it with wxWidgets-2.6.4.</p>
<p>Finally the bug has been found out and the fix is pretty easy. Just apply the following patch to wx.rc file.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #000040;">---</span> C<span style="color: #008080;">:</span><span style="color: #000040;">/</span>wxWidgets<span style="color: #000040;">-</span>2.6.4<span style="color: #000040;">/</span>include<span style="color: #000040;">/</span>wx<span style="color: #000040;">/</span>msw<span style="color: #000040;">/</span>wx.<span style="color: #007788;">rc</span>	Mon Mar <span style="color: #0000dd;">26</span> <span style="color: #0000dd;">18</span><span style="color: #008080;">:</span><span style="color: #0000dd;">15</span><span style="color: #008080;">:</span><span style="color: #0000dd;">59</span> <span style="color: #0000dd;">2007</span>
&nbsp;
<span style="color: #000040;">+++</span> C<span style="color: #008080;">:</span><span style="color: #000040;">/</span>wxWidgets<span style="color: #000040;">-</span>2.6.4<span style="color: #000040;">/</span>include<span style="color: #000040;">/</span>wx<span style="color: #000040;">/</span>msw<span style="color: #000040;">/</span>wx.<span style="color: #007788;">rc</span>	Mon Mar <span style="color: #0000dd;">26</span> <span style="color: #0000dd;">18</span><span style="color: #008080;">:</span><span style="color: #0000dd;">17</span><span style="color: #008080;">:</span><span style="color: #0000dd;">13</span> <span style="color: #0000dd;">2007</span>
&nbsp;
@@ <span style="color: #000040;">-</span><span style="color: #0000dd;">79</span>,<span style="color: #0000dd;">7</span> <span style="color: #000040;">+</span><span style="color: #0000dd;">79</span>,<span style="color: #0000dd;">7</span> @@<span style="color: #666666;">// Low alphabetically to make it the default, but not so low as to</span>
&nbsp;
<span style="color: #666666;">// affect applications that use 'a'</span>
&nbsp;
<span style="color: #000040;">-</span>bICON                           ICON <span style="color: #FF0000;">&quot;wx/msw/std.ico&quot;</span>
&nbsp;
<span style="color: #000040;">+</span><span style="color: #666666;">//bICON                           ICON &quot;wx/msw/std.ico&quot;</span>
&nbsp;
<span style="color: #666666;">//////////////////////////////////////////////////////////////////////////////</span>
&nbsp;
<span style="color: #666666;">//</span></pre></td></tr></table></div>

<p>With this new wx code, an additional Icon was getting inserted into the exe file which was screwing up the associated icons.</p>
<p><strong>Is it reported to wx-dev team?</strong> Answer is No and not necessary. This bug has been fixed in wx 2.8.x code. But unfortunately, the buggy code came with wxWidgets 2.6.4.</p>
<p>So if you want to compile Code::Blocks or any other app with wxWidgets 2.6.4, then please pay attention to this bug. Or otherwise it may haunt you for no reasons.</p>
<p><strong><em>Another bug</em></strong> that has been noticed in Code::Blocks after switching to wx 2.6.4 is that it&#8217;s <em>Find</em> and <em>Replace</em> dialogs are now not responding to <em>Escape key</em>!</p>
<p>This bug is new and still not confirmed whether it&#8217;s an issue with wxWidgets 2.6.4 or Code::Blocks code. As far as I&#8217;m concerned, I&#8217;m quite sure that C::B code is not responsible for this.</p>
<p>I&#8217;m presently working on this to see if this can be fixed or not.</p>
<p>Hope this unofficial bug report and it&#8217;s fix will help you. <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/04/wxwidgets-264-new-release-with-new-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxWidgets, OpenWatcom and Code::Blocks</title>
		<link>http://biplab.in/2007/03/wxwidgets-openwatcom-and-codeblocks/</link>
		<comments>http://biplab.in/2007/03/wxwidgets-openwatcom-and-codeblocks/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 15:39:19 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=30</guid>
		<description><![CDATA[Hello Everybody, This week I&#8217;m posting wxWidgets Wizard update alongwith a number of other feature improvements that has been added in Code::Blocks. A number of users had complained about the support of OpenWatcom in Code::Blocks. The support was there but it was broken as it was written quite a while ago. Thus I rewrote some [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everybody,</p>
<p>This week I&#8217;m posting wxWidgets Wizard update alongwith a number of other feature improvements that has been added in Code::Blocks.</p>
<p>A number of users had complained about the support of OpenWatcom in Code::Blocks. The support was there but it was broken as it was written quite a while ago. Thus I rewrote some of the parts to improve the support. Now it has been tested with OpenWatcom 1.6 and found to be working perfectly with different types of projects.</p>
<p>After improving OpenWatcom support the goal was set to make the wxWidgets Wizard compatible with OpenWatcom. It has been updated to work with latest OpenWatcom release. I&#8217;ve personally tested it with OpenWatcom 1.6 and found to be working perfectly. OpenWatcom support for wxWidgets Wizard has been added in Revision 3660.</p>
<p>Till date if anyone wishes to develop wxWidgets based application with OpenWatcom makefile was the only option. Latest Nightlies of Code::Blocks have changed the equation. The OpenWatcom support is also available in 3rd-Party GUI builder integration part of wxWidgets Wizard.</p>
<p>One feature is presently lacking in OpenWatcom support in wizard. It does not support PCH files. But soon this limitation will be resolved.</p>
<p>Another interesting feature addition to wizard is support for <strong>wxSmith</strong>, the default GUI builder in Code::Blocks. I&#8217;m thankful to <b>Byo</b> for his support making the integration possible.</p>
<p>I hope you&#8217;ll all find the latest changes more interesting and useful.</p>
<p>Thanks for visiting the Blog. Please visit again for more updates. <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/03/wxwidgets-openwatcom-and-codeblocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxWidgets Wizard Update: 27th Feb 07</title>
		<link>http://biplab.in/2007/02/wxwidgets-wizard-update-27th-feb-07/</link>
		<comments>http://biplab.in/2007/02/wxwidgets-wizard-update-27th-feb-07/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 05:36:55 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=25</guid>
		<description><![CDATA[An interesting feature has been added in the wxWidgets Project Wizard of Code::Blocks. Support for external GUI builder. Presently wxFormBuilder is supported. Code::Blocks also comes with an integrated GUI builder named wxSmith. Next release of this wizard will be focusing on integrating wxSmith. So what more user need to do to enable this feature? Truly [...]]]></description>
			<content:encoded><![CDATA[<p>An interesting feature has been added in the wxWidgets Project Wizard of Code::Blocks. Support for external GUI builder. Presently <a href="http://wxformbuilder.org">wxFormBuilder</a> is supported. <a href="http://codeblocks.org">Code::Blocks</a> also comes with an integrated GUI builder named <strong><em>wxSmith</em></strong>. Next release of this wizard will be focusing on integrating <em><strong>wxSmith</strong></em>.</p>
<p>So what more user need to do to enable this feature? Truly speaking, not much. User have to select an option which asks which GUI builder to use (See the following screenshot for more details). There is another option to generate either wxDialog based or wxFrame based app.</p>
<p><a href="http://biplab.in/wp-content/uploads/2007/03/wxwiz_gui_sel_page.png" rel="lightbox" title="Screenshot showing GUI builder selection page"></a></p>
<p style="text-align: center"><a href="http://biplab.in/wp-content/uploads/2007/03/wxwiz_gui_sel_page.png" rel="lightbox" title="Screenshot showing GUI builder selection page"><img src="http://biplab.in/wp-content/uploads/2007/03/wxwiz_gui_sel_page.thumbnail.png" alt="wxwiz_gui_sel_page.png" /></a></p>
<p align="center"><a href="http://biplab.in/wp-content/uploads/2007/03/wxwiz_gui_sel_page.png" rel="lightbox" title="Screenshot showing GUI builder selection page">Screenshot showing GUI builder selection page</a></p>
<p>Selecting No GUI Builder will create an working project with sample code.</p>
<p>Changelog:</p>
<ul>
<li>Wizard now supports creation of wxDialog / wxFrame based app.</li>
<li>Wizard now supports wxFormBuilder to be selected as 3rd-Party GUI Builder alongwith wxDialog / wxFrame option.</li>
<li>PCH include header has been reverted to <tt>wx_pch.h</tt> and PCH Pre-Processor definition is changed to <tt>WX_PRECOMP</tt></li>
<li><tt>EVT_CLOSE</tt> has been added in all templates to ensure proper exit.</li>
</ul>
<p>The new wizard will be available from Revision 3645 onwards and it has been released with 26th February 2007 Nightly Release. Download it from -</p>
<p><a href="http://forums.codeblocks.org/index.php/topic,5289.0.html" target="_blank">http://forums.codeblocks.org/index.php/topic,5289.0.html</a><br />
 <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/02/wxwidgets-wizard-update-27th-feb-07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wxWidgets Wizard Update: 20th Feb 07</title>
		<link>http://biplab.in/2007/02/wxwidgets-wizard-update-20th-feb-07/</link>
		<comments>http://biplab.in/2007/02/wxwidgets-wizard-update-20th-feb-07/#comments</comments>
		<pubDate>Wed, 21 Feb 2007 18:21:17 +0000</pubDate>
		<dc:creator>Biplab</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wxWidgets]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=23</guid>
		<description><![CDATA[Hello Everybody, There has been couple of significant changes to wxWidgets project wizard of Code::Blocks. The update will help advanced users who want to debug their application in Debug mode but linking with Release library of wxWidgets. Yes! this is now possible but only for GCC. Other compilers may not support this feature and thus [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everybody,</p>
<p>There has been couple of significant changes to wxWidgets project wizard of Code::Blocks. The update will help advanced users who want to debug their application in Debug mode but linking with Release library of wxWidgets. Yes! this is now possible but only for GCC. Other compilers may not support this feature and thus it has been internally disabled.</p>
<p>Changelog:</p>
<ul>
<li><span style="color: #ff0000"><strong>Set Target Types option</strong></span> has been renamed to <strong><span style="color: #0000ff">Configure Advanced Options</span></strong>. (See screenshot 1)</li>
<li>Now wizard can setup debug target using Release wxWidgets lib and without <tt><span style="color: #0000ff">__WXDEBUG__</span></tt>. Please remember that this is available only for GCC in Windows. (See screenshot 2)</li>
</ul>
<p>This option was requested by several developer of Code::Blocks. This option will enable a developer to compile application in debug mode (using -g flag to be particular) but using release lib of wxWidgets to avoid mixing of bugs. Please remember that this option will not work for any other compilers other than GCC.</p>
<p><center></p>
<table border="0" cellspacing="20">
<tr>
<td align="center"><a href="http://biplab.in/wp-content/uploads/2007/03/wxwiz_renamed_opt_page.png" rel="lightbox" title="Renamed Option"><img src="http://biplab.in/wp-content/uploads/2007/03/wxwiz_renamed_opt_page.thumbnail.png" alt="wxwiz_renamed_opt_page.png" /><br />
Image1: Renamed Option</a></td>
<td align="center"><a href="http://biplab.in/wp-content/uploads/2007/03/wxwiz_adv_opt_gcc_page.png" rel="lightbox" title="Advanced Option for GCC"><img src="http://biplab.in/wp-content/uploads/2007/03/wxwiz_adv_opt_gcc_page.thumbnail.png" alt="wxwiz_adv_opt_gcc_page.png" /><br />
Image 2: Advanced Option for GCC</a></td>
</tr>
</table>
<p></center>Committed in revision 3610</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/02/wxwidgets-wizard-update-20th-feb-07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

