Commit 07c6d15d authored by Stefan Pfeifer's avatar Stefan Pfeifer

Rename some CMake application parameters

parent 342405b1
......@@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD 14)
# Parameters used for configuring files
set(APPLICATION_NAME "bow-simulator")
set(APPLICATION_TITLE "Bow Simulator")
set(APPLICATION_DISPLAY_NAME "Bow Simulator")
set(APPLICATION_VERSION "0.6")
set(APPLICATION_WEBSITE "bow-simulator.org")
set(APPLICATION_MAINTAINER "Stefan Pfeifer")
......
[Desktop Entry]
Type=Application
Name=@APPLICATION_TITLE@
Name=@APPLICATION_DISPLAY_NAME@
Exec=@APPLICATION_NAME@
Icon=bow-simulator
Comment=@APPLICATION_DESCRIPTION_SHORT@
......
#define APP_NAME "${APPLICATION_TITLE}"
#define APP_NAME "${APPLICATION_DISPLAY_NAME}"
#define EXE_NAME "${APPLICATION_NAME}.exe"
[Setup]
......
......@@ -2,11 +2,11 @@
namespace Config
{
static const char* NAME = "@APPLICATION_NAME@";
static const char* TITLE = "@APPLICATION_TITLE@";
static const char* VERSION = "@APPLICATION_VERSION@";
static const char* WEBSITE = "@APPLICATION_WEBSITE@";
static const char* COPYRIGHT = "@APPLICATION_COPYRIGHT@";
static const char* LICENSE = "@APPLICATION_LICENSE@";
static const char* DESCRIPTION = "@APPLICATION_DESCRIPTION_SHORT@";
static const char* APPLICATION_NAME = "@APPLICATION_NAME@";
static const char* APPLICATION_DISPLAY_NAME = "@APPLICATION_DISPLAY_NAME@";
static const char* APPLICATION_VERSION = "@APPLICATION_VERSION@";
static const char* APPLICATION_WEBSITE = "@APPLICATION_WEBSITE@";
static const char* APPLICATION_COPYRIGHT = "@APPLICATION_COPYRIGHT@";
static const char* APPLICATION_LICENSE = "@APPLICATION_LICENSE@";
static const char* APPLICATION_DESCRIPTION = "@APPLICATION_DESCRIPTION_SHORT@";
}
......@@ -7,15 +7,15 @@
#include <windows.h>
#endif
QSettings Application::settings{Config::WEBSITE, Config::NAME};
QSettings Application::settings(Config::APPLICATION_WEBSITE, Config::APPLICATION_NAME);
int Application::run(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setApplicationName(Config::NAME);
app.setApplicationDisplayName(Config::TITLE);
app.setApplicationVersion(Config::VERSION);
app.setOrganizationDomain(Config::WEBSITE);
app.setApplicationName(Config::APPLICATION_NAME);
app.setApplicationDisplayName(Config::APPLICATION_DISPLAY_NAME);
app.setApplicationVersion(Config::APPLICATION_VERSION);
app.setOrganizationDomain(Config::APPLICATION_WEBSITE);
// Set default locale to C (English, US)
QLocale::setDefault(QLocale::C);
......
......@@ -162,7 +162,7 @@ void MainWindow::newFile()
// Create new file and set version correctly
data = InputData();
data.meta.version = Config::VERSION;
data.meta.version = Config::APPLICATION_VERSION;
editor->setData(data);
setCurrentFile(QString());
......@@ -275,11 +275,11 @@ void MainWindow::runSimulation(bool dynamic)
void MainWindow::about()
{
QMessageBox::about(this, "About",
QString("<h2>") + Config::TITLE + " v" + Config::VERSION + "</h2>"
+ Config::DESCRIPTION + "<br>"
"<a href=\"" + Config::WEBSITE + "\">" + Config::WEBSITE + "</a><br><br>"
"<small>" + Config::COPYRIGHT + "<br>"
"Distributed under the " + Config::LICENSE + "</small>"
QString("<h2>") + Config::APPLICATION_DISPLAY_NAME + " v" + Config::APPLICATION_VERSION + "</h2>"
+ Config::APPLICATION_DESCRIPTION + "<br>"
"<a href=\"" + Config::APPLICATION_WEBSITE + "\">" + Config::APPLICATION_WEBSITE + "</a><br><br>"
"<small>" + Config::APPLICATION_COPYRIGHT + "<br>"
"Distributed under the " + Config::APPLICATION_LICENSE + "</small>"
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment