mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2025-12-31 03:07:49 -05:00
This merge request adds the following: 1. A new class AutoStart, designed to add login startup entries for Linux (FreeDesktop autostart) and Windows (Shortcut File). 1. CLI options to enable, disable and check for autostart. (--autostart-enable, --autostart-disable and --autostart-check). e.g. OpenRGB.exe --autostart-enable "--startminimized --server --profile Blue" --nodetect --noautoconnect 1. UI options to enable "Start At Login" with several other options (see screenshots in Comments) Tested on KDE Neon and Windows 10 x64 (x64 build). Commits squashed and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
40 lines
861 B
C++
40 lines
861 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
struct AutoStartInfo
|
|
{
|
|
std::string path;
|
|
std::string args;
|
|
std::string desc;
|
|
std::string icon;
|
|
std::string category;
|
|
};
|
|
|
|
class AutoStartInterface
|
|
{
|
|
public:
|
|
virtual bool DisableAutoStart() = 0;
|
|
virtual bool EnableAutoStart(AutoStartInfo autostart_info) = 0;
|
|
virtual bool IsAutoStartEnabled() = 0;
|
|
virtual std::string GetExePath() = 0;
|
|
|
|
std::string GetAutoStartFile();
|
|
std::string GetAutoStartName();
|
|
|
|
protected:
|
|
std::string autostart_file;
|
|
std::string autostart_name;
|
|
};
|
|
|
|
#ifdef _WIN32
|
|
#include "AutoStart-Windows.h"
|
|
#endif
|
|
|
|
#ifdef __linux__
|
|
#include "AutoStart-Linux.h"
|
|
#endif
|
|
|
|
#ifdef __APPLE__
|
|
#include "AutoStart-MacOS.h"
|
|
#endif |