<?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&#039;s Blog</title>
	<atom:link href="http://biplab.in/feed/" rel="self" type="application/rss+xml" />
	<link>http://biplab.in</link>
	<description>About My Passion</description>
	<lastBuildDate>Fri, 16 Mar 2012 06:31:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Read-only Git, SVN Repo for Code::Blocks</title>
		<link>http://biplab.in/2012/03/read-only-git-svn-repo-for-codeblocks/</link>
		<comments>http://biplab.in/2012/03/read-only-git-svn-repo-for-codeblocks/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 05:06:47 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=118</guid>
		<description><![CDATA[Last month Berlios svn repo service was very unstable. Lack of access to repo is really frustrating, especially when we check repo for changes several times every day. From now on I&#8217;ll be hosting a mirror of Code::Blocks repo on &#8230; <a href="http://biplab.in/2012/03/read-only-git-svn-repo-for-codeblocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last month Berlios svn repo service was very unstable. Lack of access to repo is really frustrating, especially when we check repo for changes several times every day.</p>
<p>From now on I&#8217;ll be hosting a mirror of Code::Blocks repo on my server. This will give read-only access to everyone. I&#8217;m also hosting a read-only Git repo. This will give us access to Git repo to everyone who loves Git (including myself).</p>
<p>You can check out source via svn by issuing the following command-</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">svn checkout svn://cb.biplab.in/codeblocks/trunk</pre></div></div>

<p>You can browse svn repo using WebSVN interface at the following url-</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://cb.biplab.in/websvn/</pre></div></div>

<p>You can clone git repo by issuing following command-</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">git clone git://cb.biplab.in/codeblocks.git</pre></div></div>

<p>You can browse git repo, download source tarball at the following url-</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://cb.biplab.in/cgit/</pre></div></div>

<p>These repos are refreshed every 30 minutes. So if you find that my repo is not updated, then try again after sometime.</p>
<p>If you face any issue accessing my repo, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2012/03/read-only-git-svn-repo-for-codeblocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code::Blocks-svn7798 for 64 bit Windows</title>
		<link>http://biplab.in/2012/02/codeblocks-svn7798-for-64-bit-windows/</link>
		<comments>http://biplab.in/2012/02/codeblocks-svn7798-for-64-bit-windows/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 01:58:14 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<category><![CDATA[Code::Blocks]]></category>
		<category><![CDATA[Free/Open Source]]></category>

		<guid isPermaLink="false">https://biplab.in/?p=111</guid>
		<description><![CDATA[A nightly build of Code::Blocks for 64 bit Windows is now available. Relevant patches are also available. Do note that- 1) Code-completion plugin is not stable. Please disable it if Code::Blocks crashes or freezes. 2) Contrib plugins are not included &#8230; <a href="http://biplab.in/2012/02/codeblocks-svn7798-for-64-bit-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A nightly build of Code::Blocks for 64 bit Windows is now available. Relevant patches are also available.</p>
<p>Do note that-</p>
<p>1) Code-completion plugin is not stable. Please disable it if Code::Blocks crashes or freezes.<br />
2) Contrib plugins are not included in the package.</p>
<p>Download Links:<br />
<span id="more-111"></span><br />
Binary: <a title="CB_20120213_r7798_x86-64.7z" href="http://biplab.in/CB_20120213_r7798_x86-64.7z">CB_20120213_r7798_x86-64.7z</a><br />
Patch : <a title="64bit-20120213_svn7798_r1.7z" href="http://biplab.in/64bit-20120213_svn7798_r1.7z">64bit-20120213_svn7798_r1.7z</a></p>
<p>Please test and let us know about any issues / crashes.</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2012/02/codeblocks-svn7798-for-64-bit-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GCC-4.4.0-MinGW Binary</title>
		<link>http://biplab.in/2009/04/gcc-440-mingw-binary/</link>
		<comments>http://biplab.in/2009/04/gcc-440-mingw-binary/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 03:31:22 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://biplab.in/?p=87</guid>
		<description><![CDATA[Edited (12-February-2012): The download links do not work anymore. I also do not have a copy of those files. If you need a recent GCC build head over to mingw.org website. GCC-4.4.0 has been released recently. I have managed to &#8230; <a href="http://biplab.in/2009/04/gcc-440-mingw-binary/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Edited (12-February-2012):<br />
The download links do not work anymore. I also do not have a copy of those files. If you need a recent GCC build head over to mingw.org website.</p>
<p>GCC-4.4.0 has been released recently. I have managed to compile it as a MinGW build and I want to share that with others. The package can be downloaded from the following links. Please download both the files and extract them to <tt>C:\MinGW</tt> folder. Then extract Win32API, MinGW Runtime, pthreads-win (If you want to use OpenMP) package to the same folder. Now you&#8217;ll be able to use gcc-4.4 on Windows.</p>
<p>Download Links:<span id="more-87"></span></p>
<p><a href="hxxp://files.filefront.com/binutils+2191+bintarbz2/;13651013;/fileinfo.html" target="_blank">hxxp://files.filefront.com/binutils+2191+bintarbz2/;13651013;/fileinfo.html</a></p>
<p><a href="hxxp://files.filefront.com/MinGW+gcc+440+bkm+1tarbz2/;13650648;/fileinfo.html" target="_blank">hxxp://files.filefront.com/MinGW+gcc+440+bkm+1tarbz2/;13650648;/fileinfo.html</a></p>
<p>Package Details:</p>
<ol>
<li>Cross-compiled binary from vanilla GCC source.</li>
<li>Only one patch was applied to fix GCC build errors. No other patch has been applied to GCC source.</li>
<li>Binutils has also been cross-compiled from vanilla BinUtils (Release 2.19.1) package</li>
<li>I&#8217;ve put my Blog url and my initial in the compiled binary to differentiate it from other builds.</li>
<li><em>gcc</em>,<em> g++</em> and <em>gfortran</em> binary are available. Other language compilers are not included. They are mixed together as I don&#8217;t know how to create individual packages.</li>
</ol>
<p>&nbsp;</p>
<p><strong>Important Notes</strong>:</p>
<ol>
<li>This is completely <strong>Unsupported binary</strong> as I&#8217;ve little spare time to support it. So <em>use it at your own risk</em>.</li>
<li>I did few tests by compiling some of my projects. However do note that no bootstrapping and make check was done</li>
<li>Notably Code::Blocks source builds with this gcc binary without any issues (but with some warning messages).</li>
</ol>
<p>&nbsp;</p>
<p>Patch:<br />
Attached patch was applied to complete the build. But it&#8217;s side-effects are not explored (hope there isn&#8217;t any). Following patch is required if you are cross-compiling for MinGW from Linux.</p>
<p><a href="http://biplab.in/wp-content/uploads/2009/04/gcc.patch">gcc.patch</a></p>
<p>GCC Source: <a href="ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.0/gcc-4.4.0.tar.bz2" target="_blank">ftp://ftp.gnu.org/gnu/gcc/gcc-4.4.0/gcc-4.4.0.tar.bz2</a></p>
<p>Binutils Source: <a href="ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2" target="_blank">ftp://ftp.gnu.org/gnu/binutils/binutils-2.19.1.tar.bz2</a></p>
<p>Or alternatively you can download above sources from any GNU mirrors.</p>
<p>Happy Coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2009/04/gcc-440-mingw-binary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 &#8230; <a href="http://biplab.in/2009/04/creating-portable-codeblocks-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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 &#8230; <a href="http://biplab.in/2009/04/creating-portable-version-of-codeblocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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\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 &#8230; <a href="http://biplab.in/2008/06/file-permission-bug-of-cb/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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><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><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><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;    &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;    &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>Vote for us at SF.net</title>
		<link>http://biplab.in/2008/05/vote-for-us-at-sfnet/</link>
		<comments>http://biplab.in/2008/05/vote-for-us-at-sfnet/#comments</comments>
		<pubDate>Sun, 25 May 2008 16:19:32 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<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=57</guid>
		<description><![CDATA[Last year we went to the finals of SourceForge.net Community Choice Awards 2007. But we could not win it. This year we have another chance. The nomination for the SourceForge.net Community Choice Awards 2008 are now open. If you love &#8230; <a href="http://biplab.in/2008/05/vote-for-us-at-sfnet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last year we went to the finals of SourceForge.net Community Choice Awards 2007. But we could not win it.</p>
<p>This year we have another chance. The nomination for the SourceForge.net Community Choice Awards 2008 are now open. If you love Code::Blocks, please nominate us by clicking the following link.</p>
<p><center><strong>Broken Link Removed</strong></center>You can nominate us under <strong>Best Project</strong>, <strong>Best Project for the Enterprise</strong> or <strong>Best Tool or Utility for Developers</strong> category. Please note that you can <strong>nominate us in multiple categories</strong>. Also you would need a SourceForge.net account to nominate us.</p>
<p>Thanks for your support. <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2008/05/vote-for-us-at-sfnet/feed/</wfw:commentRss>
		<slash:comments>2</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 &#8230; <a href="http://biplab.in/2007/10/unicode-support-in-codeblocks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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 August-September Month Update Summary</title>
		<link>http://biplab.in/2007/10/codeblocks-august-september-month-update-summary/</link>
		<comments>http://biplab.in/2007/10/codeblocks-august-september-month-update-summary/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 16:30:30 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<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/2007/10/14/codeblocks-august-september-month-update-summary/</guid>
		<description><![CDATA[As usual the update summary is full of new changes made to Code::Blocks and lot of bug fixes. Summary: Help plugin now supports browsing of Man pages. wxSmith got number of new features including support to visually edit layouts, add &#8230; <a href="http://biplab.in/2007/10/codeblocks-august-september-month-update-summary/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As usual the update summary is full of new changes made to Code::Blocks and lot of bug fixes.</p>
<p><strong>Summary</strong>:</p>
<ul>
<li>Help plugin now supports browsing of Man pages.</li>
<li>wxSmith got number of new features including support to visually edit layouts, add events, etc.</li>
<li>Support for generated source files in build system.</li>
<li>Few critical bugs have been fixed. This included a well known DDE bug, crash at close bug, project file corruption in some cases bug, etc.</li>
</ul>
<p>Please note that the following changelog is based on SVN commit history of past two months. Detailed and organised changelog is as follows. <span id="more-55"></span></p>
<p><strong>Core</strong></p>
<p>* Restructured update.bat a little bit and minor fix.<br />
* wxFNB : fixed overflow of tabs too early and applied patch to allow backward compatibility with 2.6.x<br />
* Fixed: [Bug #11585] Extra file relative paths are wrong in exported plugin.<br />
* Fixed: Extra paths are not processed in some cases.<br />
* Cleaned up the autorevision stuff, less dependencies.<br />
* Added: Code-statistics for *.cc, *.cxx files in project file options dialog.<br />
* Fixed: MSVC Project import bug where &#8216;-g&#8217; was getting added to Release target.<br />
* Now *.cc files would be recognized as C++ files.<br />
* One code-cleanup in DLL wizard generated source.<br />
* Added cbProject::GetExtensionsNode() and cbProject::AddToExtensions(). The latter is exposed to scripts. Read the function docs on how to use it.<br />
* Added &#8211;safe-mode command-line option (all plugins are disabled on startup).<br />
* Fixed out-of-place builds with autotools (bug #11607).<br />
* Fixed: [Bug #11720] Standard Header Highlighting problem<br />
* Fixed: Highlight mode was not applied when highlight mode is changed from a mode to &#8216;Plain text&#8217;.<br />
* Added IsOpened() check to locale loading<br />
* Add Mach IPC typedefs for Darwin<br />
* Fixed: Out-of-place build fix for Todo plugin.<br />
* Fixed: Couple of assertion failures associated with wxDir.<br />
* Some clean up in Intel compiler detection code.<br />
* make dist fix.<br />
* console-main.c.cpp : no need to include stdlib.h<br />
* wxFNB : fixed: popup dialog not focused on linux (ctrl+tab &amp; smart tabbing)<br />
* autorevision : const correctness and use TiXml handles in QuerySvn<br />
* Fixed: C::B can&#8217;t detect a file with UTF-32LE (with BOM) encoding.<br />
* Include fixes and separation between Manager::GetAppWindow() and Manager::GetAppFrame(), SDK bump to 1.11.12 (could be a few follow up include fixes might follow)<br />
* Replaced &#8220;Log&#8221; with &#8220;Logger&#8221; where it should be<br />
* Did some tuning on the existing loggers<br />
* Added startup code to turn off app logging<br />
* InfoPane can now properly show/hide panels, delete Loggers and non-Loggers<br />
* Moved GUI-Initialisation out of CreateIDE, and after plugin loading, so plugins can add loggers at startup<br />
* Include fixes (this concludes patch 2139)<br />
* Re-added r4272, but without overload operators (should not cause ambiguity now)<br />
* Fixed all SDK documentation errors<br />
* Fixed crash in compiler plugin under certain circumstances (when selecting another target in the combo box).<br />
* All wizards: Do not put output file name in root folder of drive if no path provided<br />
* Made .java files recognized as compileabe sources (no Java support!)<br />
* Backtick&#8217;d expressions cache is not cleared anymore (severe performance hit if many of them are used). Restarting C::B is the only way to clear it.<br />
* Added debugger option not to auto-build before launching.<br />
* Improved Java support any further<br />
* Added &#8220;set default&#8221; for file groups and masks<br />
* Exposed Java binding to scripts<br />
* Minor fixed for Fortran 77/90/95 support<br />
* Improved SDK documentation and documentation of C::B resources<br />
* Add GetCompilerVersionString() to the CompilerFactory and export it for the scripts<br />
* Assembler files support (*.asm)<br />
* Added support for assembler sources (*.s;*.ss)<br />
* Exposed assembler sources to scripts<br />
* Fixed: Crash at Start-up if clicked on the Splash Screen.<br />
* Fixed wrong layout for editor abbreviations causing the Add/Delete keys to be invisible.<br />
* Fixed: Crash in ProjectFileOptions dialog, when the project uses an unavailable compiler.<br />
* Fixed: [Bug #11698] Silent close on multiple instance<br />
* Object files of source files on different drive will now be created inside the Project object directory itself.<br />
* Fixed: [Bug #11785] Tooltip/Function info window does not go away<br />
* Fixed: [Bug #11929] Crash when moving a virtual folder to its subfolder<br />
* Add workspace extension on &#8220;save as&#8221; if none given<br />
* Add support for TriCore, MSP430 and PowerPC<br />
* Fixed: Project file is removed while Rebuilding / Cleaning a Dynamic Library Project.<br />
* Updated: Update script for Linux/Unix to exclude .svn, Makefile and other garbage files.<br />
* cbEVT_APP_STARTUP_DONE is now fired *after* the app has loaded and fully displayed its windows.<br />
* Added configuration options for which lexer keyword sets to be included in code-completion results.<br />
* Display size of generated file after linking.<br />
* Fixed some UI layout errors in project and editor options. Say &#8216;no&#8217; to huge dialogs <img src='http://biplab.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
* Added event cbEVT_QUERY_VIEW_LAYOUT (queries the current view layout).<br />
* Removed debugger options for automatic layout switching. It is all handled automatically now.<br />
* Fixed: Project created from a user-template contains old output file name.<br />
* Fixed: C::B title not updated after creating a project from user-template.<br />
* Fixed a few problems found by Valgrind.<br />
* Fixed: A bug in SetVersionString() which could not detect the version string of MinGW compilers installed in an arbitrary folder.<br />
* Applied: [Patch #2135] MinGW autodetection searching in $PATH<br />
* Fixed another small memory leak found by Valgrind.<br />
* Fixed: Source/Project file open command is sent Twice while opening it through DDE.<br />
* Fixed: [Bug #12014] CodeCompletion doesn&#8217;t start on Code::Blocks startup<br />
* wxFNB and wxAUINotebook selectable via compile time switch<br />
* Removed close button that doesn&#8217;t belong there<br />
* Added: Atmel AVR project wizard (Thanks to BrianSidebotham).<br />
* Applied: [Patch #2191] Patch for Bug #11979 (in modified form)<br />
* Fixed: File association detection code not detecting the files associated.<br />
* Fixed: Wrong pop-up menu in Project Tree.</p>
<p><strong>Core Plugins</strong></p>
<p><strong>AStyle</strong><br />
* Fixed bug 011860: Mouse cursor changes.</p>
<p><strong>Code Completion</strong><br />
* Code-completion now provides support for language keywords, based on the current editor&#8217;s language (only C++ was supported until now).<br />
* ClassBrowserBuilderThread is now a joinable thread. ClassBrowser will now Wait for it to exit before invalidating &#8220;shared&#8221; data.</p>
<p><strong>Compiler</strong><br />
* Support for adding custom files to the build system</p>
<p><strong>Debugger</strong><br />
* Set max value for &#8220;Ignore count before break&#8221;.<br />
* Fixed unable to detect cygwin prefix under HKCU (instead of only HKLM)</p>
<p><strong>Contrib Plugins</strong></p>
<p><strong>CodeSnippets</strong><br />
* Added check for possible garbage window ptr in OnTreeCtrlEvent() and other assorted wxGTK284 fixes<br />
* Fixed TextToFilenames() for list/text containing r &amp; n<br />
* Codesnippets uses GDK functions directly on wGTK, so it needs to link with the GTK2_LIBS too</p>
<p><strong>Envvars</strong><br />
* Fixed choicebox GUI bug under Linux</p>
<p><strong>Help plugin</strong><br />
* Added support to display man pages.<br />
* Converted the MANFrame into a dockable thingy.<br />
* If a man page cannot be found then report it.<br />
* Clicking on links for man pages that provide them will take you to that man page (if found).<br />
* Bugfix: displaying man pages with tables (e.g. find.1) crashes the application (must check if it&#8217;s generating the right output)<br />
* Fixed implementation of QListIterator&lt;T&gt; (the output should be right now)<br />
* Do not show the man page viewer by default<br />
* Bugfix: editing help entries add extra &#8220;Man Pages Viewer&#8221; to the View menu.<br />
* Implemented zoom in and zoom out for the Man Pages Viewer.<br />
* If more than one match is found, let the user choose (tip: use file wildcards).<br />
* Bugfix: bz2 decompression adds garbage at the end of the file (fixed in DevPak plugin too).<br />
* Try to follow .so links in man pages to other man pages.</p>
<p><strong>KeyBinder</strong><br />
* Change AddPendingEvent() to ProcessEvent() in wxMenuCmd::Exec() to avoid crashes when secondary command key would close editors wx284</p>
<p><strong>Source Exporter:</strong><br />
* PDF exporter: fixed crash when the file to be exported had non-ASCII characters.<br />
* Updated wxPdfDocument to version 0.8.0<br />
* Remove warnings from Exporter plugin (wxPdfDocument part)</p>
<p><strong>wxSmith</strong><br />
* Icon property is now used inside generated code and preview<br />
* Added insert-by-pointing-with-mouse mode<br />
* Code generated when adding sizers now contains spaces to be more readable<br />
* Implemented grid for sizer-less resources<br />
* Added border for wxPanel items added into other resources<br />
* Fixed background colour for wxFrame<br />
* Preview for wxPanel resources are now using resizable dialog<br />
* Fixes for few segfaults discovered on linux<br />
* DELETE key now deletes current selection in editor<br />
* Fixed bug #10964<br />
* Update to base properties (cleaned some things up and added ability to fetch position / size of resource from constructor&#8217;s argument)<br />
* Updated new resource generator &#8211; it now gives much more options<br />
* Fixed crash when adding new resource on linux<br />
* Fixed size of new-resource dialog with hidden advanced options on linux<br />
* Added some stubs to support read-only files<br />
* Added include file properties for custom widget (only when using source mode)<br />
* Implemented sorting of properties<br />
* Double click on some item now adds event handler (if there&#8217;s none) of it&#8217;s first event<br />
* Implemented jumping to event handler function body when changing handler / double clicking on item that has main handler set<br />
* Added pop-up menu on right click on resource in resource browser<br />
* Implemented deleting resources (accessible through pop-up menu)<br />
* Fixed crash in wxSmith when closing any open XRC file<br />
* Changed default scopes of ids (now protected) / members (now public) / handlers (now private) in new resources<br />
* Scopes can be customized in Advanced options while generating new resource<br />
* Added cols / rows for wxGrid when editing in source mode (Grom: you owe me a beer <img src='http://biplab.in/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )<br />
* Added customized popup menu for wxNotebook (other x-book classes soon, after wxNotebook is finished)<br />
* Added &#8220;Bring to front&#8221; / &#8220;Send to back&#8221; popup menu for items which are not managed inside sizers &#8211; available in right-click popup menu in editor (this can be used to set correct tab order)<br />
* Fixed issues with wxArtProvider<br />
* Fixed some issues with wxNotebook (and probably other ..book classes)</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/10/codeblocks-august-september-month-update-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save Bandwidth &#8211; Download Delta-ISO</title>
		<link>http://biplab.in/2007/08/save-bandwidth-download-delta-iso/</link>
		<comments>http://biplab.in/2007/08/save-bandwidth-download-delta-iso/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 18:28:15 +0000</pubDate>
		<dc:creator>biplab</dc:creator>
				<category><![CDATA[Free/Open Source]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://biplab.in/2007/08/15/save-bandwidth-dowload-delta-iso/</guid>
		<description><![CDATA[If you love to try latest GNU/Linux distributions then you may save yourself from downloading full Linux ISO everytime a new version has released. As the Linux ISOs are large in size, downloading them burns a huge amount of bandwidth &#8230; <a href="http://biplab.in/2007/08/save-bandwidth-download-delta-iso/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you love to try latest GNU/Linux distributions then you may save yourself from downloading full Linux ISO everytime a new version has released. As the Linux ISOs are large in size, downloading them burns a huge amount of bandwidth both for the publisher and the end-user.</p>
<p>Couple of GNU/Linux distributors including OpenSUSE, Sabayon have started publishing <strong>Delta-ISO</strong>. This is basically an ISO file containing only the additions/updates/changes with respect to an old version. It contains binary diff of all the distributed packages. Thus the ISO is smaller to download.</p>
<p>On 9th August, 2007 OpenSUSE-10.3 Beta 1 was released. In the next few paragraphs, you&#8217;ll learn to convert the delta-iso to a full iso. I had downloaded OpenSUSE-10.3 Alpha 7 iso (<strong>openSUSE-10.3-Alpha7-GNOME-i386.iso</strong>) earlier. To create a New ISO of OpenSUSE-10.3-Beta 1, we need a delta ISO. Now browse to the following folder in any OpenSUSE mirror and download the appropriate delta iso.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/pub/opensuse/distribution/10.3-Alpha7/iso/delta/</pre></div></div>

<p>For me, <strong>openSUSE-10.3-Alpha7_Beta1-GNOME-i386.delta.iso</strong>, is the appropriate one.</p>
<p>Now download <a href="http://gifuyana.com/wapplydeltaiso/wapplydeltaiso.html" target="_blank">applydeltaiso</a> utility (for Windows). Then in the command line issue the following command. There&#8217;s a bare minimum GUI of applydeltaiso utility at the same link. You may wish to use the graphical utility, too.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">applydeltaiso openSUSE-10.3-Alpha7-GNOME-i386.iso
              openSUSE-10.3-Alpha7_Beta1-GNOME-i386.delta.iso
              openSUSE-10.3-Beta1-GNOME-i386.delta.iso</pre></div></div>

<p>Voila!! After 5-10 minutes (depending upon your hard-disc speed) you&#8217;ll get a new ISO by downloading just 189 MB of data!!</p>
<p>But please keep the following points in mind.</p>
<ol>
<li>Your hard disc should have enough space to create the new iso.</li>
<li>If you are using FAT32, then 2GB limit will be applicable to you.</li>
<li>Don&#8217;t forget to verify the new ISO by comparing it&#8217;s MD5 checksum with the one published by publisher (in this case OpenSUSE).</li>
</ol>
<p>So keep enjoying latest changes in GNU/Linux world!</p>
]]></content:encoded>
			<wfw:commentRss>http://biplab.in/2007/08/save-bandwidth-download-delta-iso/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

