mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-10-04 06:59:34 +00:00
build: style fixes
This commit is contained in:
parent
fa754fc0e1
commit
5295209c9d
|
@ -1,8 +1,32 @@
|
||||||
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||||
|
|
||||||
install_data('hicolor_apps_16x16_gparted.png', install_dir: join_paths(icondir, '16x16', 'apps'), rename: 'gparted.png')
|
install_data(
|
||||||
install_data('hicolor_apps_22x22_gparted.png', install_dir: join_paths(icondir, '22x22', 'apps'), rename: 'gparted.png')
|
'hicolor_apps_16x16_gparted.png',
|
||||||
install_data('hicolor_apps_24x24_gparted.png', install_dir: join_paths(icondir, '24x24', 'apps'), rename: 'gparted.png')
|
install_dir: join_paths(icondir, '16x16', 'apps'),
|
||||||
install_data('hicolor_apps_32x32_gparted.png', install_dir: join_paths(icondir, '32x32', 'apps'), rename: 'gparted.png')
|
rename: 'gparted.png',
|
||||||
install_data('hicolor_apps_48x48_gparted.png', install_dir: join_paths(icondir, '48x48', 'apps'), rename: 'gparted.png')
|
)
|
||||||
install_data('hicolor_apps_scalable_gparted.svg', install_dir: join_paths(icondir, 'scalable', 'apps'), rename: 'gparted.svg')
|
install_data(
|
||||||
|
'hicolor_apps_22x22_gparted.png',
|
||||||
|
install_dir: join_paths(icondir, '22x22', 'apps'),
|
||||||
|
rename: 'gparted.png',
|
||||||
|
)
|
||||||
|
install_data(
|
||||||
|
'hicolor_apps_24x24_gparted.png',
|
||||||
|
install_dir: join_paths(icondir, '24x24', 'apps'),
|
||||||
|
rename: 'gparted.png',
|
||||||
|
)
|
||||||
|
install_data(
|
||||||
|
'hicolor_apps_32x32_gparted.png',
|
||||||
|
install_dir: join_paths(icondir, '32x32', 'apps'),
|
||||||
|
rename: 'gparted.png',
|
||||||
|
)
|
||||||
|
install_data(
|
||||||
|
'hicolor_apps_48x48_gparted.png',
|
||||||
|
install_dir: join_paths(icondir, '48x48', 'apps'),
|
||||||
|
rename: 'gparted.png',
|
||||||
|
)
|
||||||
|
install_data(
|
||||||
|
'hicolor_apps_scalable_gparted.svg',
|
||||||
|
install_dir: join_paths(icondir, 'scalable', 'apps'),
|
||||||
|
rename: 'gparted.svg',
|
||||||
|
)
|
||||||
|
|
31
meson.build
31
meson.build
|
@ -101,6 +101,7 @@ conf.set('HAVE_LIBUUID', 1)
|
||||||
conf.set('HAVE_STRING_H', 1)
|
conf.set('HAVE_STRING_H', 1)
|
||||||
|
|
||||||
if get_option('help')
|
if get_option('help')
|
||||||
|
gnome_doc_utils_dep = dependency('gnome-doc-utils')
|
||||||
conf.set('ENABLE_HELP_DOC', 1)
|
conf.set('ENABLE_HELP_DOC', 1)
|
||||||
subdir('help')
|
subdir('help')
|
||||||
else
|
else
|
||||||
|
@ -127,13 +128,17 @@ podir = join_paths(meson.current_source_dir(), 'po')
|
||||||
|
|
||||||
intltool_cache = join_paths(meson.current_build_dir(), 'intltool-merge-cache')
|
intltool_cache = join_paths(meson.current_build_dir(), 'intltool-merge-cache')
|
||||||
|
|
||||||
intltool_xml_command = [intltool, '-x', '-u',
|
intltool_xml_command = [
|
||||||
|
intltool, '-x', '-u',
|
||||||
'-c', intltool_cache,
|
'-c', intltool_cache,
|
||||||
podir, '@INPUT@', '@OUTPUT@']
|
podir, '@INPUT@', '@OUTPUT@',
|
||||||
|
]
|
||||||
|
|
||||||
intltool_desktop_command = [intltool, '-d', '-u',
|
intltool_desktop_command = [
|
||||||
|
intltool, '-d', '-u',
|
||||||
'-c', intltool_cache,
|
'-c', intltool_cache,
|
||||||
podir, '@INPUT@', '@OUTPUT@']
|
podir, '@INPUT@', '@OUTPUT@',
|
||||||
|
]
|
||||||
|
|
||||||
gettext_package = 'gparted'
|
gettext_package = 'gparted'
|
||||||
add_project_arguments('-DGETTEXT_PACKAGE="' + gettext_package + '"', language: 'cpp')
|
add_project_arguments('-DGETTEXT_PACKAGE="' + gettext_package + '"', language: 'cpp')
|
||||||
|
@ -146,7 +151,7 @@ po_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
||||||
desktop_in = configure_file(
|
desktop_in = configure_file(
|
||||||
input: 'gparted.desktop.in.in',
|
input: 'gparted.desktop.in.in',
|
||||||
output: 'gparted.desktop.in',
|
output: 'gparted.desktop.in',
|
||||||
configuration: po_conf
|
configuration: po_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: maybe drop intltool and use pure gettext so that we can use i18n.merge_file instead
|
# TODO: maybe drop intltool and use pure gettext so that we can use i18n.merge_file instead
|
||||||
|
@ -156,7 +161,7 @@ custom_target(
|
||||||
output: 'gparted.appdata.xml',
|
output: 'gparted.appdata.xml',
|
||||||
command: intltool_xml_command,
|
command: intltool_xml_command,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'appdata')
|
install_dir: join_paths(get_option('datadir'), 'appdata'),
|
||||||
)
|
)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
|
@ -165,7 +170,7 @@ custom_target(
|
||||||
output: 'gparted.desktop',
|
output: 'gparted.desktop',
|
||||||
command: intltool_desktop_command,
|
command: intltool_desktop_command,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(get_option('datadir'), 'applications')
|
install_dir: join_paths(get_option('datadir'), 'applications'),
|
||||||
)
|
)
|
||||||
|
|
||||||
if get_option('polkit')
|
if get_option('polkit')
|
||||||
|
@ -174,7 +179,7 @@ if get_option('polkit')
|
||||||
polkit_policy_in = configure_file(
|
polkit_policy_in = configure_file(
|
||||||
input: 'org.gnome.gparted.policy.in.in',
|
input: 'org.gnome.gparted.policy.in.in',
|
||||||
output: 'org.gnome.gparted.policy.in',
|
output: 'org.gnome.gparted.policy.in',
|
||||||
configuration: po_conf
|
configuration: po_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
|
@ -183,14 +188,14 @@ if get_option('polkit')
|
||||||
output: 'org.gnome.gparted.policy',
|
output: 'org.gnome.gparted.policy',
|
||||||
command: intltool_xml_command,
|
command: intltool_xml_command,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: polkitpolicydir
|
install_dir: polkitpolicydir,
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Find graphical privilege escalation program
|
# Find graphical privilege escalation program
|
||||||
gksuprog = ''
|
gksuprog = ''
|
||||||
if get_option('polkit')
|
if get_option('polkit')
|
||||||
# Check for pkexec >= 0.102 for it's ability to run X11 apps.
|
# Check for pkexec >= 0.102 for its ability to run X11 apps.
|
||||||
polkit_dep = dependency('polkit-agent-1', version: '>=0.102')
|
polkit_dep = dependency('polkit-agent-1', version: '>=0.102')
|
||||||
gksuprog = 'pkexec --disable-internal-agent'
|
gksuprog = 'pkexec --disable-internal-agent'
|
||||||
elif find_program('gksudo', required: false).found()
|
elif find_program('gksudo', required: false).found()
|
||||||
|
@ -206,7 +211,7 @@ endif
|
||||||
# Configure the gparted script
|
# Configure the gparted script
|
||||||
gparted_bin_conf = configuration_data()
|
gparted_bin_conf = configuration_data()
|
||||||
|
|
||||||
gparted_bin_conf.set('sbindir', join_paths(get_option('prefix'), get_option('bindir')))
|
gparted_bin_conf.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir')))
|
||||||
gparted_bin_conf.set('gksuprog', gksuprog)
|
gparted_bin_conf.set('gksuprog', gksuprog)
|
||||||
gparted_bin_conf.set('enable_xhost_root', get_option('xhost_root'))
|
gparted_bin_conf.set('enable_xhost_root', get_option('xhost_root'))
|
||||||
gparted_bin_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
gparted_bin_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
|
||||||
|
@ -214,14 +219,14 @@ gparted_bin_conf.set('bindir', join_paths(get_option('prefix'), get_option('bind
|
||||||
gparted_bin = configure_file(
|
gparted_bin = configure_file(
|
||||||
input: 'gparted.in',
|
input: 'gparted.in',
|
||||||
output: 'gparted',
|
output: 'gparted',
|
||||||
configuration: gparted_bin_conf
|
configuration: gparted_bin_conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
install_data(
|
install_data(
|
||||||
gparted_bin,
|
gparted_bin,
|
||||||
install_dir: join_paths(get_option('bindir')),
|
install_dir: join_paths(get_option('bindir')),
|
||||||
rename: 'gparted',
|
rename: 'gparted',
|
||||||
install_mode: 'rwxr-xr-x'
|
install_mode: 'rwxr-xr-x',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Optional stuff
|
# Optional stuff
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
i18n.gettext(
|
i18n.gettext(gettext_package)
|
||||||
gettext_package,
|
|
||||||
install: true
|
|
||||||
)
|
|
|
@ -1,4 +1,4 @@
|
||||||
gtest_dep = dependency('gtest', main : true)
|
gtest_dep = dependency('gtest', main: true)
|
||||||
test_dummy_exe = executable(
|
test_dummy_exe = executable(
|
||||||
'dummy',
|
'dummy',
|
||||||
'test_dummy.cc',
|
'test_dummy.cc',
|
||||||
|
@ -6,8 +6,8 @@ test_dummy_exe = executable(
|
||||||
dependencies: [
|
dependencies: [
|
||||||
gtest_dep,
|
gtest_dep,
|
||||||
deps,
|
deps,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
test_BlockSpecial_exe = executable(
|
test_BlockSpecial_exe = executable(
|
||||||
'BlockSpecial',
|
'BlockSpecial',
|
||||||
'../src/BlockSpecial.cc', 'test_BlockSpecial.cc',
|
'../src/BlockSpecial.cc', 'test_BlockSpecial.cc',
|
||||||
|
@ -15,8 +15,8 @@ test_BlockSpecial_exe = executable(
|
||||||
dependencies: [
|
dependencies: [
|
||||||
deps,
|
deps,
|
||||||
gtest_dep,
|
gtest_dep,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
test_PipeCapture_exe = executable(
|
test_PipeCapture_exe = executable(
|
||||||
'PipeCapture',
|
'PipeCapture',
|
||||||
'../src/PipeCapture.cc', 'test_PipeCapture.cc',
|
'../src/PipeCapture.cc', 'test_PipeCapture.cc',
|
||||||
|
@ -24,8 +24,8 @@ test_PipeCapture_exe = executable(
|
||||||
dependencies: [
|
dependencies: [
|
||||||
deps,
|
deps,
|
||||||
gtest_dep,
|
gtest_dep,
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
test('test_dummy', test_dummy_exe)
|
test('test_dummy', test_dummy_exe)
|
||||||
test('test_BlockSpecial', test_BlockSpecial_exe)
|
test('test_BlockSpecial', test_BlockSpecial_exe)
|
||||||
test('test_PipeCapture', test_PipeCapture_exe)
|
test('test_PipeCapture', test_PipeCapture_exe)
|
||||||
|
|
Loading…
Reference in a new issue