Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for how qt6 & qmake-qt5 coexist & check vars. #169

Open
wants to merge 6 commits into
base: Release
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Account for how qt6 & qmake-qt5 coexist & check vars.
qmake is called qmake-qt5 now, so this change will make the script work on more systems. It also allows people to set the name using MY_QMAKE, and now this script no longer overwrites the MY_QT_PATH if the user has done export MY_QT_PATH before running this script.
  • Loading branch information
Poikilos authored Jan 11, 2023
commit 10d163f4c5f8c2391bf3b0803c737ef593235733
36 changes: 30 additions & 6 deletions unixBuildScript.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
#!/bin/bash

# Add your QT path here by setting MY_QT_PATH variable
# MY_QT_PATH=/YOUR_PATH_HERE/Qt/5.X/gcc_64/bin/
MY_QT_PATH=/opt/Qt5.9.0/5.9/gcc_64/bin/
# MY_QT_PATH=/YOUR_PATH_HERE/Qt/5.X/gcc_64/bin
# MY_QT_PATH=/opt/Qt5.9.0/5.9/gcc_64/bin
if [ "x$MY_QT_PATH" = "x" ]; then
MY_QT_PATH=/usr/bin
fi
if [ "x$MY_QMAKE" = "x" ]; then
MY_QMAKE=qmake-qt5
fi
if [ ! -f "$MY_QT_PATH/$MY_QMAKE" ]; then
>&2 cat <<END
Error: $MY_QT_PATH/$MY_QMAKE doesn't exist. Change MY_QT_PATH to the
directory containing qmake-qt5 and if you don't want to use qmake-qt5
change MY_QMAKE to the path relative to MY_QT_PATH.
END
if [ -f "`command -v dnf`" ]; then
>&2 cat <<END
sudo dnf install -y qtbase5-dev qt5-qtscript-dev
END
else
>&2 cat <<END
Try installing the following packages:
qt5-qtbase-devel qt5-qtscript-devel
END
fi
exit 1
fi
BUILD_WITH_OPENGL_330_SUPPORT=$1

MAKE_NUM_THREADS='-j 8'
Expand All @@ -29,7 +53,7 @@ if [ ! -e "$MY_QT_PATH" ]; then
echo " ---------------------------------"
echo " Error: Wrong Qt path."
echo " ---------------------------------"
echo " Qt not found at '$MY_QT_PATH'."
echo " Qt not found at '$MY_QT_PATH'."
echo " Please set the MY_QT_PATH variable in the ./unixBuildScript.sh"
echo ""
exit 1
Expand All @@ -43,17 +67,17 @@ else
cd Sources/utils/QtnProperty
$wget https://github.com/kmkolasinski/QtnProperty/archive/master.zip
unzip master.zip
rm master.zip
rm master.zip
mv QtnProperty-master/* .
rm -r QtnProperty-master
rm -r QtnProperty-master
cd ../../../
fi

rm .qmake.stash
rm Makefile
rm Sources/Makefile

${MY_QT_PATH}/qmake ./AwesomeBump.pro ${QMAKE_CONFIG} \
${MY_QT_PATH}/$MY_QMAKE ./AwesomeBump.pro ${QMAKE_CONFIG} \
&& make clean && make $MAKE_NUM_THREADS \
&& echo "*** Copying binary from `cat workdir/current` ..." \
&& cp -vr workdir/`cat workdir/current`/bin/AwesomeBump$exe ./Bin/AwesomeBump$APP_SUFFIX$exe
Expand Down