🚧 cleanup
This commit is contained in:
		
							parent
							
								
									d1c92376c4
								
							
						
					
					
						commit
						8eded96a38
					
				| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					@ -330,7 +330,7 @@ void Hello::on_action_clicked(GtkWidget* widget) noexcept {
 | 
				
			||||||
        fmt::print("install\n");
 | 
					        fmt::print("install\n");
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    } else if (strncmp(name, "autostart", 9) == 0) {
 | 
					    } 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());
 | 
					        //set_autostart(action->get_active());
 | 
				
			||||||
        fmt::print("autostart\n");
 | 
					        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);
 | 
					    write_json(g_refHello->m_preferences["save_path"].get<std::string>(), g_refHello->m_save);
 | 
				
			||||||
    const auto& application = g_refHello->get_application();
 | 
					    const auto& application = g_refHello->get_application();
 | 
				
			||||||
    application->quit();
 | 
					    application->quit();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue