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

Change to using version number instead of /etc/version #128

Merged
merged 7 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- 'v*.*.*'
pull_request:

jobs:
build:
Expand All @@ -12,12 +13,18 @@ jobs:
container: ghcr.io/toltec-dev/qt
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build
run: |
./dist.sh

- uses: actions/upload-artifact@v4
with:
name: build
path: dist/*
if-no-files-found: error

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ rm2-framebuffer
*.so.*
*.so
dist
rm2fb*.tar.gz
9 changes: 5 additions & 4 deletions dist.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
qmake
make
mkdir -p ./dist
arm-linux-gnueabihf-strip ./src/client/librm2fb_client.so.1.0.1
cp ./src/xofb/librm2fb_xofb.so.1.0.1 ./dist
cp ./src/server/librm2fb_server.so.1.0.1 ./dist
cp ./src/client/librm2fb_client.so.1.0.1 ./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
10 changes: 6 additions & 4 deletions rm2fb.pro
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
TEMPLATE = subdirs

include(version.pri)

SUBDIRS = \
src/loader \ # relative paths
src/server \
src/client \
src/xofb \
src/loader \ # relative paths
src/server \
src/client \
src/xofb \

7 changes: 4 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
qmake
make
mkdir -p dist/rm2fb
cp src/loader/librm2fb_demo.so.1.0.0 dist/rm2fb/
cp src/server/librm2fb_server.so.1.0.0 dist/rm2fb/
cp src/client/librm2fb_client.so.1.0.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/
Expand Down
5 changes: 3 additions & 2 deletions scripts/run.sh
Original file line number Diff line number Diff line change
@@ -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.0.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.0.0 $*
LD_PRELOAD=${DIR}/librm2fb_client.so.$version $*
pid2=$!
wait $pid2
kill -9 -${pid}
Expand Down
2 changes: 1 addition & 1 deletion src/client/client.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

TEMPLATE = lib
TARGET = rm2fb_client
VERSION = 1.0.1
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
Expand Down
1 change: 1 addition & 0 deletions src/loader/loader.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/server/server.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
TEMPLATE = lib
TARGET = rm2fb_server
INCLUDEPATH += .
VERSION = 1.0.1
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
Expand Down
Loading