hello all, I've recently fixed the project importer a bit to actually do what it's supposed to do.
for MSVC 10+ projects, it should now import them with almost all config values so that you can import and compile right away (without the need to set up anything manually)
This was previously not given as it basically only imported files but no flags at all (debug wasn't debug, UNICODE not defined, no optimizations, missing libs etc.)
Sadly this patch is quite huge and changed almost everything, and some might not be happy with it at all
Since I've only updated the msvc10loader not the 7 one... (as I don't care about that one and have no projects to test with anyway)
So the importer for 10+ is quite different to the 7 one.. (you guys tried to keep it in sync...)
Here's a list of actual changes compared to before:
- Import and understand every possible flag for the ability to compile right away. (not perfect, but works so far)
such as: charset, obj dir, out dir, release/debug, lib name, optimization, runtime, warning level, disabled warnings, output file (also Console and StaticLibrary project types) - Not only add compiler/linker flags, also add pre/post compile commands
- Ability to differentiate between global and target flags, also better parsing of values
- Macro replacement improved, it now uses the actual Workspace path for $(SolutionDir) etc.
- Adding some default shit for MSVC (libs, pdb file name etc.)
- Actually being able to parse MSVC 12+ files
- Small code cleanup, improvements and bug fixes
For msvc compiler flags:
- changed /DEBUG to lowercase
- I guess "check against "/NDEBUG"" should have been the define: "/DNDEBUG" (couldn't find /NDEBUG as an option and only know about NDEBUG as define)
- added option "Name .pdb same as output file" (which is necessary since the pdb files will otherwise be named after the VC version)
- added character set options such as UNICODE and deprecated MultiByte
- added missing linker warning parsing (caused me once a lot of troubles) also allow exclamation marks in paths (I know it's normally not used, but I use them from time to time, and it doesn't hurt to properly allow it They are valid characters after all)
- added missing runtime library to known ones (static multi-threaded debug)
Also added exclamation marks (!) to global warning/error regexs
Index: options_common_re-gf.xml
===================================================================
--- options_common_re-gf.xml (revision 9661)
+++ options_common_re-gf.xml (working copy)
@@ -6,7 +6,7 @@
msg="4"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Preprocessor error"
type="error"
@@ -13,7 +13,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
</RegEx>
<RegEx name="Compiler warning"
type="warning"
@@ -20,7 +20,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Compiler error (2)"
type="error"
@@ -27,7 +27,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
</RegEx>
<RegEx name="Compiler error (3)"
type="error"
@@ -38,7 +38,7 @@
type="warning"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Linker error"
type="error"
@@ -45,19 +45,19 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
</RegEx>
<RegEx name="Linker error (2)"
type="error"
msg="2"
file="1">
- <![CDATA[[][{}() \t#%$~[:alnum:]&_:+/\.-]+\(.text\+[0-9A-Za-z]+\):([ \tA-Za-z0-9_:+/\.-]+):[ \t](.*)]]>
+ <![CDATA[[][{}() \t#%$!~[:alnum:]&_:+/\.-]+\(.text\+[0-9A-Za-z]+\):([ \tA-Za-z0-9_:+/\.-]+):[ \t](.*)]]>
</RegEx>
<RegEx name="Linker error (3)"
type="error"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):(.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):(.*)]]>
</RegEx>
<RegEx name="Linker error (lib not found)"
type="error"
@@ -75,7 +75,7 @@
type="error"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t](undefined reference.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):[ \t](undefined reference.*)]]>
</RegEx>
<RegEx name="General warning"
type="warning"
Index: options_common_re.xml
===================================================================
--- options_common_re.xml (revision 9661)
+++ options_common_re.xml (working copy)
@@ -10,7 +10,7 @@
type="info"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t]+([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):[ \t]+([iI]n ([cC]lass|[cC]onstructor|[dD]estructor|[fF]unction|[mM]ember [fF]unction).*)]]>
</RegEx>
<RegEx name="'Skipping N instantiation contexts' info (2)"
type="info"
@@ -17,7 +17,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
</RegEx>
<RegEx name="'Skipping N instantiation contexts' info"
type="info"
@@ -24,13 +24,13 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]+(\[[ \t]+[Ss]kipping [0-9]+ instantiation contexts[ \t]+\])]]>
</RegEx>
<RegEx name="'In instantiation' warning"
type="warning"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t]+([Ii]n [Ii]nstantiation.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):[ \t]+([Ii]n [Ii]nstantiation.*)]]>
</RegEx>
<RegEx name="'Required from' warning"
type="warning"
@@ -37,7 +37,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+([Rr]equired from.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+([Rr]equired from.*)]]>
</RegEx>
<RegEx name="'Instantiated from' info (2)"
type="info"
@@ -44,7 +44,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+([Ii]nstantiated from .*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]+([Ii]nstantiated from .*)]]>
</RegEx>
<RegEx name="'Instantiated from' info"
type="info"
@@ -51,7 +51,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]+([Ii]nstantiated from .*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]+([Ii]nstantiated from .*)]]>
</RegEx>
<RegEx name="Resource compiler error"
type="error"
@@ -58,7 +58,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[windres.exe:[ \t]([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
+ <![CDATA[windres.exe:[ \t]([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
</RegEx>
<RegEx name="Resource compiler error (2)"
type="error"
@@ -70,7 +70,7 @@
msg="4"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Compiler note (2)"
type="info"
@@ -77,7 +77,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]([Nn]ote:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]([Nn]ote:[ \t].*)]]>
</RegEx>
<RegEx name="Compiler note"
type="info"
@@ -84,7 +84,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Nn]ote:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Nn]ote:[ \t].*)]]>
</RegEx>
<RegEx name="General note"
type="info"
@@ -96,7 +96,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
</RegEx>
<RegEx name="Compiler warning (2)"
type="warning"
@@ -103,7 +103,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Compiler warning"
type="warning"
@@ -110,7 +110,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Undefined reference (2)"
type="error"
@@ -117,7 +117,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[[][{}() \t#%$~[:alnum:]&_:+/\.-]+\.o:([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](undefined reference.*)]]>
+ <![CDATA[[][{}() \t#%$!~[:alnum:]&_:+/\.-]+\.o:([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](undefined reference.*)]]>
</RegEx>
<RegEx name="Compiler error (2)"
type="error"
@@ -124,7 +124,7 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
</RegEx>
<RegEx name="Compiler error"
type="error"
@@ -131,13 +131,13 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[ \t](.*)]]>
</RegEx>
<RegEx name="Linker warning"
type="warning"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):[ \t]([Ww]arning:[ \t].*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):[ \t]([Ww]arning:[ \t].*)]]>
</RegEx>
<RegEx name="Linker error"
type="error"
@@ -144,19 +144,19 @@
msg="3"
file="1"
line="2">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):([0-9]+):[0-9]+:[ \t](.*)]]>
</RegEx>
<RegEx name="Linker error (2)"
type="error"
msg="2"
file="1">
- <![CDATA[[][{}() \t#%$~[:alnum:]&_:+/\.-]+\(.text\+[0-9A-Za-z]+\):([ \tA-Za-z0-9_:+/\.-]+):[ \t](.*)]]>
+ <![CDATA[[][{}() \t#%$!~[:alnum:]&_:+/\.-]+\(.text\+[0-9A-Za-z]+\):([ \tA-Za-z0-9_:+/\.-]+):[ \t](.*)]]>
</RegEx>
<RegEx name="Linker error (3)"
type="error"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):(.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):\(\.text\+[0-9a-fA-FxX]+\):(.*)]]>
</RegEx>
<RegEx name="Linker error (lib not found)"
type="error"
@@ -191,7 +191,7 @@
type="error"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t](undefined reference.*)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):[ \t](undefined reference.*)]]>
</RegEx>
<RegEx name="General error"
type="error"
@@ -212,6 +212,6 @@
type="warning"
msg="2"
file="1">
- <![CDATA[([][{}() \t#%$~[:alnum:]&_:+/\.-]+):[ \t]+(duplicate section.*has different size)]]>
+ <![CDATA[([][{}() \t#%$!~[:alnum:]&_:+/\.-]+):[ \t]+(duplicate section.*has different size)]]>
</RegEx>
</CodeBlocks_compiler_options>
(could only attach 2 attachments... so inline....)PS: does anyone know how to case insensitively replace stuff? wxString.Replace doesn't seem to be able to... wxRegEx is able to, but I cannot use backslashes (\) in my "replace with" string... but in this case I need paths xD Bad to replace those backslashes with double backslash or slash prior to replace...
Those MSVC macros are not case sensitive.. so it's bad to have the projects importer to handle them that way only because wxWidgets sucks...
I wish they had adopted this 12 years old patch:
http://trac.wxwidgets.org/ticket/5422