Reworked OSX bundle test to allow adding Linux in the future.
This commit is contained in:
parent
fa2c659825
commit
78fc8fcc43
|
@ -1,18 +0,0 @@
|
||||||
project('myapp', 'c')
|
|
||||||
|
|
||||||
sdl = dependency('sdl2')
|
|
||||||
|
|
||||||
prog = executable('myapp', 'myapp.c',
|
|
||||||
dependencies : sdl,
|
|
||||||
install : true)
|
|
||||||
|
|
||||||
install_data('myapp.sh',
|
|
||||||
install_dir : 'Contents/MacOS')
|
|
||||||
|
|
||||||
install_data('myapp.icns',
|
|
||||||
install_dir : 'Contents/Resources')
|
|
||||||
|
|
||||||
install_data('Info.plist',
|
|
||||||
install_dir : 'Contents')
|
|
||||||
|
|
||||||
meson.set_install_script('install_script.sh')
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd "${0%/*}"
|
|
||||||
./myapp
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
project('myapp', 'c')
|
||||||
|
|
||||||
|
sdl = dependency('sdl2')
|
||||||
|
|
||||||
|
if host.name() == 'darwin'
|
||||||
|
install_data('myapp.sh',
|
||||||
|
install_dir : 'Contents/MacOS')
|
||||||
|
|
||||||
|
install_data('myapp.icns',
|
||||||
|
install_dir : 'Contents/Resources')
|
||||||
|
|
||||||
|
install_data('Info.plist',
|
||||||
|
install_dir : 'Contents')
|
||||||
|
|
||||||
|
meson.set_install_script('osx_bundler.sh')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if host.name() == 'linux'
|
||||||
|
install_data('myapp.sh', install_dir : '.')
|
||||||
|
meson.set_install_script('linux_bundler.sh')
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
prog = executable('myapp', 'myapp.c',
|
||||||
|
dependencies : sdl,
|
||||||
|
install : true)
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "${0%/*}"
|
||||||
|
|
||||||
|
if [ `uname` == 'Darwin' ]; then
|
||||||
|
./myapp
|
||||||
|
else
|
||||||
|
export LD_LIBRARY_PATH="`pwd`/lib"
|
||||||
|
bin/myapp
|
||||||
|
fi
|
|
@ -0,0 +1,12 @@
|
||||||
|
This directory shows how you can build redistributable binaries. On
|
||||||
|
OSX this menans building an app bundle and a .dmg installer. On Linux
|
||||||
|
it means building a binary that bundles its dependencies. On Windows
|
||||||
|
it means probably building an .exe installer or something (not done
|
||||||
|
yet).
|
||||||
|
|
||||||
|
To build each package you run the corresponding build_ARCH.sh build script.
|
||||||
|
|
||||||
|
On Linux you must build the package on the oldest distribution you
|
||||||
|
plan to support (Debian stable/oldstable and old CentOS are usually
|
||||||
|
the choice here).
|
||||||
|
|
Loading…
Reference in New Issue