diff --git a/DataStruct.h b/DataStruct.h index eb87ccf..91bf253 100644 --- a/DataStruct.h +++ b/DataStruct.h @@ -22,15 +22,15 @@ #include #include -//Prgoram title -#define PROGRAM_TITLE "eXtendet PAK" -#define PROGRAM_VERSION "v0.5" -#define PROGRAM_AUTHOR "Yanczi" -#define PROGRAM_COMPILING "19 December 2025" -#define PROGRAM_LICENSE "GNU LGPL v3" +namespace ui +{ + inline constexpr std::string_view title = "exPak"; + inline constexpr std::string_view ver = "0.5"; +} // Pliki -namespace fl { +namespace fl +{ inline constexpr std::string_view sigpak = "XPAK"; inline constexpr std::string_view sigkey = "XKEY"; diff --git a/EncryptionManager.cpp b/EncryptionManager.cpp index 31c2d27..a44085e 100644 --- a/EncryptionManager.cpp +++ b/EncryptionManager.cpp @@ -98,7 +98,7 @@ void EncryptionManager::saveCppHeadFile(const std::string& path) std::ofstream file(path + ".hpp"); - file << "// Plik wygenerowany przez " << PROGRAM_TITLE << " " << PROGRAM_VERSION << std::endl; + file << "// Plik wygenerowany przez " << ui::title << " " << ui::ver << std::endl; file << std::endl; file << std::endl; file << "#pragma once" << std::endl; diff --git a/voidcmd.cpp b/voidcmd.cpp index eb20331..22e1520 100644 --- a/voidcmd.cpp +++ b/voidcmd.cpp @@ -80,16 +80,16 @@ static bool EmptyPath(std::string path) } int main(int argc, char* argv[]) { - std::string path = ""; - - std::cout << PROGRAM_VERSION << " Release " << PROGRAM_COMPILING << std::endl; - std::cout << "Author: " << PROGRAM_AUTHOR << std::endl; - std::cout << "License: " << PROGRAM_LICENSE << "\n" << std::endl; + std::cout << ui::title << std::endl << "ver. " << ui::ver << std::endl; + std::cout << "Author: Yanczi" << std::endl; + std::cout << "License: GNU LGPL v3" << "\n" << std::endl; CreateCargo cargo; ExtractCargo extract; ViewCargo viewCargo; + std::string path = ""; + for (int i = 0; i < argc; ++i) { std::string arg = argv[i];