diff --git a/SparkleShare/Common/Images/meson.build b/SparkleShare/Common/Images/meson.build index 226fb4c1..f5afcf7c 100644 --- a/SparkleShare/Common/Images/meson.build +++ b/SparkleShare/Common/Images/meson.build @@ -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, diff --git a/SparkleShare/Linux/meson.build b/SparkleShare/Linux/meson.build index 5239f4de..39033877 100644 --- a/SparkleShare/Linux/meson.build +++ b/SparkleShare/Linux/meson.build @@ -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 diff --git a/SparkleShare/Linux/sparkleshare.in b/SparkleShare/Linux/sparkleshare.in index fed7aec1..06217ea9 100755 --- a/SparkleShare/Linux/sparkleshare.in +++ b/SparkleShare/Linux/sparkleshare.in @@ -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 + diff --git a/Sparkles/InstallationInfo.Directory.cs.in b/Sparkles/InstallationInfo.Directory.cs.in index 7d839124..82a50f51 100755 --- a/Sparkles/InstallationInfo.Directory.cs.in +++ b/Sparkles/InstallationInfo.Directory.cs.in @@ -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@"; } } diff --git a/Sparkles/meson.build b/Sparkles/meson.build index 42fa02ac..ddfda2de 100644 --- a/Sparkles/meson.build +++ b/Sparkles/meson.build @@ -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, diff --git a/meson.build b/meson.build index f6f0020b..f7c0d7dc 100644 --- a/meson.build +++ b/meson.build @@ -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')