Reworked OSX bundle test to allow adding Linux in the future.

pull/54/merge
Jussi Pakkanen 10 years ago
parent fa2c659825
commit 78fc8fcc43
  1. 18
      manual tests/3 osx bundle/meson.build
  2. 4
      manual tests/3 osx bundle/myapp.sh
  3. 0
      manual tests/3 standalone binaries/Info.plist
  4. 0
      manual tests/3 standalone binaries/build_osx_installer.sh
  5. 26
      manual tests/3 standalone binaries/meson.build
  6. 0
      manual tests/3 standalone binaries/myapp.c
  7. 0
      manual tests/3 standalone binaries/myapp.icns
  8. 10
      manual tests/3 standalone binaries/myapp.sh
  9. 0
      manual tests/3 standalone binaries/osx_bundler.sh
  10. 12
      manual tests/3 standalone binaries/readme.txt
  11. 0
      manual tests/3 standalone binaries/template.dmg.gz

@ -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…
Cancel
Save