1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-03 12:50:02 +00:00

...rename duckbin to kamokan --> 鴨缶. yay!

This commit is contained in:
King_DuckZ 2017-06-03 20:52:57 +01:00
parent ae283b6c96
commit cb2d163981
16 changed files with 50 additions and 50 deletions

View file

@ -1,7 +1,7 @@
project(duckbin VERSION 0.1.0 LANGUAGES CXX)
project(kamokan VERSION 0.1.0 LANGUAGES CXX)
set(DUCKBIN_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix")
set(DUCKBIN_CONFIG_FILE "duckbin.ini" CACHE STRING "Filename of the config file in DUCKBIN_CONFIG_PATH")
set(KAMOKAN_CONFIG_PATH "etc" CACHE STRING "Path where config file will be located, absolute or relative to the install prefix")
set(KAMOKAN_CONFIG_FILE "kamokan.ini" CACHE STRING "Filename of the config file in KAMOKAN_CONFIG_PATH")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -30,6 +30,6 @@ install(TARGETS ${PROJECT_NAME}
)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/duckbin_config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/duckbin_config.h"
"${CMAKE_CURRENT_SOURCE_DIR}/kamokan_config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/include/kamokan_config.h"
)

View file

@ -1,25 +1,25 @@
/* Copyright 2017, Michele Santullo
* This file is part of "duckbin".
* This file is part of "kamokan".
*
* "duckbin" is free software: you can redistribute it and/or modify
* "kamokan" is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* "duckbin" is distributed in the hope that it will be useful,
* "kamokan" is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with "duckbin". If not, see <http://www.gnu.org/licenses/>.
* along with "kamokan". If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define DUCKBIN_CONFIG_PATH "@DUCKBIN_CONFIG_PATH@"
#define DUCKBIN_CONFIG_FILE "@DUCKBIN_CONFIG_FILE@"
#define DUCKBIN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define KAMOKAN_CONFIG_PATH "@KAMOKAN_CONFIG_PATH@"
#define KAMOKAN_CONFIG_FILE "@KAMOKAN_CONFIG_FILE@"
#define KAMOKAN_PATH_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define VERSION_MINOR @PROJECT_VERSION_MINOR@
#define VERSION_PATCH @PROJECT_VERSION_PATCH@

View file

@ -1,21 +1,21 @@
/* Copyright 2017, Michele Santullo
* This file is part of "duckbin".
* This file is part of "kamokan".
*
* "duckbin" is free software: you can redistribute it and/or modify
* "kamokan" is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* "duckbin" is distributed in the hope that it will be useful,
* "kamokan" is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with "duckbin". If not, see <http://www.gnu.org/licenses/>.
* along with "kamokan". If not, see <http://www.gnu.org/licenses/>.
*/
#include "duckbin_config.h"
#include "kamokan_config.h"
#include "submit_paste_response.hpp"
#include "quick_submit_paste_response.hpp"
#include "pastie_response.hpp"
@ -43,16 +43,16 @@ namespace {
std::string config_file_path() a_pure;
std::string config_file_path() {
mchlib::PathName config_path(DUCKBIN_CONFIG_PATH);
mchlib::PathName config_path(KAMOKAN_CONFIG_PATH);
mchlib::PathName full_path("");
if (config_path.is_absolute()) {
full_path = std::move(config_path);
}
else {
full_path = mchlib::PathName(DUCKBIN_PATH_PREFIX);
full_path = mchlib::PathName(KAMOKAN_PATH_PREFIX);
full_path.join(config_path);
}
full_path.join(DUCKBIN_CONFIG_FILE);
full_path.join(KAMOKAN_CONFIG_FILE);
return full_path.path();
}
@ -95,9 +95,9 @@ namespace {
std::cout << "no (Debug build)";
#endif
std::cout << '\n';
std::cout << "DUCKBIN_CONFIG_FILE: \"" << DUCKBIN_CONFIG_FILE << "\"\n";
std::cout << "DUCKBIN_CONFIG_PATH: \"" << DUCKBIN_CONFIG_PATH << "\"\n";
std::cout << "DUCKBIN_PATH_PREFIX: \"" << DUCKBIN_PATH_PREFIX << "\"\n";
std::cout << "KAMOKAN_CONFIG_FILE: \"" << KAMOKAN_CONFIG_FILE << "\"\n";
std::cout << "KAMOKAN_CONFIG_PATH: \"" << KAMOKAN_CONFIG_PATH << "\"\n";
std::cout << "KAMOKAN_PATH_PREFIX: \"" << KAMOKAN_PATH_PREFIX << "\"\n";
std::cout << "VERSION_MAJOR: " << VERSION_MAJOR << '\n';
std::cout << "VERSION_MINOR: " << VERSION_MINOR << '\n';
std::cout << "VERSION_PATCH: " << VERSION_PATCH << '\n';
@ -147,11 +147,11 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) {
}
SafeStackObject<tawashi::IniFile> ini = load_ini();
auto settings = SafeStackObject<tawashi::SettingsBag>(ini, "duckbin");
auto settings = SafeStackObject<tawashi::SettingsBag>(ini, "kamokan");
fill_defaults(*settings);
auto statuslog = setup_logging(*settings);
SPDLOG_DEBUG(statuslog, "duckbin started");
SPDLOG_DEBUG(statuslog, "kamokan started");
int retval = 0;
try {
statuslog->info("Loaded config: \"{}\"", config_file_path());
@ -178,6 +178,6 @@ int main (int parArgc, char* parArgv[], char* parEnvp[]) {
retval = 1;
}
SPDLOG_DEBUG(statuslog, "duckbin done, quitting with {}", retval);
SPDLOG_DEBUG(statuslog, "kamokan done, quitting with {}", retval);
return retval;
}