This commit introduces a new Tkinter-based GUI installer script (`installer/main.py`) that manages file extraction and shortcut creation. Additionally, a new file system access feature was added to the `ToolboxWindow` class, allowing users to open directories with platform-specific commands. Improvements also include platform-specific adjustments for Windows executables in the CMake configuration.
72 lines
1.6 KiB
C++
72 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include <saucer/smartview.hpp>
|
|
#include "modules/hwnd_module.h"
|
|
#include "all.hpp"
|
|
#include <sol/sol.hpp>
|
|
#include <saucer/webview.hpp>
|
|
|
|
class ToolboxWindow {
|
|
public:
|
|
// Konstruktor erhält das Application-Objekt als Parameter
|
|
explicit ToolboxWindow(std::shared_ptr<saucer::application>& app);
|
|
~ToolboxWindow();
|
|
|
|
bool m_bShow = false;
|
|
|
|
// Methode zum Anzeigen des Fensters
|
|
void show();
|
|
void hide();
|
|
// Für die Fensterinitialisierung
|
|
void initialize();
|
|
|
|
void OptionWindow();
|
|
|
|
struct ToolboxItem{
|
|
std::string id;
|
|
std::string name;
|
|
std::string path;
|
|
std::string icon;
|
|
std::string lua_script;
|
|
std::string description;
|
|
std::string category;
|
|
std::string version;
|
|
std::string author;
|
|
std::string url;
|
|
std::string license;
|
|
};
|
|
|
|
std::vector<ToolboxItem> m_toolboxItems;
|
|
|
|
saucer::smartview<saucer::default_serializer, hwnd_module> m_webview;
|
|
|
|
private:
|
|
std::shared_ptr<saucer::application> m_app;
|
|
std::thread m_threadMonitor;
|
|
std::atomic<bool> m_runningMonitor = true;
|
|
|
|
#ifdef _WIN32
|
|
std::filesystem::path userPath = std::getenv("USERPROFILE"); // Windows
|
|
#else
|
|
std::filesystem::path userPath = std::getenv("HOME"); // Unix/Linux/MacOS
|
|
#endif
|
|
|
|
void configureWindow();
|
|
void loadResources();
|
|
void runLuaScript();
|
|
|
|
void ExposeToJs();
|
|
|
|
bool ensureToolboxInUserPath();
|
|
|
|
void fillToolboxMenu();
|
|
|
|
void debug_print();
|
|
|
|
void run_lua(int id);
|
|
|
|
void monitor_focus();
|
|
|
|
void open_file_system();
|
|
};
|