improve code organisation, add .rc file

This commit is contained in:
Syping 2024-02-26 11:33:39 +01:00
parent 5191dcbefc
commit 87961fe611
26 changed files with 92 additions and 83 deletions

View file

@ -19,7 +19,7 @@
#ifndef NDEBUG
#include <iostream>
#endif
#include "database_core.h"
#include "database.h"
using namespace bot::database;
database::database()

View file

@ -16,8 +16,8 @@
* responsible for anything with use of the software, you are self responsible.
*****************************************************************************/
#ifndef DATABASE_CORE_H
#define DATABASE_CORE_H
#ifndef DATABASE_H
#define DATABASE_H
#include "settings_types.h"
@ -52,4 +52,4 @@ namespace bot {
}
}
#endif // DATABASE_CORE_H
#endif // DATABASE_H

View file

@ -19,9 +19,9 @@
#include <dpp/json.h>
#include <fstream>
#include <iostream>
#include "database_file.h"
#include "settings.h"
#include "translator_libretranslate.h"
#include "../database/file/file.h"
#include "../translator/libretranslate/libretranslate.h"
using namespace bot::settings;
void process_database_channels(std::shared_ptr<bot::database::database> database, bot::settings::guild *guild, std::vector<dpp::snowflake> *webhookIds)

View file

@ -19,9 +19,9 @@
#ifndef SETTINGS_H
#define SETTINGS_H
#include <mutex>
#include "database_core.h"
#include "database.h"
#include "settings_types.h"
#include "translator_core.h"
#include "translator.h"
namespace bot {
namespace settings {

View file

@ -19,7 +19,7 @@
#ifndef NDEBUG
#include <iostream>
#endif
#include "translator_core.h"
#include "translator.h"
using namespace bot::translator;
translator::translator()

View file

@ -16,8 +16,8 @@
* responsible for anything with use of the software, you are self responsible.
*****************************************************************************/
#ifndef TRANSLATOR_CORE_H
#define TRANSLATOR_CORE_H
#ifndef TRANSLATOR_H
#define TRANSLATOR_H
#include <string>
#include <vector>
@ -39,4 +39,4 @@ namespace bot {
}
}
#endif // TRANSLATOR_CORE_H
#endif // TRANSLATOR_H

View file

@ -27,7 +27,7 @@
#include <fstream>
#include <iostream>
#include <thread>
#include "database_file.h"
#include "file.h"
using namespace bot::database;
using namespace std::string_literals;

View file

@ -26,7 +26,7 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "database_core.h"
#include "../../core/database.h"
namespace bot {
namespace database {

View file

@ -0,0 +1,29 @@
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @dtranslatebot_VERSION_MAJOR@, @dtranslatebot_VERSION_MINOR@, @dtranslatebot_VERSION_PATCH@, 0
PRODUCTVERSION @dtranslatebot_VERSION_MAJOR@, @dtranslatebot_VERSION_MINOR@, @dtranslatebot_VERSION_PATCH@, 0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Syping"
VALUE "FileDescription", "Open Source Discord Translation Bot"
VALUE "FileVersion", "@dtranslatebot_VERSION@"
VALUE "InternalName", "dtranslatebot"
VALUE "LegalCopyright", "Copyright © 2023-2024 Syping"
VALUE "OriginalFilename", "dtranslatebot.exe"
VALUE "ProductName", "dtranslatebot"
VALUE "ProductVersion", "@dtranslatebot_VERSION@"
END
END
END

View file

@ -18,7 +18,7 @@
#include <dpp/json.h>
#include <dpp/httpsclient.h>
#include "translator_libretranslate.h"
#include "libretranslate.h"
using namespace bot::translator;
using namespace std::string_literals;

View file

@ -21,7 +21,7 @@
#include <cstdint>
#include <string>
#include "translator_core.h"
#include "../../core/translator.h"
namespace bot {
namespace translator {