[Qt-interest] Problem with MFC to Qt migration using qt-vs-addin-1.0.2 in VisualStudio2005

John McClurkin jwm at nei.nih.gov
Fri Sep 25 19:09:08 CEST 2009


David Walthall wrote:

Cool.

> Vanbrabant Martin wrote:
>> Thanks John,
>>
>> the hard way to do it indeed (given the complexity of the project I'm faced with...).
>>
>> Martin.
> 
> Here is a script that I wrote to simplify the generation of .pro files
> when moving from MFC to Qt.  It requires sh, so you can either run it on
> linux or install cygwin
> 
> #! /bin/sh
> ## MakePri.sh
> ##
> ## USAGE: MakePri.sh [dir1 [dir2 [...]]]
> ## Generates .pro files for the listed directories, or for
> ## the current directory if no dirN are listed.
> 
> headers=""
> sources=""
> fortran=""
> forms=""
> 
> if [ $# -eq 0 ] ; then
>     for d in "." ; do
>         headersTmp=`ls -1 $d/*.h* $d/*.H* 2> /dev/nul`
>         headers="$headers $headersTmp"
>         sourcesTmp=`ls -1 $d/*.c* $d/*.C* 2> /dev/nul`
>         sources="$sources $sourcesTmp"
>         fortranTmp=`ls -1 $d/*.f* $d/*.F* 2> /dev/nul`
>         fortran="$fortran $fortranTmp"
>         formsTmp=`ls -1 $d/*.ui 2> /dev/nul`
>         forms="$forms $formsTmp"
>     done
> else
>     for d in $@ ; do
>         headersTmp=`ls -1 $d/*.h* $d/*.H* 2> /dev/nul`
>         headers="$headers $headersTmp"
>         sourcesTmp=`ls -1 $d/*.c* $d/*.C* 2> /dev/nul`
>         sources="$sources $sourcesTmp"
>         fortranTmp=`ls -1 $d/*.f* $d/*.F* 2> /dev/nul`
>         fortran="$fortran $fortranTmp"
>         formsTmp=`ls -1 $d/*.ui 2> /dev/nul`
>         forms="$forms $formsTmp"
>     done
> fi
> 
> if [ "x$headers" != "x" ] ; then
>     echo "#Header files"
>     echo "HEADERS +=  \\"
>     for ff in $headers ; do
>         echo "    $ff    \\"
>     done
>     echo ""
> fi
> if [ "x$sources" != "x" ] ; then
>     echo "#Source files"
>     echo "SOURCES +=  \\"
>     for ff in $sources ; do
>         echo "    $ff    \\"
>     done
>     echo ""
> fi
> if [ "x$forms" != "x" ] ; then
>     echo "#Forms"
>     echo "FORMS +=  \\"
>     for ff in $forms ; do
>         echo "    $ff    \\"
>     done
>     echo ""
> fi
> if [ "x$fortran" != "x" ] ; then
>     echo "#Fortran files"
>     echo "F90_SOURCES +=  \\"
>     for ff in $fortran ; do
>         echo "    $ff    \\"
>     done
>     echo ""
> fi



More information about the Qt-interest-old mailing list