#!/bin/bash


# Building the .pro file using qmake

rm -f qrc_icons.cpp xyPic.pro Makefile

qmake -project -o xyPic
cat >xyPic.tmp <<EOF
RC_FILE = xyPic.rc
RESOURCES = icons.qrc
QT += widgets
CONFIG += console
EOF


cat xyPic.pro >>xyPic.tmp
mv xyPic.tmp xyPic.pro


# Building the Makefile file using qmake

qmake -o Makefile



make


# Get rid of the Makefile, the .pro file, and the .qmake.stash file so there is no confusion.
# They'll be generated again the next time we build.

rm Makefile *.pro .qmake*
