🚧 cleanup

This commit is contained in:
Vladislav Nepogodin 2021-09-20 04:54:03 +04:00
parent d1c92376c4
commit 8eded96a38
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
3 changed files with 59 additions and 2 deletions

14
launch.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
# Script to generate mo files in a temp locale folder
# Use it only for testing purpose
rm -rf locale
mkdir locale
cd po
for lang in $(ls *.po); do
lang=${lang::-3}
mkdir -p ../locale/${lang//_/-}/LC_MESSAGES
msgfmt -c -o ../locale/${lang//_/-}/LC_MESSAGES/cachyos-hello.mo $lang.po
done
cd ..
./build/cachyos-hello --dev

43
meson.build Normal file
View File

@ -0,0 +1,43 @@
project('cachyos-hello', 'cpp',
version: '0.6.7',
license: 'GPLv3',
meson_version: '>=0.53.0',
default_options: ['cpp_std=c++17',
'warning_level=1',
'werror=true',
'b_ndebug=if-release'])
# Common dependencies
fmt = dependency('fmt', version : ['>=8.0.0'], fallback : ['fmt', 'fmt_dep'])
gtkmm = dependency('gtkmm-3.0', version : ['>=3.22.0'])
src_files = files(
'src/hello.cpp', 'src/hello.hpp',
'src/main.cpp',
)
executable(
'cachyos-hello',
src_files,
dependencies: [fmt, gtkmm],
include_directories: [include_directories('src')],
install: true)
summary(
{
'Build type': get_option('buildtype'),
},
bool_yn: true
)
clangtidy = find_program('clang-tidy', required: false)
if clangtidy.found()
run_target(
'tidy',
command: [
clangtidy,
'-checks=*,-fuchsia-default-arguments',
'-p', meson.build_root()
] + src_files)
endif

View File

@ -330,7 +330,7 @@ void Hello::on_action_clicked(GtkWidget* widget) noexcept {
fmt::print("install\n");
return;
} else if (strncmp(name, "autostart", 9) == 0) {
const auto& action = Glib::wrap(GTK_SWITCH(widget));
//const auto& action = Glib::wrap(GTK_SWITCH(widget));
//set_autostart(action->get_active());
fmt::print("autostart\n");
@ -359,4 +359,4 @@ void Hello::on_delete_window(GtkWidget* /*widget*/) noexcept {
write_json(g_refHello->m_preferences["save_path"].get<std::string>(), g_refHello->m_save);
const auto& application = g_refHello->get_application();
application->quit();
}
}