#!/bin/bash

cp -Rp ../../main/dependencies/qt3/ tqt3
cd tqt3
../convert_qt_itself_qt3
../header_rename_1
patch -p0 < ../tqt3_fixups_batch2.diff
../convert_qt_itself_qt3_batch2
patch -p0 < ../tqt3_fixups_batch3.diff
../convert_qt_itself_qt3_batch3
patch -p0 < ../tqt3_bin_rename.diff
patch -p0 < ../tqt3_fixups_batch4.diff
../convert_qt_itself_qt3_batch4
../man_rename_1

# Regenerate moc files
cd src/moc/
yacc -d moc.y -o moc_yacc && mv moc_yacc moc_yacc.cpp
flex moc.l
mv lex.yy.c moc_lex.cpp
