changeset 403:d6b52a761266

[fix] Bug ID 1910773 : On Unix systems the globally available files, like indenters, translations etc are not longer installed to /etc/universalindentgui but to /usr/share/universalindentgui. http://universalindent.sf.net/issue/1910773 git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@632 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Wed, 12 Mar 2008 21:30:05 +0000
parents 70ee0a40125f
children 315f520dbd7b
files UniversalIndentGUI.pro src/mainwindow.cpp
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/UniversalIndentGUI.pro	Wed Mar 12 21:13:28 2008 +0000
+++ b/UniversalIndentGUI.pro	Wed Mar 12 21:30:05 2008 +0000
@@ -55,18 +55,18 @@
 unix:documentation.files = doc/universalindentgui.1.gz
 
 # Install indenter ini files, examples and some indenters
-unix:indenters.path = /etc/universalindentgui/indenters
+unix:indenters.path = /usr/share/universalindentgui/indenters
 unix:indenters.files = indenters/uigui_*.ini
 unix:indenters.files += indenters/examples.*
 unix:indenters.files += indenters/JsDecoder.js
 unix:indenters.files += indenters/shellindent.awk
 
 # Install translation files
-unix:translation.path = /etc/universalindentgui/translations
+unix:translation.path = /usr/share/universalindentgui/translations
 unix:translation.files = translations/*.qm
 
 # Install highlighter default config
-unix:highlighterconfig.path = /etc/universalindentgui/config
+unix:highlighterconfig.path = /usr/share/universalindentgui/config
 unix:highlighterconfig.files = config/UiGuiSyntaxHighlightConfig.ini
 
 # Install binary
--- a/src/mainwindow.cpp	Wed Mar 12 21:13:28 2008 +0000
+++ b/src/mainwindow.cpp	Wed Mar 12 21:30:05 2008 +0000
@@ -50,18 +50,18 @@
     if ( indexOfDotApp != -1 ) {
 		// Cut off after the dot of ".app".
 	    applicationBinaryPath = applicationBinaryPath.left( indexOfDotApp-1 );
-		// Cut off after the first slash that was in front of ".app" (noramlly this is the word "UniversalIndentGUI")
+		// Cut off after the first slash that was in front of ".app" (normally this is the word "UniversalIndentGUI")
 	    applicationBinaryPath = applicationBinaryPath.left( applicationBinaryPath.lastIndexOf("/") );
 	}
 #endif
 
-   // If the "indenters" directory is a subdir of the applications binary path, use this one (portable mode)
-    indenterDirctoryStr = applicationBinaryPath + "/indenters";
-    if ( QFile::exists( indenterDirctoryStr ) ) {
+   // If the "config" directory is a subdir of the applications binary path, use this one (portable mode)
+    settingsDirctoryStr = applicationBinaryPath + "/config";
+    if ( QFile::exists( settingsDirctoryStr ) ) {
         portableMode = true;
         QDir dirCreator;
         globalFilesDirectoryStr = applicationBinaryPath;
-        settingsDirctoryStr = applicationBinaryPath + "/config";
+        indenterDirctoryStr = applicationBinaryPath + "/indenters";
         dirCreator.mkpath( settingsDirctoryStr );
         tempDirctoryStr = applicationBinaryPath + "/temp";
         //TODO: If the portable drive has write protection, use local temp path and clean it up on exit.
@@ -78,7 +78,7 @@
         globalFilesDirectoryStr = applicationBinaryPath;
 #else
         settingsDirctoryStr = QDir::homePath() + "/.config/universalindentgui";
-        globalFilesDirectoryStr = "/etc/universalindentgui";
+        globalFilesDirectoryStr = "/usr/share/universalindentgui";
 #endif
         dirCreator.mkpath( settingsDirctoryStr );
         // If a highlighter config file does not exist in the users home config dir