Skip to content

Commit 7c705b0

Browse files
committed
build: use more install_data, fix description.xml translations
1 parent 2f669af commit 7c705b0

File tree

10 files changed

+53
-42
lines changed

10 files changed

+53
-42
lines changed

create_oxt.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,6 @@ zip -r "$OXT" \
3737
toolbar \
3838
description.xml
3939

40-
cd "$BUILD_ROOT"/po &&
41-
zip -r "$OXT" locale
40+
cd "$BUILD_ROOT" && cp -r po/ locale/
41+
zip -r "$OXT" locale
42+
rm -r locale/

extension/asr/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
install_data(
2+
[ 'jobs.xcu' ],
3+
install_dir: join_paths(extension_dir, 'asr'),
4+
)

extension/i18n_description.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ MESON_BUILD_ROOT="$2"
88
SOURCE_DIR="$MESON_SOURCE_ROOT"/extension
99
BUILD_DIR="$MESON_BUILD_ROOT"/extension
1010

11+
cp "$BUILD_DIR"/description.xml.in "$BUILD_DIR"/description.xml
12+
1113
# First get the english text
1214

1315
mkdir -p "$BUILD_DIR"/description
@@ -27,9 +29,8 @@ do
2729
if [ "$string" != "" ]
2830
then
2931
echo "$string" > "$BUILD_DIR"/description/desc_"$lang".txt
30-
sed "/.*\/extension-description/i <src xlink:href=\"description/desc_$lang.txt\" lang=\"$lang\" />" \
31-
"$BUILD_DIR"/description.xml.in \
32-
> "$BUILD_DIR"/description.xml
32+
sed -i "/.*\/extension-description/ i\ <src xlink:href=\"description/desc_$lang.txt\" lang=\"$lang\" />" \
33+
"$BUILD_DIR"/description.xml
3334
fi
3435
fi
3536
done < "$MESON_SOURCE_ROOT"/po/LINGUAS

extension/images/meson.build

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
install_data(
2+
[ 'chainframes.png',
3+
'icon_24.png',
4+
'icon_48.png',
5+
'lc_chainframes.png',
6+
'lc_timefield.png',
7+
'sc_chainframes.png',
8+
'sc_timefield.png' ],
9+
install_dir: join_paths(extension_dir, 'images')
10+
)

extension/meson.build

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,11 @@ subdir('options')
4141
subdir('toolbar')
4242

4343
if bundled
44+
subdir('asr')
45+
subdir('images')
4446
subdir('python')
45-
46-
install_subdir(
47-
'asr',
48-
install_dir: extension_dir,
49-
)
50-
5147
install_subdir(
5248
join_paths(meson.current_build_dir(), 'description'),
5349
install_dir: extension_dir,
5450
)
55-
56-
install_subdir(
57-
'images',
58-
install_dir: extension_dir
59-
)
6051
endif
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Install Extension
2+
install_data(
3+
[ 'ASR.py',
4+
'OptionsDialogHandler.py',
5+
'Parlatype.py' ],
6+
install_dir: join_paths(extension_dir, 'python', 'components')
7+
)
8+
9+
subdir('pythonpath')
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
install_data(
2+
[ 'parlatype_utils.py',
3+
'parlatype_win32api.py' ],
4+
install_dir: join_paths(extension_dir, 'python', 'components', 'pythonpath')
5+
)
6+
7+
# Copy pythonpath from Extension to Macros
8+
install_data(
9+
[ 'parlatype_utils.py',
10+
'parlatype_win32api.py' ],
11+
install_dir: join_paths(script_dir, 'components', 'pythonpath')
12+
)

extension/python/macros/meson.build

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Install Macros
2+
install_data(
3+
'Macros.py',
4+
rename: 'Parlatype.py',
5+
install_dir: join_paths(script_dir, 'macros')
6+
)

extension/python/meson.build

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,2 @@
1-
# Install Extension
2-
install_subdir(
3-
'components',
4-
install_dir: join_paths(extension_dir, 'python')
5-
)
6-
7-
# Install Macros
8-
install_data(
9-
'macros/Macros.py',
10-
rename: 'Parlatype.py',
11-
install_dir: script_dir,
12-
)
13-
14-
# Copy pythonpath from Extension to Macros
15-
install_subdir(
16-
'components/pythonpath',
17-
install_dir: script_dir,
18-
)
1+
subdir('components')
2+
subdir('macros')

po/meson.build

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,4 @@ i18n.gettext(
22
'parlatype_lo',
33
data_dirs: [ '.' ],
44
install_dir: join_paths(extension_dir, 'locale')
5-
)
6-
7-
if bundled
8-
install_subdir(
9-
join_paths(meson.current_build_dir(), 'locale'),
10-
install_dir: extension_dir,
11-
)
12-
endif
5+
)

0 commit comments

Comments
 (0)