Commit f256d3b5 authored by Ronan's avatar Ronan
Browse files

feat(app): new `update_project` script to build `linphone.pro`, `resources.qrc` and languages

parent 39a0273e
......@@ -4,26 +4,30 @@ TARGET = linphone
TEMPLATE = app
CONFIG += c++11
RESOURCES = resources.qrc
SOURCES = \
src/app.cpp \
src/main.cpp \
src/models/notification/NotificationModel.cpp \
src/models/settings/AccountSettingsListModel.cpp \
src/models/settings/AccountSettingsModel.cpp \
src/models/settings/SettingsModel.cpp
src/models/settings/SettingsModel.cpp \
HEADERS = \
src/app.hpp \
src/app.hpp \
src/models/notification/NotificationModel.hpp \
src/models/settings/AccountSettingsListModel.hpp \
src/models/settings/AccountSettingsModel.hpp \
src/models/settings/SettingsModel.hpp
src/models/settings/SettingsModel.hpp \
TRANSLATIONS = \
languages/en.ts \
languages/fr.ts
languages/fr.ts \
lupdate_only{
# Each component folder must be added explicitly.
SOURCES = \
ui/Linphone/*.qml \
ui/Linphone/Chat/*.qml \
ui/Linphone/Collapse/*.qml \
ui/Linphone/Contact/*.qml \
......@@ -40,7 +44,6 @@ lupdate_only{
ui/Linphone/Timeline/*.qml \
ui/Linphone/View/*.qml \
ui/Views/*.qml \
ui/Views/MainWindow/*.qml
}
ui/Views/MainWindow/*.qml \
RESOURCES = resources.qrc
}
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>languages/fr.qm</file>
<file>imgs/call.svg</file>
<file>imgs/cam.svg</file>
<file>imgs/chat_attachment.svg</file>
<file>imgs/chat.svg</file>
<file>imgs/collapse.svg</file>
<file>imgs/conference.svg</file>
<file>imgs/contact.svg</file>
<file>imgs/delete.svg</file>
<file>imgs/hangup.svg</file>
<file>imgs/history.svg</file>
<file>imgs/incoming_call.svg</file>
<file>imgs/led_absent.svg</file>
<file>imgs/led_connected.svg</file>
<file>imgs/led_disconnected.svg</file>
<file>imgs/led_do_not_disturb.svg</file>
<file>imgs/linphone.png</file>
<file>imgs/lost_incoming_call.svg</file>
<file>imgs/lost_outgoing_call.svg</file>
<file>imgs/valid.svg</file>
<file>languages/en.qm</file>
<file>ui/Views/MainWindow/Contact.qml</file>
<file>ui/Views/MainWindow/Contacts.qml</file>
<file>ui/Views/MainWindow/Conversation.qml</file>
<file>ui/Views/MainWindow/MainWindow.qml</file>
<file>ui/Views/MainWindow/Home.qml</file>
<file>ui/Views/ManageAccounts.qml</file>
<file>ui/Views/NewCall.qml</file>
<file>ui/scripts/utils.js</file>
<file>ui/Linphone/Popup/DropDownMenu.qml</file>
<file>ui/Linphone/Popup/PopupShadow.qml</file>
<file>ui/Linphone/qmldir</file>
<file>ui/Linphone/ScrollBar/ForceScrollBar.qml</file>
<file>ui/Linphone/Chat/IncomingMessage.qml</file>
<file>languages/fr.qm</file>
<file>ui/Linphone/Chat/Chat.qml</file>
<file>ui/Linphone/Chat/OutgoingMessage.qml</file>
<file>ui/Linphone/Chat/Event.qml</file>
<file>ui/Linphone/Chat/IncomingMessage.qml</file>
<file>ui/Linphone/Chat/Message.qml</file>
<file>ui/Linphone/SearchBox/SearchBox.qml</file>
<file>ui/Linphone/Chat/OutgoingMessage.qml</file>
<file>ui/Linphone/Collapse/Collapse.qml</file>
<file>ui/Linphone/Constants.qml</file>
<file>ui/Linphone/Contact/Avatar.qml</file>
<file>ui/Linphone/Contact/ContactDescription.qml</file>
<file>ui/Linphone/Contact/Contact.qml</file>
<file>ui/Linphone/Dialog/ConfirmDialog.qml</file>
<file>ui/Linphone/Dialog/DialogDescription.qml</file>
<file>ui/Linphone/Dialog/DialogPlus.qml</file>
<file>ui/Linphone/Form/ActionBar.qml</file>
<file>ui/Linphone/Form/ActionButton.qml</file>
<file>ui/Linphone/Form/CheckBoxText.qml</file>
<file>ui/Linphone/Form/DarkButton.qml</file>
<file>ui/Linphone/Form/DropZone.qml</file>
<file>ui/Linphone/Form/ExclusiveButtons.qml</file>
<file>ui/Linphone/Form/LightButton.qml</file>
<file>ui/Linphone/Form/ListForm.qml</file>
<file>ui/Linphone/Form/ExclusiveButtons.qml</file>
<file>ui/Linphone/Form/ActionBar.qml</file>
<file>ui/Linphone/Form/ActionButton.qml</file>
<file>ui/Linphone/Form/TransparentComboBox.qml</file>
<file>ui/Linphone/Form/SmallButton.qml</file>
<file>ui/Linphone/Form/DarkButton.qml</file>
<file>ui/Linphone/View/ScrollableListView.qml</file>
<file>ui/Linphone/Collapse/Collapse.qml</file>
<file>ui/Linphone/Styles/qmldir</file>
<file>ui/Linphone/Form/TransparentComboBox.qml</file>
<file>ui/Linphone/Image/Icon.qml</file>
<file>ui/Linphone/InvertedMouseArea/InvertedMouseArea.qml</file>
<file>ui/Linphone/Misc/MenuEntry.qml</file>
<file>ui/Linphone/Popup/DropDownMenu.qml</file>
<file>ui/Linphone/Popup/PopupShadow.qml</file>
<file>ui/Linphone/qmldir</file>
<file>ui/Linphone/ScrollBar/ForceScrollBar.qml</file>
<file>ui/Linphone/SearchBox/SearchBox.qml</file>
<file>ui/Linphone/Select/SelectContact.qml</file>
<file>ui/Linphone/Styles/CollapseStyle.qml</file>
<file>ui/Linphone/Styles/DialogStyle.qml</file>
<file>ui/Linphone/Styles/PopupStyle.qml</file>
<file>ui/Linphone/Styles/qmldir</file>
<file>ui/Linphone/Styles/ScrollBarStyle.qml</file>
<file>ui/Linphone/Styles/TimelineStyle.qml</file>
<file>ui/Linphone/Styles/SearchBoxStyle.qml</file>
<file>ui/Linphone/Styles/CollapseStyle.qml</file>
<file>ui/Linphone/Styles/PopupStyle.qml</file>
<file>ui/Linphone/Styles/TimelineStyle.qml</file>
<file>ui/Linphone/Timeline/Timeline.qml</file>
<file>ui/Linphone/Misc/MenuEntry.qml</file>
<file>ui/Linphone/InvertedMouseArea/InvertedMouseArea.qml</file>
<file>ui/Linphone/Select/SelectContact.qml</file>
<file>ui/Linphone/Contact/Contact.qml</file>
<file>ui/Linphone/Contact/ContactDescription.qml</file>
<file>ui/Linphone/Contact/Avatar.qml</file>
<file>ui/Linphone/Constants.qml</file>
<file>ui/Linphone/Dialog/ConfirmDialog.qml</file>
<file>ui/Linphone/Dialog/DialogDescription.qml</file>
<file>ui/Linphone/Dialog/DialogPlus.qml</file>
<file>ui/Linphone/Image/Icon.qml</file>
<file>imgs/lost_outgoing_call.svg</file>
<file>imgs/led_disconnected.svg</file>
<file>imgs/valid.svg</file>
<file>imgs/incoming_call.svg</file>
<file>imgs/linphone.png</file>
<file>imgs/led_do_not_disturb.svg</file>
<file>imgs/lost_incoming_call.svg</file>
<file>imgs/conference.svg</file>
<file>imgs/cam.svg</file>
<file>imgs/history.svg</file>
<file>imgs/hangup.svg</file>
<file>imgs/chat.svg</file>
<file>imgs/chat_attachment.svg</file>
<file>imgs/led_connected.svg</file>
<file>imgs/led_absent.svg</file>
<file>imgs/call.svg</file>
<file>imgs/collapse.svg</file>
<file>imgs/delete.svg</file>
<file>imgs/contact.svg</file>
<file>ui/Linphone/View/ScrollableListView.qml</file>
<file>ui/scripts/utils.js</file>
<file>ui/Views/MainWindow/Contact.qml</file>
<file>ui/Views/MainWindow/Contacts.qml</file>
<file>ui/Views/MainWindow/Conversation.qml</file>
<file>ui/Views/MainWindow/Home.qml</file>
<file>ui/Views/MainWindow/MainWindow.qml</file>
<file>ui/Views/ManageAccounts.qml</file>
<file>ui/Views/NewCall.qml</file>
</qresource>
</RCC>
#!/usr/bin/bash
echo "<!DOCTYPE RCC><RCC version=\"1.0\">"
echo " <qresource prefix=\"/\">"
RESOURCE_FILE="resources.qrc"
for filename in $(find languages/ ui/ imgs/ -type f)
cd $1
echo "<!DOCTYPE RCC><RCC version=\"1.0\">
<qresource prefix=\"/\">" > $RESOURCE_FILE
for filename in $(find languages/ ui/ imgs/ -type f | sort)
do
basename="${filename##*/}"
extension="${filename##*.}"
if [[ "${extension}" == @(qml|svg|png|qm|js) ||
"${basename}" == "qmldir" ]]; then
echo " <file>$filename</file>"
echo " <file>$filename</file>" >> $RESOURCE_FILE
fi
done
echo " </qresource>"
echo "</RCC>"
echo " </qresource>
</RCC>" >> $RESOURCE_FILE
#!/usr/bin/bash
lupdate-qt5 -verbose $1/linphone.pro
lrelease-qt5 $1/linphone.pro
#!/usr/bin/bash
PRO_FILE="linphone.pro"
cd $1
echo "QT = core gui quick widgets quickcontrols2
TARGET = linphone
TEMPLATE = app
CONFIG += c++11
RESOURCES = resources.qrc" > $PRO_FILE
echo "
SOURCES = \\" >> $PRO_FILE
for filename in $(find src/ -name \*.cpp -type f | sort)
do
echo " $filename \\" >> $PRO_FILE
done
echo "
HEADERS = \\" >> $PRO_FILE
for filename in $(find src/ -name \*.hpp -type f | sort)
do
echo " $filename \\" >> $PRO_FILE
done
echo "
TRANSLATIONS = \\" >> $PRO_FILE
for filename in $(find languages/ -name \*.ts -type f | sort)
do
echo " $filename \\" >> $PRO_FILE
done
echo "
lupdate_only{
SOURCES = \\" >> $PRO_FILE
for filename in $(find ui/ -type f -name \*.qml -printf '%h\n' | sort -u)
do
echo " $filename/*.qml \\" >> $PRO_FILE
done
echo "
}" >> $PRO_FILE
#!/usr/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
$SCRIPT_DIR/scripts/update_linphone $SCRIPT_DIR
$SCRIPT_DIR/scripts/build_resources_file $SCRIPT_DIR
$SCRIPT_DIR/scripts/update_languages $SCRIPT_DIR
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment