diff --git a/.gitignore b/.gitignore index ffaae64..4ce1334 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ rm2-framebuffer *.so.* *.so dist +rm2fb*.tar.gz diff --git a/dist.sh b/dist.sh index 09753e0..1a4e520 100755 --- a/dist.sh +++ b/dist.sh @@ -1,7 +1,8 @@ qmake make mkdir -p ./dist -arm-linux-gnueabihf-strip ./src/client/librm2fb_client.so.1.1.0 -cp ./src/xofb/librm2fb_xofb.so.1.1.0 ./dist -cp ./src/server/librm2fb_server.so.1.1.0 ./dist -cp ./src/client/librm2fb_client.so.1.1.0 ./dist +version=$(grep VERSION= version.pri | cut -d= -f2) +arm-linux-gnueabihf-strip ./src/client/librm2fb_client.so.$version +cp ./src/xofb/librm2fb_xofb.so.$version ./dist +cp ./src/server/librm2fb_server.so.$version ./dist +cp ./src/client/librm2fb_client.so.$version ./dist diff --git a/rm2fb.pro b/rm2fb.pro index e0ef16b..17277a3 100755 --- a/rm2fb.pro +++ b/rm2fb.pro @@ -1,5 +1,7 @@ TEMPLATE = subdirs +include(version.pri) + SUBDIRS = \ src/loader \ # relative paths src/server \ diff --git a/scripts/build.sh b/scripts/build.sh index 4cc308d..1f21c6d 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,9 +1,10 @@ qmake make mkdir -p dist/rm2fb -cp src/loader/librm2fb_demo.so.1.1.0 dist/rm2fb/ -cp src/server/librm2fb_server.so.1.1.0 dist/rm2fb/ -cp src/client/librm2fb_client.so.1.1.0 dist/rm2fb/ +version=$(grep VERSION= version.pri | cut -d= -f2) +cp src/loader/librm2fb_demo.so.$version dist/rm2fb/ +cp src/server/librm2fb_server.so.$version dist/rm2fb/ +cp src/client/librm2fb_client.so.$version dist/rm2fb/ cp scripts/run.sh dist/rm2fb/rm2fb.sh chmod +x dist/rm2fb/rm2fb.sh cd dist/ diff --git a/scripts/run.sh b/scripts/run.sh index 394a574..2ff9e4a 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" systemctl stop xochitl -LD_PRELOAD=${DIR}/librm2fb_server.so.1.1.0 `which xochitl` & +version=$(grep VERSION= version.pri | cut -d= -f2) +LD_PRELOAD=${DIR}/librm2fb_server.so.$version `which xochitl` & pid=$! sleep 2 -LD_PRELOAD=${DIR}/librm2fb_client.so.1.1.0 $* +LD_PRELOAD=${DIR}/librm2fb_client.so.$version $* pid2=$! wait $pid2 kill -9 -${pid} diff --git a/src/client/client.pro b/src/client/client.pro index 43063b9..6ef4404 100755 --- a/src/client/client.pro +++ b/src/client/client.pro @@ -4,8 +4,8 @@ TEMPLATE = lib TARGET = rm2fb_client -VERSION = 1.1.0 INCLUDEPATH += . +include(../../version.pri) # The following define makes your compiler warn you if you use any # feature of Qt which has been marked as deprecated (the exact warnings diff --git a/src/loader/loader.pro b/src/loader/loader.pro index be39c46..e9edaf2 100755 --- a/src/loader/loader.pro +++ b/src/loader/loader.pro @@ -5,6 +5,7 @@ TEMPLATE = lib TARGET = rm2fb_demo INCLUDEPATH += . +include(../../version.pri) # The following define makes your compiler warn you if you use any # feature of Qt which has been marked as deprecated (the exact warnings diff --git a/src/server/server.pro b/src/server/server.pro index 92649a2..5fb5154 100755 --- a/src/server/server.pro +++ b/src/server/server.pro @@ -5,7 +5,7 @@ TEMPLATE = lib TARGET = rm2fb_server INCLUDEPATH += . -VERSION = 1.1.0 +include(../../version.pri) # The following define makes your compiler warn you if you use any # feature of Qt which has been marked as deprecated (the exact warnings diff --git a/src/xofb/xofb.pro b/src/xofb/xofb.pro index 7ec2d7f..1602522 100755 --- a/src/xofb/xofb.pro +++ b/src/xofb/xofb.pro @@ -5,7 +5,7 @@ TEMPLATE = lib TARGET = rm2fb_xofb INCLUDEPATH += . -VERSION = 1.1.0 +include(../../version.pri) # The following define makes your compiler warn you if you use any # feature of Qt which has been marked as deprecated (the exact warnings diff --git a/version.pri b/version.pri new file mode 100644 index 0000000..14ecfb0 --- /dev/null +++ b/version.pri @@ -0,0 +1 @@ +VERSION=1.0.2