Sunday, 26 May 2013

Deploying Files to the Sailfish Emulator using the Unix rsync Command: Part 2

Note: As of Alpha 2: The correct install location on the Emulator for import libraries is: /usr/lib/qt5/qml/

In my last post I showed how rsync can be used to sync files to the Emulator excluding unwanted files. We also required an additional set of commands to correctly set the owner and privileges.

Since then I have been working on the Sailfish flavour of AbstractUI, and testing this with my 2 core apps. This means frequent changes to the AbstractUI qmls, and the frequent need to synchronize to the Emulator.

Getting tired of rerunning the same 2 commands; I decided to make life even easier by creating a script

# This script syncs abstractui files from the localhost to the Sailfish Emulator
# and then sets owners and rights

# make this script executable with chmod 755
# call it with ./

rsync -avz -e "ssh -p 2223 -i $HOME/.ssh/mer-qt-creator-rsa" org root@localhost:/usr/lib/qt5/qml/ --exclude .DS_Store \
&& \
ssh -p 2223 -i ~/.ssh/mer-qt-creator-rsa root@localhost "cd /usr/lib/qt5/qml/ && \

chown -R root:root org && \
cd org/flyingsheep/abstractui && \
chmod 755 *.so && \
chmod 644 *.qml && \
chmod 644 qmldir && \
ls -ahl && \
exit \
; bash"

The script lives in my AbstractUI project, at the same level as the org directory which contains everything I need to synchronise.

Now just one call synchronizes all changes: the output shows the files that have been synchronized, and the privileges of all files on the destination.

No comments:

Post a Comment