-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to build this without x11 stuff #5
Comments
Actually, better yet, can you provide prebuilt binaries? I've followed all the steps and ran into this when trying to build: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53, |
**Update: Trying this on a different machine that is ubuntu20 instead of 21 and has a newer SoC worked. |
Hello @STashakkori, Sadly, the only way to build CLI alone is by modifying the Source/Main.cpp, the compiler will cast out the unused libraries. however, libs like x11 should still be present at compile time. There are already built binaries for Linux & Windows in the Releases, which can be used directly, but they contain CLI and UI code as well. About the failed build attempt you did, can you give more details on the OS and Distro you are using ? Thank you. |
Glad it worked! by the way you can modify the Source/Main.cpp for CLI only. /**
* Enigma Entry Point
*/
#include <pch.hpp>
#if ! ENIGMA_TESTING
#include <Enigma.hpp>
#else
#include <Tests/TestsAll.hpp>
#endif
int main(int argc, char* argv[])
{
// Initialize Logger
Enigma::Logger::Initialize();
// Initialize SQLite3 Database
Enigma::Database::Initialize();
Enigma::i32 exit_code = -1;
try
{
//========= CLI Entry =========//
const auto _Cli = std::make_unique<Enigma::CLI>(argc, argv);
exit_code = _Cli->Run();
}
catch (const std::exception& e)
{
// Exit Abnormally
ENIGMA_CRITICAL(e.what());
exit_code = EXIT_FAILURE;
}
// Shutdown SQLite3 Database
Enigma::Database::Shutdown();
// Shutdown Logger
Enigma::Logger::Shutdown();
return exit_code;
}
/**
* Windows Entry Point (for Release & Distribution)
* Note: even when using WinMain, release & dist are built as ConsoleApp so CLI will work properly.
*/
#if defined(ENIGMA_PLATFORM_WINDOWS) && (defined(ENIGMA_RELEASE) || defined(ENIGMA_DIST))
int WINAPI WinMain(
[[maybe_unused]] _In_ HINSTANCE instance,
[[maybe_unused]] _In_opt_ HINSTANCE prev_instance,
[[maybe_unused]] _In_ LPSTR cmd_line,
[[maybe_unused]] _In_ int cmd_show)
{
return ::main(__argc, __argv);
}
#endif |
Ah ok thank you @BaderEddineOuaich . By the way this is a finely crafted tool. My compliments to the craftsman |
You're welcome! |
Thank you, you too. Happy Holidays and talk to you soon
…On Fri, Oct 15, 2021 at 12:23 PM Bader ***@***.***> wrote:
You're welcome!
If you encounter any problems, questions or clarifications, please don't
hesitate to open an issue or contact me 👍
Have a nice day!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAPQ26UMEEBYJUILCDPGKLUHBPSBANCNFSM5GCKEK5A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello. Is there a way to build this without needed the x11 headers? We want to use this as a CLI based tool only and would rather not bring more libraries in than we need. Thank you
The text was updated successfully, but these errors were encountered: