Просмотр исходного кода

More adjustments around the application name

- libname is now derived from binary name (which is lowercase)
- remove superflouos reimplementation of appName() in owncloud theme
- APPLICATION_SHORTNAME is now optional (and if not set, equals
  APPLICATION_NAME
Daniel Molkentin 12 лет назад
Родитель
Сommit
9f89a2fe76
6 измененных файлов с 11 добавлено и 17 удалено
  1. 4 0
      CMakeLists.txt
  2. 5 5
      OWNCLOUD.cmake
  3. 1 1
      src/CMakeLists.txt
  4. 0 9
      src/mirall/owncloudtheme.cpp
  5. 0 1
      src/mirall/owncloudtheme.h
  6. 1 1
      test/owncloud_add_test.cmake

+ 4 - 0
CMakeLists.txt

@@ -13,6 +13,10 @@ else ()
      include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
 endif()
 
+if (NOT DEFINED APPLICATION_SHORTNAME)
+     set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
+endif()
+
 include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
 configure_file( ${CMAKE_SOURCE_DIR}/src/mirall/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/version.h" )
 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")

+ 5 - 5
OWNCLOUD.cmake

@@ -1,9 +1,9 @@
-set( APPLICATION_SHORTNAME  "owncloud" )
 set( APPLICATION_NAME       "ownCloud" )
-set( APPLICATION_EXECUTABLE "owncloud"        )
-set( APPLICATION_DOMAIN     "owncloud.com"    )
-set( APPLICATION_VENDOR     "ownCloud, Inc"   )
-set( THEME_CLASS            "ownCloudTheme"   )
+#set( APPLICATION_SHORTNAME  ${APPLICATION_NAME} )
+set( APPLICATION_EXECUTABLE "owncloud" )
+set( APPLICATION_DOMAIN     "owncloud.com" )
+set( APPLICATION_VENDOR     "ownCloud, Inc" )
+set( THEME_CLASS            "ownCloudTheme" )
 set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
 set( WIN_SETUP_BITMAP_PATH  "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
 # set( THEME_INCLUDE          "${OEM_THEME_DIR}/mytheme.h" )

+ 1 - 1
src/CMakeLists.txt

@@ -11,7 +11,7 @@ else()
     set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
 endif()
 
-set(synclib_NAME ${APPLICATION_SHORTNAME}sync)
+set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
 
 set(mirall_UI
 mirall/folderwizardsourcepage.ui

+ 0 - 9
src/mirall/owncloudtheme.cpp

@@ -33,15 +33,6 @@ ownCloudTheme::ownCloudTheme()
     // qDebug() << " ** running ownCloud theme!";
 }
 
-QString ownCloudTheme::appName() const
-{
-    /* If this is changed, existing configs are not found any more
-     * because the value is used by QDesktopServices to find the config
-     * file. Be aware.
-     */
-    return QLatin1String("ownCloud");
-}
-
 QString ownCloudTheme::configFileName() const
 {
     return QLatin1String("owncloud.cfg");

+ 0 - 1
src/mirall/owncloudtheme.h

@@ -25,7 +25,6 @@ class ownCloudTheme : public Theme
 public:
     ownCloudTheme();
 
-    virtual QString appName() const;
     QString configFileName() const;
     QString about() const;
     QPixmap splashScreen() const;

+ 1 - 1
test/owncloud_add_test.cmake

@@ -10,7 +10,7 @@ macro(owncloud_add_test test_class)
     add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${${OWNCLOUD_TEST_CLASS}_MOCS})
 
     target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
-        ${APPLICATION_SHORTNAME}sync
+        ${APPLICATION_EXECUTABLE}sync
         ${QT_QTTEST_LIBRARY}
         ${QT_QTCORE_LIBRARY}
     )