Build a standalone Linux package.
This commit is contained in:
parent
78fc8fcc43
commit
efbbcd3786
|
@ -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
manual tests/3 standalone binaries/build_osx_installer.sh → manual tests/3 standalone binaries/build_osx_package.sh
Executable file → Normal file
2
manual tests/3 standalone binaries/build_osx_installer.sh → manual tests/3 standalone binaries/build_osx_package.sh
Executable file → Normal file
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
rm -rf buildtmp
|
rm -rf buildtmp
|
||||||
mkdir 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
|
ninja -C buildtmp install
|
||||||
rm -rf buildtmp
|
rm -rf buildtmp
|
||||||
mkdir -p mnttmp
|
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')
|
sdl = dependency('sdl2')
|
||||||
|
|
||||||
|
if meson.get_compiler('c').get_id() != 'msvc'
|
||||||
|
add_global_arguments('-std=c++11', language : 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
if host.name() == 'darwin'
|
if host.name() == 'darwin'
|
||||||
install_data('myapp.sh',
|
install_data('myapp.sh',
|
||||||
install_dir : 'Contents/MacOS')
|
install_dir : 'Contents/MacOS')
|
||||||
|
|
Loading…
Reference in New Issue