Browse Source

remove track icon symlinks from source code, create them during install phase

export_samplerate
Alexandros Theodotou 3 years ago
parent
commit
c03ea4c8ad
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 2
      HACKING.md
  2. 20
      data/icon-themes/install_tracktype_icons.sh.in
  3. 43
      data/icon-themes/meson.build
  4. 1
      data/icon-themes/zrythm-dark/scalable/tracktypes/bars.svg
  5. 1
      data/icon-themes/zrythm-dark/scalable/tracktypes/bus.svg
  6. 1
      data/icon-themes/zrythm-dark/scalable/tracktypes/markers.svg
  7. 1
      data/icon-themes/zrythm-dark/scalable/tracktypes/signal-audio.svg
  8. 1
      data/icon-themes/zrythm-dark/scalable/tracktypes/signal-midi.svg
  9. 11
      data/meson.build
  10. 5
      meson.build
  11. 1
      tests/meson.build

2
HACKING.md

@ -95,6 +95,8 @@ Debug messages can be enabled with @@ -95,6 +95,8 @@ Debug messages can be enabled with
For more information on warnings and assertions see
<https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html>.
Also see [Running GLib Applications](https://developer.gnome.org/glib/stable/glib-running.html).
We suggest building with `-Dextra_debug_info` which
essentially adds `-g3` to the CFLAGS. This allows
use of C macros in gdb so you can do `p TRACKLIST`

20
data/icon-themes/install_tracktype_icons.sh.in

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
#!@BASH@
tracktypes_dir="$DESTDIR/@TRACK_TYPES_DIR@"
# 'cp' or 'ln'
cmd1="@CMD1@"
# '-s' or 'empty'
cmd2="@CMD2@"
declare -a icons=(
"actions/bus"
"actions/markers"
"status/bars"
"status/signal-audio"
"status/signal-midi")
cd $tracktypes_dir
for icon in "${icons[@]}"; do
$cmd1 $cmd2 ../$icon.svg ./
done

43
data/icon-themes/meson.build

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
# Copyright (C) 2020 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
theme_iconsdir = themesdir / 'icons'
# install zrythm dark icon theme
install_subdir (
'zrythm-dark',
install_dir: theme_iconsdir)
install_icons = configure_file (
output: 'install_tracktype_icons.sh',
input: 'install_tracktype_icons.sh.in',
configuration: {
'BASH': bash.full_path (),
'TRACK_TYPES_DIR': theme_iconsdir / 'zrythm-dark' / 'scalable' / 'tracktypes',
'CMD1': os_windows ? 'cp' : 'ln',
'CMD2': os_windows ? '' : '-s',
})
# create symlinks/copies for track icons
meson.add_install_script (
meson.current_build_dir () / 'install_tracktype_icons.sh')
# install app icon
install_data (
'zrythm-dark/scalable/apps/zrythm.svg',
install_dir:
datadir / 'icons/hicolor/scalable/apps')

1
data/icon-themes/zrythm-dark/scalable/tracktypes/bars.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
../status/bars.svg

1
data/icon-themes/zrythm-dark/scalable/tracktypes/bus.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
../actions/bus.svg

1
data/icon-themes/zrythm-dark/scalable/tracktypes/markers.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
../actions/markers.svg

1
data/icon-themes/zrythm-dark/scalable/tracktypes/signal-audio.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
../status/signal-audio.svg

1
data/icon-themes/zrythm-dark/scalable/tracktypes/signal-midi.svg

@ -1 +0,0 @@ @@ -1 +0,0 @@
../status/signal-midi.svg

11
data/meson.build

@ -78,16 +78,7 @@ if os_gnu or os_freebsd @@ -78,16 +78,7 @@ if os_gnu or os_freebsd
endif
endif
# install icon theme
install_subdir (
'icon-themes/zrythm-dark',
install_dir: themesdir / 'icons')
# install app icon
install_data (
'icon-themes/zrythm-dark/scalable/apps/zrythm.svg',
install_dir:
datadir / 'icons/hicolor/scalable/apps')
subdir ('icon-themes')
# Zrythm project MIME type
install_data (

5
meson.build

@ -178,8 +178,9 @@ cc = meson.get_compiler ('c') @@ -178,8 +178,9 @@ cc = meson.get_compiler ('c')
# --- Check for programs ---
find_program ('sed', required: true)
find_program ('gettext', required: true)
find_program ('sed')
find_program ('gettext')
bash = find_program ('bash')
dot_bin = find_program ('dot', required: false)
# find plugins for testing

1
tests/meson.build

@ -28,6 +28,7 @@ if get_option ('tests') @@ -28,6 +28,7 @@ if get_option ('tests')
'G_TEST_SRCDIR', meson.current_source_dir ())
test_env.set (
'G_TEST_BUILDDIR', meson.current_build_dir ())
test_env.set ('G_SLICE', 'debug-blocks')
test_env.set (
'GUILE_LOAD_PATH', '$GUILE_LOAD_PATH:' + meson.current_build_dir ())
test_env.set ('G_DEBUG', 'gc-friendly')

Loading…
Cancel
Save