[codeblocks]$ patch -p0 <dprogramming.patch
(Stripping trailing CRs from patch.)
patching file src/plugins/codecompletion/codecompletion.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilerDMD.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilerDMD.h
(Stripping trailing CRs from patch.)
patching file src/plugins/compilergcc/compilergcc.cpp
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/common_functions.script
Hunk #1 FAILED at 31.
Hunk #2 FAILED at 65.
Hunk #3 FAILED at 130.
3 out of 3 hunks FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/common_functions.script.rej
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/d/console/hello.d
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/d/console/hello.d.rej
(Stripping trailing CRs from patch.)
patching file src/plugins/scriptedwizard/resources/d/wizard.script
Hunk #1 FAILED at 17.
Hunk #2 FAILED at 29.
2 out of 2 hunks FAILED -- saving rejects to file src/plugins/scriptedwizard/resources/d/wizard.script.rej
(Stripping trailing CRs from patch.)
patching file src/sdk/resources/lexers/lexer_d.sample
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 14.
2 out of 2 hunks FAILED -- saving rejects to file src/sdk/resources/lexers/lexer_d.sample.rej
(Stripping trailing CRs from patch.)
patching file src/sdk/resources/lexers/lexer_d.xml
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 122.
2 out of 2 hunks FAILED -- saving rejects to file src/sdk/resources/lexers/lexer_d.xml.rej
common_functions.script.rej
***************
*** 31,37 ****
base.AddCompilerOption(_T("-Wall"));
}
else if ( GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*"))
- || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")) )
{
base.AddCompilerOption(_T("-w"));
}
--- 31,37 ----
base.AddCompilerOption(_T("-Wall"));
}
else if ( GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*"))
+ || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")) )
{
base.AddCompilerOption(_T("-w"));
}
***************
*** 65,80 ****
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("ppc*"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("cygwin"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmc"))
- || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gcc"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gdc"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("tcc")) )
{
base.AddCompilerOption(_T("-g"));
- if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")))
{
- base.AddCompilerOption(_T("-debug"));
}
}
else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*")))
--- 65,80 ----
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("ppc*"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("cygwin"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmc"))
+ || GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gcc"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("gdc"))
|| GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("tcc")) )
{
base.AddCompilerOption(_T("-g"));
+ if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")))
{
+ base.AddLinkerOptions(_T("-g"));
}
}
else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("bcc*")))
***************
*** 130,136 ****
{
base.AddCompilerOption(_T("-Os"));
}
- else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd")))
{
base.AddCompilerOption(_T("-O"));
}
--- 130,136 ----
{
base.AddCompilerOption(_T("-Os"));
}
+ else if (GetCompilerFactory().CompilerInheritsFrom(compilerID, _T("dmd*")))
{
base.AddCompilerOption(_T("-O"));
}
[b]/src/plugins/scriptedwizard/resources/d/console/hello.d.rej[/b]
[code]
***************
*** 1,10 ****
- version(Tango) extern (C) int printf(char *, ...);
- int main(char[][] args)
{
- printf("hello world\n");
- printf("args.length = %d\n", args.length);
- for (int i = 0; i < args.length; i++)
- printf("args[%d] = '%s'\n", i, cast(char *)args[i]);
- return 0;
}
--- 1,9 ----
+ module main;
+ import std.stdio;
+
+ int main(string[] args)
{
+ writefln("Hello World\n");
+ return 0;
}
./src/plugins/scriptedwizard/resources/d/wizard.script.rej
***************
*** 17,23 ****
// add builtin pages
Wizard.AddInfoPage(_T("DIntro"), intro_msg); // intro
Wizard.AddProjectPathPage(); // select project name and path
- Wizard.AddCompilerPage(_T(""), _T("dmd;gdc"), true, true); // select compiler and configurations
// nothing more needs to be done here
}
--- 17,23 ----
// add builtin pages
Wizard.AddInfoPage(_T("DIntro"), intro_msg); // intro
Wizard.AddProjectPathPage(); // select project name and path
+ Wizard.AddCompilerPage(_T(""), _T("dmd1;dmd2;gdc"), true, true); // select compiler and configurations
// nothing more needs to be done here
}
***************
*** 29,35 ****
function SetupProject(project)
{
// enable compiler warnings (project-wide)
- if (Wizard.GetCompilerID().Matches(_T("gdc")))
WarningsOn(project, Wizard.GetCompilerID());
// Debug build target
--- 29,35 ----
function SetupProject(project)
{
// enable compiler warnings (project-wide)
+ if (Wizard.GetCompilerID().Matches(_T("dmd1")))
WarningsOn(project, Wizard.GetCompilerID());
// Debug build target
./src/sdk/resources/lexers/lexer_d.sample.rej
***************
*** 1,13 ****
- /*
- * Sample preview code
- * This is a block comment
*/
-
- /++
- A Super Block
- ++/
- import std.file;
/**
* This is a documentation comment block
--- 1,12 ----
+ /**
+ * This is a Ddoc block comment
+ * Authors: Melvin D. Nerd, melvin@mailinator.com
+ * Bugs: Doesn't work for negative values.
+ * Date: March 14, 2003
*/
+ module hello;
+ import std.stdio;
/**
* This is a documentation comment block
***************
*** 15,33 ****
* @authr some user (this is the documentation keyword error)
*/
- int main(char[] args)
{
- /// This is a documentation comment line
- int[20] numbers;
int average = 0;
char ch = '\n';
- for (int i = 0; i < 20; ++i) // a breakpoint is set
- {
- numbers[i] = i; // active line (during debugging)
- total += i; // error line
- }
- average = total / 20;
- printf("%d\n%d\n", numbers[0], numbers[19]);
- printf("total: %d average: %d\n", total, average);
}
-
--- 14,65 ----
* @authr some user (this is the documentation keyword error)
*/
+ void main(string[] args)
{
+ /*
+ * Sample preview code
+ * This is a block comment
+ */
+
+ /// Deprecated: superseded by function bar().
+ void foo() { }
+
+ int numbers[20];
int average = 0;
char ch = '\n';
+ int a = /+ Nested Comment +/ 1;
+ int b = 2; // Line Comment
+
+ writefln("Hello World, Reloaded");
+
+ // auto type inference and built-in foreach
+ foreach (argc, argv; args)
+ {
+ // Improved typesafe printf
+ writeln("argc: ", argc, " arg: ", argv);
+ }
+
+ // Nested structs and classes
+ struct specs
+ {
+ // all members automatically initialized
+ int count, allocated;
+ }
+
+ // Nested functions can refer to outer
+ // variables like args
+ specs argspecs()
+ {
+ specs* s = new specs;
+ // no need for '->'
+ s.count = args.length; // get length of array with .length
+ s.allocated = typeof(args).sizeof; // built-in native type properties
+ foreach (argv; args)
+ s.allocated += argv.length * typeof(argv[0]).sizeof;
+ return *s;
+ }
+
+ // built-in string and common string operations
+ writefln("argc = %d, " ~ "allocated = %d",
+ argspecs().count, argspecs().allocated);
}
./src/sdk/resources/lexers/lexer_d.xml.rej
***************
*** 3,102 ****
<CodeBlocks_lexer_properties>
<Lexer name="D"
index="79"
- filemasks="*.d,*.dmd,*.di">
<Style name="Default"
index="0"
fg="0,0,0"
- bg="255,255,255"
bold="0"
italics="0"
underlined="0"/>
- <Style name="Comment (normal)"
- index="1,2"
- fg="160,160,160"/>
<Style name="Comment (nested)"
index="4"
- fg="160,160,160"/>
- <Style name="Comment (documentation)"
- index="3,15"
- fg="128,128,255"
- bold="1"/>
- <Style name="Comment keyword (documentation)"
- index="16"
- fg="0,128,128"/>
- <Style name="Comment keyword error (documentation)"
- index="17"
- fg="128,0,0"/>
<Style name="Number"
index="5"
- fg="240,0,240"/>
- <Style name="Keyword"
- index="6,7"
- fg="0,0,160"
- bold="1"/>
- <Style name="User keyword"
index="8"
- fg="0,160,0"
- bold="1"/>
- <Style name="Typedef"
index="9"
- fg="0,160,0"/>
<Style name="String"
- index="10,11"
- fg="0,0,255"/>
<Style name="Character"
index="12"
- fg="224,160,0"/>
<Style name="Operator"
index="13"
- fg="255,0,0"/>
<Style name="Selection"
index="-99"
- bg="192,192,192"/>
<Style name="Active line"
index="-98"
- bg="255,255,160"/>
<Style name="Breakpoint line"
index="-2"
- bg="255,160,160"/>
<Style name="Debugger active line"
index="-3"
- bg="160,160,255"/>
<Style name="Compiler error line"
index="-4"
- bg="255,128,0"/>
<Style name="Matching brace highlight"
index="34"
fg="255,0,0"
- bold="1"
- underlined="1"/>
<Style name="No matching brace highlight"
index="35"
bg="255,0,0"/>
<Keywords>
- <Language index="0"
- value="abstract alias align asm assert auto
- body bool break byte
- case cast catch cdouble cent cfloat char
- class const continue creal
- dchar debug default delegate delete
- deprecated do double
- else enum export extern
- false final finally float for foreach foreach_reverse function
- goto
- idouble if ifloat import in inout int interface invariant ireal is
- lazy long
- macro mixin module
- new null out override
- package pragma private protected public
- real ref return
- scope short static struct super switch synchronized
- template this throw true try typedef typeid typeof
- ubyte ucent uint ulong union unittest ushort
- version void volatile
- wchar while with"/>
- <User index="1"/>
- <Documentation index="2"
value="a addindex addtogroup anchor arg attention
author b brief bug c class code date def defgroup deprecated dontinclude
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
--- 3,117 ----
<CodeBlocks_lexer_properties>
<Lexer name="D"
index="79"
+ filemasks="*.d,*.dd,*.di">
<Style name="Default"
index="0"
fg="0,0,0"
+ bg="239,240,225"
bold="0"
italics="0"
underlined="0"/>
+ <Style name="Comment"
+ index="1"
+ fg="0,128,0"/>
+ <Style name="Commentline"
+ index="2"
+ fg="0,128,0"/>
+ <Style name="Comment (doc)"
+ index="3"
+ fg="107,107,107"
+ italics="1"/>
<Style name="Comment (nested)"
index="4"
+ fg="107,107,107"
+ italics="1"/>
<Style name="Number"
index="5"
+ fg="0,100,100"/>
+ <Style name="Keyword 1"
+ index="6"
+ fg="0,0,255"/>
+ <Style name="Keyword 2"
+ index="7"
+ fg="0,0,255"/>
+ <Style name="Keyword 3"
index="8"
+ fg="0,0,255"/>
+ <Style name="Keyword 4"
index="9"
+ fg="0,0,255"/>
<Style name="String"
+ index="10,11,18"
+ fg="219,0,14"/>
+ <Style name="Rawstring"
+ index="19"
+ fg="219,0,14"/>
<Style name="Character"
index="12"
+ fg="193,135,0"/>
<Style name="Operator"
index="13"
+ fg="0,0,0"/>
+ <Style name="Identifier"
+ index="14"
+ fg="0,0,0"/>
+ <Style name="Commentline (doc)"
+ index="15"
+ fg="107,107,107"
+ italics="1"/>
+ <Style name="Comment keyword (doc)"
+ index="16"
+ fg="0,128,128"
+ italics="1"/>
+ <Style name="Comment keyword error (doc)"
+ index="17"
+ fg="128,0,0"
+ italics="1"
+ bold="1"/>
+ <Style name="Keyword 5"
+ index="20"
+ fg="0,113,240"/>
+ <Style name="Keyword 6"
+ index="21"
+ fg="0,0,102"/>
+ <Style name="Keyword 7"
+ index="22"
+ fg="153,0,112"/>
<Style name="Selection"
index="-99"
+ bg="10,36,106"
+ fg="255,255,255"/>
<Style name="Active line"
index="-98"
+ bg="231,231,232"/>
<Style name="Breakpoint line"
index="-2"
+ bg="150,58,70"
+ fg="255,255,255"/>
<Style name="Debugger active line"
index="-3"
+ bg="53,61,100"
+ fg="0,0,0"/>
<Style name="Compiler error line"
index="-4"
+ underlined="1"/>
<Style name="Matching brace highlight"
index="34"
fg="255,0,0"
+ bold="1"/>
<Style name="No matching brace highlight"
index="35"
bg="255,0,0"/>
<Keywords>
+ <Set index="0" value="void byte bool ubyte short ushort int uint long ulong cent ucent float double real ifloat
+ idouble ireal cfloat cdouble creal char wchar dchar body asm bool true false function delegate"/>
+ <Set index="1" value="public private protected with extern
+ final abstract override const debug version pragma public private deprecated protected volatile
+ class struct interface enum new this null delete invariant super union template
+
+ is import module alias typedef with cast package typeof typeid classinfo mixin
+ in out const static inout lazy ref extern export auto align scope pure"/>
+ <Set index="2"
value="a addindex addtogroup anchor arg attention
author b brief bug c class code date def defgroup deprecated dontinclude
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception
***************
*** 107,112 ****
sa section see showinitializer since skip skipline struct subsection
test throw todo typedef union until
var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }"/>
</Keywords>
<SampleCode value="lexer_d.sample"
breakpoint_line="20"
--- 122,129 ----
sa section see showinitializer since skip skipline struct subsection
test throw todo typedef union until
var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }"/>
+ <Set index="3"
+ value="if for foreach while do assert return unittest try catch else throw switch case break continue default finally goto synchronized"/>
</Keywords>
<SampleCode value="lexer_d.sample"
breakpoint_line="20"
[/code]
I get errors when trying to patch with svn6354:
C:\codeblocks>patch -p0 < d_v8_win.patch
patching file debian/changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file debian/changelog.rej
patching file src/plugins/compilergcc/compilerDMD.h
patching file src/plugins/compilergcc/compilerD.h
patching file src/plugins/compilergcc/compilerGDC.h
patching file src/plugins/compilergcc/compilerDMD.cpp
Hunk #1 succeeded at 7 with fuzz 1.
patching file src/plugins/compilergcc/compilerD.cpp
patching file src/plugins/compilergcc/compilergcc.cpp
patching file src/plugins/compilergcc/compilerGDC.cpp
patching file src/plugins/scriptedwizard/resources/common_functions.script
patching file src/plugins/scriptedwizard/resources/d/console/hello.d
patching file src/plugins/scriptedwizard/resources/d/wizard.script
patching file src/plugins/codecompletion/codecompletion.cpp
patching file src/sdk/resources/lexers/lexer_d.xml
patching file src/sdk/resources/lexers/lexer_d.sample
patching file src/CodeBlocks-unix.cbp
Hunk #1 succeeded at 1140 (offset 14 lines).
patching file src/CodeBlocks.cbp
Hunk #1 succeeded at 1279 (offset 53 lines).
changelog.rej:
***************
*** 1,4 ****
- codeblocks (8.02svn5933) unstable; urgency=low
* more fixes to debian build system, sources and packages are now
lintian-clean, except for some words guessed as spelling-errors.
--- 1,4 ----
+ codeblocks (8.02svn6198) unstable; urgency=low
* more fixes to debian build system, sources and packages are now
lintian-clean, except for some words guessed as spelling-errors.
And then I get errors trying to build CB. Build Log:
||=== Code::Blocks, Compiler ===|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|40|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|6|error: 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const' previously defined here|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|59|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|25|error: 'wxString CompilerD::GetCmdOutput(wxString) const' previously defined here|
||=== Build finished: 4 errors, 0 warnings ===|
||=== Build finished: 4 errors, 0 warnings ===|
Hope this helps..
Edit: Forgot to mention this is on XP-32bit
Also have problems patching. This is with the 10.05 source.
patching file changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file changelog.rej
patching file compilerDMD.h
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file compilerDMD.h.rej
patching file compilerD.h
patching file compilerGDC.h
Hunk #1 FAILED at 6.
Hunk #2 succeeded at 18 with fuzz 3 (offset -1 lines).
1 out of 2 hunks FAILED -- saving rejects to file compilerGDC.h.rej
patching file compilerDMD.cpp
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 17.
Hunk #3 succeeded at 110 with fuzz 3 (offset -1 lines).
Hunk #4 FAILED at 153.
3 out of 4 hunks FAILED -- saving rejects to file compilerDMD.cpp.rej
patching file compilerD.cpp
patching file compilergcc.cpp
Hunk #1 FAILED at 393.
1 out of 1 hunk FAILED -- saving rejects to file compilergcc.cpp.rej
patching file compilerGDC.cpp
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 83.
Hunk #3 succeeded at 108 with fuzz 3 (offset -1 lines).
Hunk #4 succeeded at 195 with fuzz 3 (offset -2 lines).
Hunk #5 FAILED at 252.
3 out of 5 hunks FAILED -- saving rejects to file compilerGDC.cpp.rej
patching file common_functions.script
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 65.
Hunk #3 FAILED at 115.
Hunk #4 FAILED at 130.
4 out of 4 hunks FAILED -- saving rejects to file common_functions.script.rej
patching file hello.d
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file hello.d.rej
patching file wizard.script
Hunk #1 FAILED at 17.
Hunk #2 FAILED at 28.
2 out of 2 hunks FAILED -- saving rejects to file wizard.script.rej
patching file codecompletion.cpp
Hunk #1 succeeded at 78 with fuzz 3 (offset -1 lines).
Hunk #2 FAILED at 644.
1 out of 2 hunks FAILED -- saving rejects to file codecompletion.cpp.rej
patching file lexer_d.xml
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 68.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.xml.rej
patching file lexer_d.sample
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.sample.rej
patching file CodeBlocks-unix.cbp
Hunk #1 succeeded at 1125 with fuzz 3 (offset -1 lines).
patching file CodeBlocks.cbp
Hunk #1 succeeded at 1225 with fuzz 3 (offset -1 lines).
Using:
patch -F 100 < d_v8_unix.patch
On Ubuntu 10.04. Didn't try to compile it.
If this could work with the latest SVN, or this release, that would be great.
Start by selecting which strings are translatable and mark them with the _() macro.
From http://wiki.wxwidgets.org/Internationalization
http://www.wxwidgets.org/docs/faqcmn.htm#wxtmacro
You are changing text from _("Words") to _T("Words") this is likely wrong if the words are supposed to be translated.
@@ -83,12 +87,12 @@
m_Options.ClearOptions();
m_Options.AddOption(_("Produce debugging symbols"),
- _T("-g"),
- _("Debugging"),
+ _T("-gc"),
+ _T("Debugging"),
_T(""),
true,
_T("-O -O1 -O2 -O3 -Os"),
- _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+ _T("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
wxString gprof_link = _T("-pg");
if (platform::windows)
gprof_link = _T("-pg -lgmon");
Tim S.