Преглед изворни кода

moved default linux config path to share/OpenRaider too [skip ci]

Thomas Buck пре 10 година
родитељ
комит
c6d13daa97
3 измењених фајлова са 5 додато и 6 уклоњено
  1. 1
    1
      README.md
  2. 1
    1
      src/CMakeLists.txt
  3. 3
    4
      src/main.cpp

+ 1
- 1
README.md Прегледај датотеку

@@ -71,7 +71,7 @@ Do a standard cmake out-of-source build to get a debug configuration and then ru
71 71
 
72 72
 On Mac OS X, running `make install` will produce a (more or less) distributable OpenRaider.app bundle, which will be put into /Applications.
73 73
 
74
-On Linux, running `make install` will install OpenRaider to /usr/local/... (the executable in bin, the config in etc, the data files in share). You can change this path with `make install DESTDIR=”/some/where”`
74
+On Linux, running `make install` will install OpenRaider to /usr/local/... (the executable in bin, the data files in share). You can change this path with `cmake -DCMAKE_INSTALL_PREFIX=”/some/where” ..`
75 75
 
76 76
 Run `make check` to build and run the unit tests.
77 77
 

+ 1
- 1
src/CMakeLists.txt Прегледај датотеку

@@ -294,7 +294,7 @@ elseif (NOT WIN32)
294 294
 
295 295
     # Config file
296 296
     install (FILES "${PROJECT_BINARY_DIR}/Unix.ini"
297
-        DESTINATION etc
297
+        DESTINATION "share/OpenRaider"
298 298
         RENAME "OpenRaider.ini")
299 299
 
300 300
     # Data files

+ 3
- 4
src/main.cpp Прегледај датотеку

@@ -153,10 +153,9 @@ int main(int argc, char* argv[]) {
153 153
         if (Command::executeFile(DEFAULT_CONFIG_FILE) != 0) {
154 154
             if (Command::executeFile(std::string(DEFAULT_CONFIG_PATH) + "/" + DEFAULT_CONFIG_FILE) != 0) {
155 155
                 std::string p = INSTALL_PREFIX;
156
-                if (p == "/")
157
-                    p += "etc/";
158
-                else
159
-                    p += "/etc/";
156
+                if (p != "/")
157
+                    p += "/";
158
+                p += "share/OpenRaider/";
160 159
                 Command::executeFile(p + DEFAULT_CONFIG_FILE);
161 160
             }
162 161
         }

Loading…
Откажи
Сачувај