Difference between revisions of "Building an Non-Unicode Win32 Code::Blocks"

From CodeBlocks
Jump to: navigation, search
Line 14: Line 14:
 
== Needed files  ==
 
== Needed files  ==
  
=== sed script file ===
+
=== sed script file and batch files===
 
==== ANSI.sed ====
 
==== ANSI.sed ====
 
  s/<Variable name="WX_SUFFIX" value="u" \/>/<Variable name="WX_SUFFIX" value="" \/>/g
 
  s/<Variable name="WX_SUFFIX" value="u" \/>/<Variable name="WX_SUFFIX" value="" \/>/g
Line 104: Line 104:
 
  PAUSE
 
  PAUSE
 
   
 
   
 +
=== Code::Blocks workspace file for Non-Unicode Build ===
 
==== ContribPlugins-ANSI.workspace ====
 
==== ContribPlugins-ANSI.workspace ====
 
  &lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&gt;
 
  &lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&gt;

Revision as of 20:56, 26 September 2008


Prerequisites

Working Code::Blocks

Code::Blocks Source Code

Non-Unicode build of wxWidgets

GnuWin32 sed.exe

http://gnuwin32.sourceforge.net/packages.html

Needed files

sed script file and batch files

ANSI.sed

s/<Variable name="WX_SUFFIX" value="u" \/>/<Variable name="WX_SUFFIX" value="" \/>/g
s/<Add option="-DwxUSE_UNICODE" \/>$/<Add option="-DwxUSE_UNICODE=0" \/>$/g
s/<Add option="-DwxUSE_UNICODE=1" \/>$/<Add option="-DwxUSE_UNICODE=0" \/>$/g

sed-ANSI-out.bat

setlocal
REM Set to the folder containing the SED script
set SEDFOLDER=%CD%
REM Set to the sed script file name
set SEDFILE=ANSI.sed

REM set to the Top Code::Blocks folder
set CBFOLDER=%CD%\codeblocks

cd %CBFOLDER%\src
sed --separate --file=%SEDFOLDER%\%SEDFILE% CodeBlocks.cbp > CodeBlocks-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\AutoVersioning
sed --separate --file=%SEDFOLDER%\%SEDFILE% AutoVersioning.cbp > AutoVersioning-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\BrowseTracker
sed --separate --file=%SEDFOLDER%\%SEDFILE% BrowseTracker.cbp > BrowseTracker-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\byogames
sed --separate --file=%SEDFOLDER%\%SEDFILE% byogames.cbp > byogames-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\cb_koders
sed --separate --file=%SEDFOLDER%\%SEDFILE% cb_koders.cbp > cb_koders-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\codesnippets
sed --separate --file=%SEDFOLDER%\%SEDFILE% codesnippets.cbp > codesnippets-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\codestat
sed --separate --file=%SEDFOLDER%\%SEDFILE% codestat.cbp > codestat-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\copystrings
sed --separate --file=%SEDFOLDER%\%SEDFILE% copystrings.cbp > copystrings-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\devpak_plugin
sed --separate --file=%SEDFOLDER%\%SEDFILE% DevPakPlugin.cbp > DevPakPlugin-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\dragscroll
sed --separate --file=%SEDFOLDER%\%SEDFILE% dragscroll.cbp > dragscroll-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\envvars
sed --separate --file=%SEDFOLDER%\%SEDFILE% envvars.cbp > envvars-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\headerfixup
sed --separate --file=%SEDFOLDER%\%SEDFILE% headerfixup.cbp > headerfixup-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\help_plugin
sed --separate --file=%SEDFOLDER%\%SEDFILE% help-plugin.cbp > help-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\keybinder
sed --separate --file=%SEDFOLDER%\%SEDFILE% keybinder.cbp > keybinder-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\lib_finder
sed --separate --file=%SEDFOLDER%\%SEDFILE% lib_finder.cbp > lib_finder-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\profiler
sed --separate --file=%SEDFOLDER%\%SEDFILE% cbprofiler.cbp > cbprofiler-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\regex_testbed
sed --separate --file=%SEDFOLDER%\%SEDFILE% RegExTestbed.cbp > RegExTestbed-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\source_exporter
sed --separate --file=%SEDFOLDER%\%SEDFILE% Exporter.cbp > Exporter-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\symtab
sed --separate --file=%SEDFOLDER%\%SEDFILE% symtab.cbp > symtab-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\ThreadSearch
sed --separate --file=%SEDFOLDER%\%SEDFILE% ThreadSearch.cbp > ThreadSearch-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\wxSmith
sed --separate --file=%SEDFOLDER%\%SEDFILE% wxSmith.cbp > wxSmith-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\wxSmithContribItems
sed --separate --file=%SEDFOLDER%\%SEDFILE% wxSmithContribItems.cbp > wxSmithContribItems-ANSI.cbp

cd %CBFOLDER%\src\plugins\contrib\HexEditor
sed --separate --file=%SEDFOLDER%\%SEDFILE% HexEditor-win.cbp > HexEditor-win-ANSI.cbp

cd %CBFOLDER%\src\tools\cb_share_config
sed --separate --file=%SEDFOLDER%\%SEDFILE% cb_share_config.cbp > cb_share_config-ANSI.cbp

PAUSE

Code::Blocks workspace file for Non-Unicode Build

ContribPlugins-ANSI.workspace

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
	<Workspace title="All contrib plugins">
		<Project filename="plugins\contrib\AutoVersioning\AutoVersioning-ANSI.cbp" active="1" />
		<Project filename="plugins\contrib\BrowseTracker\BrowseTracker-ANSI.cbp" />
		<Project filename="plugins\contrib\byogames\byogames-ANSI.cbp" />
		<Project filename="plugins\contrib\cb_koders\cb_koders-ANSI.cbp" />
		<Project filename="plugins\contrib\codesnippets\codesnippets-ANSI.cbp" />
		<Project filename="plugins\contrib\codestat\codestat-ANSI.cbp" />
		<Project filename="plugins\contrib\copystrings\copystrings-ANSI.cbp" />
		<Project filename="plugins\contrib\devpak_plugin\DevPakPlugin-ANSI.cbp" />
		<Project filename="plugins\contrib\dragscroll\dragscroll-ANSI.cbp" />
		<Project filename="plugins\contrib\envvars\envvars-ANSI.cbp" />
		<Project filename="plugins\contrib\headerfixup\headerfixup-ANSI.cbp" />
		<Project filename="plugins\contrib\help_plugin\help-plugin-ANSI.cbp" />
		<Project filename="plugins\contrib\keybinder\keybinder-ANSI.cbp" />
		<Project filename="plugins\contrib\lib_finder\lib_finder-ANSI.cbp" />
		<Project filename="plugins\contrib\profiler\cbprofiler-ANSI.cbp" />
		<Project filename="plugins\contrib\regex_testbed\RegExTestbed-ANSI.cbp" />
		<Project filename="plugins\contrib\source_exporter\Exporter-ANSI.cbp" />
		<Project filename="plugins\contrib\symtab\symtab-ANSI.cbp" />
		<Project filename="plugins\contrib\ThreadSearch\ThreadSearch-ANSI.cbp" />
		<Project filename="plugins\contrib\wxSmith\wxSmith-ANSI.cbp" />
		<Project filename="plugins\contrib\wxSmithContribItems\wxSmithContribItems-ANSI.cbp" />
		<Project filename="plugins\contrib\HexEditor\HexEditor-win-ANSI.cbp" />
		<Project filename="tools\cb_share_config\cb_share_config-ANSI.cbp" />
	</Workspace>
</CodeBlocks_workspace_file>

Steps to modify Code::Blocks projects for Non-Unicode Build