1 #include <wx/xrc/xmlres.h>
4 #include <boost/filesystem.hpp>
8 #include "GikoMona.hpp"
9 #include "database.hpp"
12 #include "extension.hpp"
14 namespace monazilla { namespace GikoMona { namespace core {
19 extension *app_extension;
24 wxXmlResource::Get()->InitAllHandlers();
25 wxXmlResource::Get()->LoadAllFiles(wxT("resouce"));
27 boost::system::error_code reason;
28 if(!boost::filesystem::create_directory(".tmp", reason) || reason) {
33 app_model = new model;
34 app_extension = new extension;
39 void done_core() noexcept {
43 optimize_database("./history.db");
46 void optimize_database(const boost::filesystem::path& db_path) {
49 auto value = db.compile(u8"SELECT * FROM file-information;");
51 value.get_result<int>();
53 if(db.select<int>("count-of-deleting-values", "file-infomation") >= 1000) {