Commit c6e55ef6 authored by Jan Möbius's avatar Jan Möbius

Added License dir to global Options

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6666 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f1014022
......@@ -245,6 +245,14 @@ void Core::setupOptions() {
tempDir.cd("Fonts");
OpenFlipper::Options::fontsDir(tempDir.absolutePath());
// Set the Path to the License files
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
tempDir.cd(OPENFLIPPER_DATADIR);
#endif
tempDir.cd("Licenses");
OpenFlipper::Options::licenseDir(tempDir.absolutePath());
// Set the Path to the Help
tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
......
......@@ -94,6 +94,7 @@ endif ()
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Shaders" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Shaders")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Textures")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Scripts")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Licenses")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Icons")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Fonts")
acg_copy_after_build (OpenFlipper "${CMAKE_CURRENT_SOURCE_DIR}/../Docs" "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Docs")
......@@ -109,6 +110,7 @@ if (NOT APPLE)
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Textures" "${ACG_PROJECT_DATADIR}/Textures")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Scripts" "${ACG_PROJECT_DATADIR}/Scripts")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Icons" "${ACG_PROJECT_DATADIR}/Icons")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Licenses" "${ACG_PROJECT_DATADIR}/Licenses")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Fonts" "${ACG_PROJECT_DATADIR}/Fonts")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Docs" "${ACG_PROJECT_DATADIR}/Docs")
acg_install_dir ("${CMAKE_CURRENT_SOURCE_DIR}/../Help" "${ACG_PROJECT_DATADIR}/Help")
......
......@@ -64,6 +64,9 @@ static QDir shaderDir_;
/// Stores the Path to the Textures
static QDir textureDir_;
/// Stores the Path to the Licenses
static QDir licenseDir_;
/// Stores the Path to the Scripts
static QDir scriptDir_;
......@@ -284,6 +287,7 @@ QDir configDir() { return configDir_; }
QDir pluginDir() { return pluginDir_; }
QDir shaderDir() { return shaderDir_; }
QDir textureDir() { return textureDir_; }
QDir licenseDir() { return licenseDir_; }
QDir scriptDir() { return scriptDir_; }
QDir iconDir() { return iconDir_; }
QDir fontsDir() { return fontsDir_; }
......@@ -298,6 +302,7 @@ QString configDirStr() { return configDir_.absolutePath(); }
QString pluginDirStr() { return pluginDir_.absolutePath(); }
QString shaderDirStr() { return shaderDir_.absolutePath(); }
QString textureDirStr() { return textureDir_.absolutePath(); }
QString licenseDirStr() { return licenseDir_.absolutePath(); }
QString scriptDirStr() { return scriptDir_.absolutePath(); }
QString iconDirStr() { return iconDir_.absolutePath(); }
QString fontsDirStr() { return fontsDir_.absolutePath(); }
......@@ -313,6 +318,7 @@ void applicationDir(QDir _dir) { applicationDir_ = _dir; }
void pluginDir(QDir _dir) { pluginDir_ = _dir; }
void shaderDir(QDir _dir) { shaderDir_ = _dir; }
void textureDir(QDir _dir) { textureDir_ = _dir; }
void licenseDir(QDir _dir) { licenseDir_ = _dir; }
void scriptDir(QDir _dir) { scriptDir_ = _dir; }
void iconDir(QDir _dir) { iconDir_ = _dir; }
void fontsDir(QDir _dir) { fontsDir_ = _dir;}
......@@ -361,6 +367,15 @@ bool textureDir(QString _dir) {
return false;
}
bool licenseDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
licenseDir_ = tmp;
return true;
}
return false;
}
bool scriptDir(QString _dir) {
QDir tmp(_dir);
if (tmp.exists()) {
......
......@@ -68,6 +68,10 @@ QDir pluginDir();
DLLEXPORT
QDir textureDir();
/// Returns the Path to the License files
DLLEXPORT
QDir licenseDir();
/// Returns the Path to the Scripts
DLLEXPORT
QDir scriptDir();
......@@ -104,6 +108,10 @@ QString shaderDirStr();
DLLEXPORT
QString textureDirStr();
/// Returns the Path to the License files
DLLEXPORT
QString licenseDirStr();
/// Returns the Path to the Scripts
DLLEXPORT
QString scriptDirStr();
......@@ -144,6 +152,10 @@ void shaderDir(QDir _dir);
DLLEXPORT
void textureDir(QDir _dir);
/// Sets the Path to the Licenses
DLLEXPORT
void licenseDir(QDir _dir);
/// Sets the Path to the Scripts
DLLEXPORT
void scriptDir( QDir _dir);
......@@ -180,6 +192,10 @@ bool shaderDir(QString _dir);
DLLEXPORT
bool textureDir(QString _dir);
/// Sets the Path to the License files
DLLEXPORT
bool licenseDir(QString _dir);
/// Sets the Path to the Scripts
DLLEXPORT
bool scriptDir(QString _dir);
......
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