Compare commits

..

No commits in common. "master" and "v1.7.2" have entirely different histories.

16 changed files with 50 additions and 50 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.8)
project(kima2 VERSION 1.8.3) project(kima2 VERSION 1.7.2)
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake")
@ -98,9 +98,9 @@ if( MINGW )
${MINGW_PATH}/libwinpthread-1.dll ${MINGW_PATH}/libwinpthread-1.dll
${MINGW_PATH}/libsqlite3-0.dll ${MINGW_PATH}/libsqlite3-0.dll
${MINGW_PATH}/libusb-1.0.dll ${MINGW_PATH}/libusb-1.0.dll
${MINGW_PATH}/libicuuc75.dll ${MINGW_PATH}/libicuuc72.dll
${MINGW_PATH}/libicuin75.dll ${MINGW_PATH}/libicuin72.dll
${MINGW_PATH}/libicudt75.dll ${MINGW_PATH}/libicudt72.dll
${MINGW_PATH}/libpcre2-16-0.dll ${MINGW_PATH}/libpcre2-16-0.dll
${MINGW_PATH}/libpcre2-8-0.dll ${MINGW_PATH}/libpcre2-8-0.dll
${MINGW_PATH}/zlib1.dll ${MINGW_PATH}/zlib1.dll
@ -117,7 +117,7 @@ if( MINGW )
${MINGW_PATH}/libmd4c.dll ${MINGW_PATH}/libmd4c.dll
${MINGW_PATH}/libbrotlicommon.dll ${MINGW_PATH}/libbrotlicommon.dll
${MINGW_PATH}/libbrotlidec.dll ${MINGW_PATH}/libbrotlidec.dll
#${MINGW_PATH}/libfmt.dll ${MINGW_PATH}/libfmt.dll
${MINGW_PATH}/libb2-1.dll ${MINGW_PATH}/libb2-1.dll
${MINGW_PATH}/libiconv-2.dll) ${MINGW_PATH}/libiconv-2.dll)
install(FILES ${MINGW_PATH}/../share/qt6/plugins/platforms/qwindows.dll install(FILES ${MINGW_PATH}/../share/qt6/plugins/platforms/qwindows.dll
@ -129,9 +129,10 @@ if( MINGW )
${MINGW_PATH}/../share/qt6/translations/qt_de.qm ${MINGW_PATH}/../share/qt6/translations/qt_de.qm
${MINGW_PATH}/../share/qt6/translations/qt_help_de.qm ${MINGW_PATH}/../share/qt6/translations/qt_help_de.qm
${MINGW_PATH}/../share/qt6/translations/qtmultimedia_de.qm ${MINGW_PATH}/../share/qt6/translations/qtmultimedia_de.qm
DESTINATION bin/share/qt6/translations) #${MINGW_PATH}/../share/qt6/translations/qtquickcontrols_de.qm
install(FILES ${MINGW_PATH}/../share/qt6/plugins/styles/qmodernwindowsstyle.dll #${MINGW_PATH}/../share/qt6/translations/qtscript_de.qm
DESTINATION bin/styles) #${MINGW_PATH}/../share/qt6/translations/qtxmlpatterns_de.qm
DESTINATION bin/translations)
endif( MINGW ) endif( MINGW )
include(InstallRequiredSystemLibraries) include(InstallRequiredSystemLibraries)

View file

@ -1,4 +1,4 @@
Copyright © 2018-2024 Martin Brodbeck Copyright © 2018-2023 Martin Brodbeck
Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der
zugehörigen Dokumentationen (die "Software") erhält, die Erlaubnis erteilt, zugehörigen Dokumentationen (die "Software") erhält, die Erlaubnis erteilt,

View file

@ -13,16 +13,20 @@ Verkaufsdaten nach dem Verkaufsende auszutauschen.
Ebenso können über einen ESC/POS-Drucker Quittungen ausgestellt werden. Ebenso können über einen ESC/POS-Drucker Quittungen ausgestellt werden.
## Installation ## Installation
Auf [rustysoft.de](https://www.rustysoft.de/software/kima2/) werden die Installationsmöglichkeiten (Flatpak, Windows-Installer) erläutert. Bitte die Hinweise dort beachten. Auf [rustysoft.de](https://www.rustysoft.de/software/kima2/) werden verschiedene Installationspakete (Arch Linux,
Ubuntu, Windows) angeboten. Bitte die Hinweise dort beachten.
## Selbst compilieren ### Selbst compilieren
KIMA2 benötigt folgende Libraries: KIMA2 benötigt folgende Libraries:
* Qt 6 * Qt 6
* boost >= 1.80 * boost >= 1.62
* libusb-1.0 * libusb-1.0
* xlnt >= 1.5.0
* nlohmann-json (als 3rdparty submodule vorhanden) * nlohmann-json (als 3rdparty submodule vorhanden)
* csv-parser (als 3rdparty submodule vorhanden)
Da Features aus C++20 sowie von neueren Compilern verwendet werden, sollte als Compiler mindestens GCC 14 verwendet werden. Da Features aus C++20 verwendet werden sowie std::filesystem, sollte als Compiler mindestens
GCC 12 verwendet werden.
Die Installationsschritte unter Linux sind wie folgt: Die Installationsschritte unter Linux sind wie folgt:
``` ```

View file

@ -9,12 +9,12 @@
<project_license>GPL-3.0-or-later</project_license> <project_license>GPL-3.0-or-later</project_license>
<releases> <releases>
<release version="@PROJECT_VERSION@" type="stable" date="2024-01-23" /> <release version="@PROJECT_VERSION@" type="stable" date="2023-04-25" />
</releases> </releases>
<description> <description>
<p> <p>
A small cash point program for children's stuff markets. German language only. A small cash point program for childrens stuff markets. German language only.
</p> </p>
</description> </description>

Binary file not shown.

Binary file not shown.

View file

@ -1,4 +1,4 @@
project('kima2', 'cpp', default_options : ['cpp_std=c++20'], version : '1.8.0') project('kima2', 'cpp', default_options : ['cpp_std=c++20'], version : '1.6.1')
conf_data = configuration_data() conf_data = configuration_data()
conf_data.set('PROJECT_VERSION', '"' + meson.project_version() + '"') conf_data.set('PROJECT_VERSION', '"' + meson.project_version() + '"')

View file

@ -1,6 +1,6 @@
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.78 REQUIRED) find_package(Boost 1.62 REQUIRED)
find_package(SQLite3 REQUIRED) find_package(SQLite3 REQUIRED)
# Because csv-parser needs threads: # Because csv-parser needs threads:
@ -25,10 +25,10 @@ set(CORE_SOURCES
add_library(core STATIC ${CORE_SOURCES}) add_library(core STATIC ${CORE_SOURCES})
#target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/csv-parser/single_include) #target_include_directories(core PRIVATE ${PROJECT_SOURCE_DIR}/subprojects/csv-parser/single_include)
if (WIN32) if (WIN32)
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json) target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json fmt::fmt)
target_link_libraries(core PRIVATE bcrypt) target_link_libraries(core PRIVATE bcrypt)
else() else()
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json) target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json fmt::fmt)
endif() endif()
target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..) target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)

View file

@ -2,7 +2,7 @@
#include <chrono> #include <chrono>
#include <filesystem> #include <filesystem>
#include <format> #include <fmt/chrono.h>
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
@ -47,7 +47,7 @@ void Database::newDb()
fs::path destPath = sourcePath.parent_path() / sourcePath.stem(); fs::path destPath = sourcePath.parent_path() / sourcePath.stem();
auto chronoTime = std::chrono::system_clock::now(); auto chronoTime = std::chrono::system_clock::now();
std::string timeString = std::format("{0:%FT%H-%M-%S}", chronoTime); std::string timeString = fmt::format("{0:%FT%H-%M-%S}", chronoTime);
destPath += std::string("_") += timeString += ".db"; destPath += std::string("_") += timeString += ".db";

View file

@ -102,10 +102,8 @@ void JsonUtil::importSales(const std::filesystem::path &filePath, Marketplace *m
int source_no = jsonValues["source_no"]; int source_no = jsonValues["source_no"];
if (source_no == cashPointNo) { if (source_no == cashPointNo) {
std::string ret = "Die Kassen-Nr. "; throw std::runtime_error("Die Kassen-Nr. der zu imporierenden Daten wird von dieser Kasse "
ret += std::to_string(source_no); "hier bereits verwendet.");
ret += " der zu imporierenden Daten wird von dieser Kasse hier bereits verwendet.";
throw std::runtime_error(ret);
} }
market->setSalesToDelete(jsonValues["source_no"]); market->setSalesToDelete(jsonValues["source_no"]);

View file

@ -2,13 +2,13 @@
#include <algorithm> #include <algorithm>
#include <clocale> #include <clocale>
#include <format> #include <fmt/format.h>
#include <iomanip> #include <iomanip>
#include <numeric> #include <numeric>
#include <iostream> #include <iostream>
//using namespace fmt; using namespace fmt;
std::string formatCentAsEuroString(const int cent, int width) std::string formatCentAsEuroString(const int cent, int width)
{ {
@ -32,7 +32,7 @@ std::string formatCentAsEuroString(const int cent, int width)
#else #else
std::locale myLocale{"de_DE.utf8"}; std::locale myLocale{"de_DE.utf8"};
#endif #endif
return std::format(myLocale, "{:{}.2Lf} €", cent / 100.0L, width); return fmt::format(myLocale, "{:{}.2Lf} €", cent / 100.0L, width);
} }
std::string &ltrim(std::string &str, const std::string &chars) std::string &ltrim(std::string &str, const std::string &chars)

View file

@ -15,7 +15,7 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
SingleApplication kimaApp(argc, argv, false, SingleApplication::Mode::User | SingleApplication::ExcludeAppPath | SingleApplication::ExcludeAppVersion); SingleApplication kimaApp(argc, argv);
// QCoreApplication::setOrganizationName("RustySoft"); // QCoreApplication::setOrganizationName("RustySoft");
QCoreApplication::setOrganizationDomain("rustysoft.de"); QCoreApplication::setOrganizationDomain("rustysoft.de");

View file

@ -105,7 +105,7 @@ MainWindow::MainWindow()
}); });
connect(m_ui.licenseAction, &QAction::triggered, this, [this]() { connect(m_ui.licenseAction, &QAction::triggered, this, [this]() {
QString licenseText( QString licenseText(
"Copyright © 2018-2024 Martin Brodbeck\n\n" "Copyright © 2018-2023 Martin Brodbeck\n\n"
"Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der " "Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der "
"zugehörigen Dokumentationen (die \"Software\") erhält, die Erlaubnis erteilt, " "zugehörigen Dokumentationen (die \"Software\") erhält, die Erlaubnis erteilt, "
"sie uneingeschränkt zu nutzen, inklusive und ohne Ausnahme mit dem Recht, " "sie uneingeschränkt zu nutzen, inklusive und ohne Ausnahme mit dem Recht, "
@ -504,30 +504,27 @@ void MainWindow::onImportSalesJsonActionTriggered()
{ {
QSettings settings; QSettings settings;
auto filenames = QFileDialog::getOpenFileNames(this, "Umsätze/Transaktionen importieren", auto filename = QFileDialog::getOpenFileName(this, "Umsätze/Transaktionen importieren",
QString(), "JSON Dateien (*.json)"); QString(), "JSON Dateien (*.json)");
if (filenames.isEmpty()) if (filename.isEmpty())
return; return;
for(auto filename: filenames) {
#if defined(_WIN64) || defined(_WIN32) #if defined(_WIN64) || defined(_WIN32)
fs::path filePath(filename.toStdWString()); fs::path filePath(filename.toStdWString());
#else #else
fs::path filePath(filename.toStdString()); fs::path filePath(filename.toStdString());
#endif #endif
delete m_ui.salesView->model(); delete m_ui.salesView->model();
try { try {
JsonUtil::importSales(filePath, m_marketplace.get(), JsonUtil::importSales(filePath, m_marketplace.get(),
settings.value("global/cashPointNo").toInt()); settings.value("global/cashPointNo").toInt());
} catch (std::runtime_error &err) { } catch (std::runtime_error &err) {
QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok, QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,
this) this)
.exec(); .exec();
}
} }
setSaleModel(); setSaleModel();
updateStatLabel(); updateStatLabel();
} }

View file

@ -1,6 +1,6 @@
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.78 REQUIRED) find_package(Boost 1.62 REQUIRED)
if(WIN32) if(WIN32)
find_package(LIBUSB REQUIRED) find_package(LIBUSB REQUIRED)
@ -20,4 +20,4 @@ if(WIN32)
else() else()
target_link_libraries(printer core ${LibUSB_LIBRARIES}) target_link_libraries(printer core ${LibUSB_LIBRARIES})
endif() endif()
target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/.. ${Boost_INCLUDE_DIRS}) target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)

@ -1 +1 @@
Subproject commit 9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03 Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d

@ -1 +1 @@
Subproject commit 8c48163c4d3fbba603cfe8a5b94046c9dad71825 Subproject commit a3ed916f591c300e97b873fde36863fa37b49fa9