Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/linux/resources/hyperhdr.desktop
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[Desktop Entry]
Name=HyperHDR
GenericName=HyperHDR Ambient Lighting
Comment=HyperHDR mimics the well known Ambilight from Philips
Comment=Real-time ambient lighting system for TVs, monitors and LEDs
Icon=/usr/share/pixmaps/hyperhdr/hyperhdr_128.png
Terminal=false
TryExec=hyperhdr
Exec=hyperhdr
Type=Application
StartupNotify=false
Categories=Application;
Categories=AudioVideo;Video;Settings;Multimedia;
10 changes: 8 additions & 2 deletions sources/hyperhdr/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <cstdio>
#endif

#include <QStandardPaths>
#include <csignal>

#if !defined(__APPLE__) && !defined(_WIN32)
Expand Down Expand Up @@ -107,7 +108,7 @@ QCoreApplication* createApplication(bool& isGuiApp, int& argc, char* argv[])
#endif

QCoreApplication* app = new QCoreApplication(argc, argv);
QCoreApplication::setApplicationName("HyperHdr");
QCoreApplication::setApplicationName("HyperHDR");
QCoreApplication::setApplicationVersion(HYPERHDR_VERSION);
// add optional library path
QCoreApplication::addLibraryPath(QCoreApplication::applicationDirPath() + "/../lib");
Expand Down Expand Up @@ -140,8 +141,13 @@ int main(int argc, char** argv)
Parser parser("HyperHDR Daemon");
parser.addHelpOption();

QString defaultDataPath = QDir(QDir::homePath()).absoluteFilePath(".hyperhdr");
if (!QDir(defaultDataPath).exists()) {
defaultDataPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
}

BooleanOption& versionOption = parser.add<BooleanOption>(0x0, "version", "Show version information");
Option& userDataOption = parser.add<Option>('u', "userdata", "Overwrite user data path, defaults to home directory of current user (%1)", QDir::homePath() + "/.hyperhdr");
Option& userDataOption = parser.add<Option>('u', "userdata", "Overwrite user data path, defaults to home directory of current user (%1)", defaultDataPath);
BooleanOption& resetPassword = parser.add<BooleanOption>(0x0, "resetPassword", "Lost your password? Reset it with this option back to 'hyperhdr'");
BooleanOption& deleteDB = parser.add<BooleanOption>(0x0, "deleteDatabase", "Start all over? This Option will delete the database");
BooleanOption& silentOption = parser.add<BooleanOption>('s', "silent", "Do not print any outputs");
Expand Down