#include <memory>

#include "GuiApplication.h"
#include "MainApplication.h"
#include "CommandLineArgs.h"

int main(int argc, char *argv[])
{
    auto args = CommandLineArgs::Create();
    args->process(argc, argv);
    args->recordLaunchPath();

    // Start the main app
    auto main_app = MainApplication::Create();
    main_app->Initialize(std::move(args));

    // Start the gui app
    auto gui_app = GuiApplication();
    gui_app.SetMainApplication(main_app);
    gui_app.Run();

    main_app->ShutDown();
    return 0;
}
