From efbbcd37867504261c0974d293d5f9576bc9effb Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Tue, 17 Mar 2015 02:52:46 +0200 Subject: [PATCH] Build a standalone Linux package. --- .../3 standalone binaries/build_linux_package.sh | 12 ++++++++++++ .../{build_osx_installer.sh => build_osx_package.sh} | 2 +- manual tests/3 standalone binaries/linux_bundler.sh | 7 +++++++ manual tests/3 standalone binaries/meson.build | 4 ++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 manual tests/3 standalone binaries/build_linux_package.sh rename manual tests/3 standalone binaries/{build_osx_installer.sh => build_osx_package.sh} (85%) mode change 100755 => 100644 create mode 100644 manual tests/3 standalone binaries/linux_bundler.sh diff --git a/manual tests/3 standalone binaries/build_linux_package.sh b/manual tests/3 standalone binaries/build_linux_package.sh new file mode 100644 index 000000000..9a0406c8f --- /dev/null +++ b/manual tests/3 standalone binaries/build_linux_package.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +curdir=`pwd` +rm -rf buildtmp +mkdir buildtmp +~/meson/meson.py buildtmp --buildtype=release --prefix=/tmp/myapp --libdir=lib +ninja -C buildtmp install +rm -rf buildtmp +cd /tmp/ +tar czf myapp.tar.gz myapp +mv myapp.tar.gz "$curdir" +rm -rf myapp diff --git a/manual tests/3 standalone binaries/build_osx_installer.sh b/manual tests/3 standalone binaries/build_osx_package.sh old mode 100755 new mode 100644 similarity index 85% rename from manual tests/3 standalone binaries/build_osx_installer.sh rename to manual tests/3 standalone binaries/build_osx_package.sh index 9225415a3..eca11c635 --- a/manual tests/3 standalone binaries/build_osx_installer.sh +++ b/manual tests/3 standalone binaries/build_osx_package.sh @@ -2,7 +2,7 @@ rm -rf buildtmp mkdir buildtmp -~/meson/meson.py buildtmp --prefix=/tmp/myapp.app --bindir=Contents/MacOS +~/meson/meson.py buildtmp --buildtype=release --prefix=/tmp/myapp.app --bindir=Contents/MacOS ninja -C buildtmp install rm -rf buildtmp mkdir -p mnttmp diff --git a/manual tests/3 standalone binaries/linux_bundler.sh b/manual tests/3 standalone binaries/linux_bundler.sh new file mode 100644 index 000000000..a0e5c122f --- /dev/null +++ b/manual tests/3 standalone binaries/linux_bundler.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +libdir="${MESON_INSTALL_PREFIX}/lib" +mkdir -p $libdir +sdlfile=`ldd ${MESON_INSTALL_PREFIX}/bin/myapp | grep libSDL | cut -d ' ' -f 3` +cp $sdlfile "${libdir}" +strip "${libdir}/libSDL"* diff --git a/manual tests/3 standalone binaries/meson.build b/manual tests/3 standalone binaries/meson.build index 8af9fa114..81708f095 100644 --- a/manual tests/3 standalone binaries/meson.build +++ b/manual tests/3 standalone binaries/meson.build @@ -2,6 +2,10 @@ project('myapp', 'c') sdl = dependency('sdl2') +if meson.get_compiler('c').get_id() != 'msvc' + add_global_arguments('-std=c++11', language : 'cpp') +endif + if host.name() == 'darwin' install_data('myapp.sh', install_dir : 'Contents/MacOS')