trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: July 2013

automated conversion script

From: David Emerson <demerson3x@...>
Date: Sat, 06 Jul 2013 12:38:21 -0700
Hey guys,

I took a good look at the conversion script here:
http://git.trinitydesktop.org/cgit/experimental/tree/qt3-tqt3/convert_existing_qt3_app_to_tqt3
and I see several opportunities for improvement. Slavek recently noted a 
10-fold speed improvement in execution time after making some tweaks, 
and I think we can gain an additional 10-fold speed improvement with 
some more refinements. I would also like to attempt to address some of 
the issues that the script still misses.

Before I spend time on this, I just wanted to verify two things:
1. Is this something that people are still using, and thus would this 
work be worthwhile?
2. Just to be sure, C++ is the language used, and it is case-sensitive, 
correct?

Could someone please point me to a directory on which I would execute 
the script for testing purposes? I have not done any trinity/qt/kde 
development so I don't have an execution target. Once I get that, I can 
easily use diff -r to compare the results of the current script to any 
new versions.

Or perhaps it would be better to use a git repo which has undergone the 
conversion that Timothy described? Please advise :-)

(I'm eager to make some kind of contribution, however small, to this 
project that is so crucial to my day-to-day computing!)

Cheers,
David

Quoting the "3.5.13.2 coming soon" thread:

On 06/30/2013 07:47 AM, Slávek Banko wrote:
> On Monday 10 of June 2013 09:18:15 Timothy Pearson wrote:
>> You can try using the automated conversion script here:
>> http://git.trinitydesktop.org/cgit/experimental/tree/qt3-tqt3/convert_e
>> xisting_qt3_app_to_tqt3
>>
>> Be warned that it takes a LOT of CPU time to run, and that the result
>> probably won't compile the first time around.  However, it will deal
>> with 99% of the tedious renaming without intervention.
>>
>> You then need to take into account the more recent TDE header file and
>> class name changes.  Unfortunately, I do not have a script to
>> automatically convert a project to use the new TDE class names and
>> header files, so you would need to make those changes by hand or via
>> your own scripts.
>>
>> How I typically handle import of a new application is I first commit
>> the last known working version of the application from the original
>> source (i.e. the original project website) to a new GIT repository.  I
>> then apply and commit all changes needed to get it building on Qt3 with
>> TDE 3.5.13.x, then finally run the autoconversion tools and commit the
>> first working version for TDE R14.  This keeps the original versions
>> around in the GIT history in case something broke during build fixes
>> and/or R14 conversion and is not noticed until far in the future (this
>> has happened many times before!)
>>
>> Tim
>>
>
> Because my home machine is pretty slow, I noticed a high demands of
> script. On one smaller test project ran over 24 minutes.
>
> I've done in this script some optimizations:
>
> 1) Instead of starting sed using "find -exec sed" I used the "find | xargs
> sed". With xargs not run sed for each file, but one sed for multiple
> files.
>
> 2) Instead of starting sed for each replacement I'm using "-e" amassed
> more replacements to the single sed.
>
> After this optimizations on the same small test project I'm got the same
> result in 2.5 minutes. Updated script pushed to git in hash 5fc3ba9a.
>
> Slavek