From 6803ef84a5a42608a404c45ce3e52740b46c9bc7 Mon Sep 17 00:00:00 2001 From: Nikolay Brovko Date: Fri, 24 Jan 2020 16:02:38 +0300 Subject: [PATCH] place source code files to src directory --- README.md | 2 +- meson.build | 16 +--------------- main.vala => src/main.vala | 2 +- src/meson.build | 16 ++++++++++++++++ 4 files changed, 19 insertions(+), 17 deletions(-) rename main.vala => src/main.vala (98%) create mode 100644 src/meson.build diff --git a/README.md b/README.md index 3d1a815..6966509 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Now support Arch and Debian based Linux (OpenRC and SystemD). git clone https://git.macaw.me/plant_1312/Yggtk.git && cd Yggtk meson build ninja -C build -./build/yggtk +./build/src/yggtk ``` diff --git a/meson.build b/meson.build index d2d4918..353d085 100644 --- a/meson.build +++ b/meson.build @@ -8,18 +8,4 @@ pkg = import('pkgconfig') gnome = import('gnome') subdir('data') - -yggtk = executable( - meson.project_name(), - [ - 'main.vala', - ] + yggtk_resources, - dependencies: [ - dependency('gtk+-3.0'), - dependency('json-glib-1.0'), - ], - vala_args: [ - '--gresources', - join_paths(meson.source_root(), 'data', 'org.yggtk.yggtk.gresource.xml'), - ] -) +subdir('src') diff --git a/main.vala b/src/main.vala similarity index 98% rename from main.vala rename to src/main.vala index 6d8a939..2c112da 100644 --- a/main.vala +++ b/src/main.vala @@ -134,7 +134,7 @@ int update () { Process.spawn_command_line_sync (@"git clone $repo_url $temp_dir"); Process.spawn_command_line_sync (@"meson $temp_dir/build $temp_dir"); Process.spawn_command_line_sync (@"ninja -C $temp_dir/build"); - Process.spawn_command_line_sync (@"cp $temp_dir/build/yggtk ."); + Process.spawn_command_line_sync (@"cp $temp_dir/build/src/yggtk ."); Process.spawn_command_line_sync (@"rm -rf $temp_dir"); Process.spawn_command_line_sync ("./yggtk"); diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..5e822c1 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,16 @@ +yggtk_sources = [ + 'main.vala', +] + +yggtk = executable( + meson.project_name(), + yggtk_sources + yggtk_resources, + dependencies: [ + dependency('gtk+-3.0'), + dependency('json-glib-1.0'), + ], + vala_args: [ + '--gresources', + join_paths(meson.source_root(), 'data', 'org.yggtk.yggtk.gresource.xml'), + ] +)