Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign

XML based compilers

<< < (41/41)

gd_on:

--- Quote ---Maybe a script could extract the strings? 
--- End quote ---
It's exactly what I do. I have updated my extracting tool and testing it.
The previous version can be found in the forum (links in Code::Blocks' translation posts).
I have added those lines,

--- Code: ---echo ""
echo "************************************************"
echo "* extracting strings from .xml compilers files *"
echo "************************************************"
echo ""
find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F "CodeBlocks_compiler name" > src_xml.cpp 2>> log.txt
find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F "Option name" >>  src_xml.cpp 2>> log.txt
find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F "checkMessage" >> src_xml.cpp 2>> log.txt
grep -v mabi src_xml.cpp | grep -v mno | grep -v apcs | grep -v mtpcs | grep -v mshed | grep -v msoft | grep -v mhard | grep -v mfpe | grep -v msched | grep -v mlong | grep -v mpic | grep -v mcirrus | grep -v mcalle | grep -v mpoke | grep -v mwords > src_xml2.cpp
xgettext -a -o xml.pot src_xml2.cpp
find xml.pot >> files.txt
--- End code ---
but I think it could be improved because it still extract some lines that do not need translation.

gd_on

Alpha:
An afterthought:

Looking back on this, I think I made a major design failure.  Moving default settings and flags to .xml I still believe was a good choice, however, as soon as I started trying to do things like <if platform="windows"> ... </if>, it became a hack on the purpose of XML.  Logic does not belong at all in a data file.  This should have been either left in code, or (better) migrated to a script.

I guess this is another item to add to my todo list, and a lesson on planning ahead  :-\ .

gh_origin:

--- Quote from: Alpha on October 26, 2014, 09:13:04 pm ---An afterthought:

Looking back on this, I think I made a major design failure.  Moving default settings and flags to .xml I still believe was a good choice, however, as soon as I started trying to do things like <if platform="windows"> ... </if>, it became a hack on the purpose of XML.  Logic does not belong at all in a data file.  This should have been either left in code, or (better) migrated to a script.

I guess this is another item to add to my todo list, and a lesson on planning ahead  :-\ .

--- End quote ---

Sorry to post on this old thread. I acknowledged any CodeBlocks developers' works but I have to say your XML based compiler really caused me to suffer for almost a whole day. I don't want to be rude but I had to say you did make a completely design failure and I do not think XML was a good choice for anything. Sorry.

oBFusCATed:

--- Quote from: gh_origin on November 24, 2020, 09:48:45 am ---Sorry to post on this old thread. I acknowledged any CodeBlocks developers' works but I have to say your XML based compiler really caused me to suffer for almost a whole day. I don't want to be rude but I had to say you did make a completely design failure and I do not think XML was a good choice for anything. Sorry.

--- End quote ---
+1 here. Squirrel would have been the better choice for defining compiler configurations, but now it is already too late.
If you want to design the same system based on squirrel scripts I could help you with the review and guidance :)

gh_origin:

--- Quote from: oBFusCATed on November 24, 2020, 12:29:23 pm ---+1 here. Squirrel would have been the better choice for defining compiler configurations, but now it is already too late.
If you want to design the same system based on squirrel scripts I could help you with the review and guidance :)

--- End quote ---
Thank you but I'm only a high school teacher and I don't have the skills needed to do professional coding. I'm not originally teach programming either but because the school's shortage of teacher I attended a short course and started to teach programming alongside with my own elementary algebra. I only know an outdated subset of C++98 and so do my students but recently some of the curious ones started playing with C++11. I can't help with this, sorry.

Navigation

[0] Message Index

[*] Previous page

Go to full version