Implement more of the meson build

This commit is contained in:
Hylke Bons 2018-02-19 09:14:03 +00:00
parent 1b20e8f31b
commit fcb1275325
6 changed files with 31 additions and 23 deletions

View file

@ -2,7 +2,8 @@ image_files = ['tutorial-slide-1.png',
'tutorial-slide-2.png',
'side-splash.png',
'about.png',
'text-balloon.png']
'text-balloon.png',
'user-icon-default.png']
install_data(
sources: image_files,

View file

@ -18,6 +18,19 @@ sparkleshare_src = ['../Common/SparkleShare.cs',
'UserInterface.cs',
'UserInterfaceHelpers.cs']
# Startup script
configure_file(
input: 'sparkleshare.in',
output: 'sparkleshare',
configuration: configuration, install_dir: 'bin/')
# .desktop and .appdata files
install_data(sources: 'org.sparkleshare.SparkleShare.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'org.sparkleshare.SparkleShare.Invites.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'SparkleShare.Autostart.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'org.sparkleshare.SparkleShare.appdata.xml', install_dir: join_paths('share', 'appdata'))
# Dependencies
gtk = dependency('gtk-sharp-3.0')
gdk = dependency('gdk-sharp-3.0')
gio = dependency('gio-sharp-3.0')
@ -33,23 +46,11 @@ sparkleshare = executable('SparkleShare',
install: true,
install_dir: install_dir)
# Install the startup script
install_data(sources: 'sparkleshare', install_dir: '/bin')
# Install .desktop and .appdata files
install_data(sources: 'org.sparkleshare.SparkleShare.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'org.sparkleshare.SparkleShare.Invites.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'SparkleShare.Autostart.desktop', install_dir: join_paths('share', 'applications'))
install_data(sources: 'org.sparkleshare.SparkleShare.appdata.xml', install_dir: join_paths('share', 'appdata'))
subdir('Images')
subdir('Images/icons')
# TODO:
# - preprocess startup script, and InstallationInfo.Directory.cs.in
# - special Ubuntu icons. custom icons to right location
# - preprocess InstallationInfo.Directory.cs.in
# - Keep around bump version script
# - install icons into right structure. Ubuntu icons. custom icons to right location
# - update .desktop file database and icon cache

View file

@ -10,12 +10,13 @@ case $1 in
invite=`date -u +%N`
open=`echo $2 | sed 's/sparkleshare:\/\/addProject\///'`
curl --insecure --output ~/SparkleShare/.$invite.xml $open
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe"
mono "@ABS_INSTALL_DIR@/SparkleShare.exe"
;;
help|--help|version|--version)
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" help
mono "@ABS_INSTALL_DIR@/SparkleShare.exe" help
;;
*)
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2
mono "@ABS_INSTALL_DIR@/SparkleShare.exe" $2
;;
esac

View file

@ -24,6 +24,6 @@ using System.Reflection;
namespace Sparkles {
public partial class InstallationInfo {
public const string Directory = "@expanded_datadir@/sparkleshare";
public const string Directory = "@ABS_INSTALL_DIR@";
}
}

View file

@ -1,3 +1,8 @@
directory_info_file = configure_file(
input: 'InstallationInfo.Directory.cs.in',
output: 'InstallationInfo.Directory.cs',
configuration: configuration)
sparkles_src = ['AuthenticationInfo.cs',
'BaseFetcher.cs',
'BaseListener.cs',
@ -7,7 +12,7 @@ sparkles_src = ['AuthenticationInfo.cs',
'Configuration.cs',
'Extensions.cs',
'InstallationInfo.cs',
'InstallationInfo.Directory.cs',
directory_info_file,
'Invite.cs',
'ListenerFactory.cs',
'Logger.cs',
@ -19,10 +24,6 @@ sparkles_src = ['AuthenticationInfo.cs',
'User.cs',
'Watcher.cs']
# generator = custom_target('replace',
# input: 'InstallationInfo.Directory.cs.in',
# output: 'InstallationInfo.Directory.cs',
# command: ['sed', 's/@VERSION@/2.0.1/g @INPUT@', '@OUTPUT@'])
sparkles = library('Sparkles',
sources: sparkles_src,

View file

@ -2,6 +2,10 @@ project('SparkleShare', 'cs')
install_dir = 'share/sparkleshare'
configuration = configuration_data()
configuration.set('ABS_INSTALL_DIR', join_paths(get_option('prefix'), install_dir))
configuration.set('VERSION', '2.0.1')
subdir('Sparkles')
subdir('Sparkles/Git')
subdir('SparkleShare')