diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f2b37ab..4436e2c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -59,12 +59,14 @@ jobs: - name: Build application run: | - meson setup builddir . --cross-file crossfile_arm.ini --buildtype=release - cd builddir - meson compile + meson setup builddir . \ + --cross-file crossfile_arm.ini \ + --buildtype=release \ + --strip + DESTDIR=artifact ninja -C builddir install - name: Upload archive uses: actions/upload-artifact@v3 with: - path: builddir/taranis.app + path: builddir/artifact if-no-files-found: error diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b68e6bd..90b958d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,12 +19,14 @@ and installed manually, see instructions below. ### Using a container To build the application *for a given version*, one can build a Docker -image and export the ELF file from that image:: +image and export an archive containing the ELF file from that image. For example, for a debug build of the most recent version:: ```sh - VERSION=v$(meson version | grep 'Project version: ' | cut -d':' -f 2 | tr -d '[:space:]') - buildah bud -t taranis-build:$VERSION --build-arg VERSION=${VERSION} . + VERSION=$(git tag --list 'v*' | sort --version-sort --reverse | head -n 1) + buildah bud -t taranis-build:${VERSION} \ + --build-arg VERSION=${VERSION} \ + --build-arg MESON_ARGS="--buildtype=debug --strip=false". podman run --rm -v ${PWD}:/opt/taranis \ - taranis-build:$VERSION bash -c "cp builddir/taranis.app /opt/taranis" + taranis-build:$VERSION bash -c "cp builddir/artifact.zip /opt/artifact.zip" ``` ### Cross-compile on a Debian host @@ -75,8 +77,11 @@ dependencies. 4. Finally build the application: ```sh - meson setup builddir . --cross-file crossfile_arm.ini - pushd builddir && meson compile; popd + meson setup builddir . \ + --cross-file crossfile_arm.ini \ + --buildtype=debug \ + --strip=false + DESTDIR=artifact ninja -C builddir install ``` ## Tooling diff --git a/Containerfile b/Containerfile index d44bb74..4fde143 100644 --- a/Containerfile +++ b/Containerfile @@ -47,6 +47,7 @@ RUN mkdir 3rd-parties && \ make -j4 && \ make install -RUN meson setup builddir . --cross-file crossfile_arm.ini && \ - cd builddir && \ - meson compile +ARG MESON_ARGS +RUN meson setup builddir . --cross-file crossfile_arm.ini ${MESON_ARGS} && \ + DESTDIR=artifact ninja -C builddir install +RUN cd builddir; zip -r artifact.zip artifact/ diff --git a/crossfile_arm.ini.in b/crossfile_arm.ini.in index 0065d37..f6e4724 100644 --- a/crossfile_arm.ini.in +++ b/crossfile_arm.ini.in @@ -9,14 +9,12 @@ pkgconfig = '@pwd@/SDK_6.3.0/SDK-B288/usr/bin/pkg-config' [built-in options] cpp_args = ['-fsigned-char', - '-Werror-return-type', - '-O3', - '-pipe', - '-fomit-frame-pointer', - '-march=armv7-a', - '-mtune=cortex-a8', - '-mfpu=neon', - '-mfloat-abi=softfp'] + '-fPIC', + '-Werror-return-type', + '-march=armv7-a', + '-mtune=cortex-a8', + '-mfpu=neon', + '-mfloat-abi=softfp'] [host_machine] system = 'linux' diff --git a/icons/meson.build b/icons/meson.build index 4462b06..a4a5142 100644 --- a/icons/meson.build +++ b/icons/meson.build @@ -12,3 +12,5 @@ icons = files( 'icon_menu.bmp', 'icon_warning.bmp' ) + +install_data(sources: ['taranis.bmp', 'taranis_f.bmp'], install_dir: '/icons') diff --git a/meson.build b/meson.build index 57dc14e..e010367 100644 --- a/meson.build +++ b/meson.build @@ -56,5 +56,7 @@ sources += [icons_cc] executable( 'taranis.app', sources, - dependencies: taranis_deps + dependencies: taranis_deps, + install: true, + install_dir: '/', )