Build a standalone Linux package.

pull/54/merge
Jussi Pakkanen 10 years ago
parent 78fc8fcc43
commit efbbcd3786
  1. 12
      manual tests/3 standalone binaries/build_linux_package.sh
  2. 2
      manual tests/3 standalone binaries/build_osx_package.sh
  3. 7
      manual tests/3 standalone binaries/linux_bundler.sh
  4. 4
      manual tests/3 standalone binaries/meson.build

@ -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

@ -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

@ -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"*

@ -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')

Loading…
Cancel
Save