Sfoglia il codice sorgente

Mac installer: Make the installer background brandable for MacOSX.

Klaas Freitag 11 anni fa
parent
commit
c5daf7d1b6
4 ha cambiato i file con 18 aggiunte e 4 eliminazioni
  1. 0 1
      CMakeLists.txt
  2. 3 0
      OWNCLOUD.cmake
  3. 13 1
      admin/osx/CMakeLists.txt
  4. 2 2
      admin/osx/macosx.pkgproj

+ 0 - 1
CMakeLists.txt

@@ -21,7 +21,6 @@ else()
     set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
 endif()
 
-
 if (NOT DEFINED APPLICATION_SHORTNAME)
      set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
 endif()

+ 3 - 0
OWNCLOUD.cmake

@@ -8,6 +8,9 @@ set( APPLICATION_UPDATE_URL "https://updates.owncloud.com/client/" CACHE string
 set( THEME_CLASS            "ownCloudTheme" )
 set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
 set( WIN_SETUP_BITMAP_PATH  "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
+
+set( MAC_INSTALLER_BACKGROUND_FILE "${CMAKE_SOURCE_DIR}/admin/osx/installer-background.png" CACHE STRING "The MacOSX installer background image")
+
 # set( THEME_INCLUDE          "${OEM_THEME_DIR}/mytheme.h" )
 # set( APPLICATION_LICENSE    "${OEM_THEME_DIR}/license.txt )
 

+ 13 - 1
admin/osx/CMakeLists.txt

@@ -1,3 +1,15 @@
 
+# Check if varialbe MAC_INSTALLER_BACKGROUND_FILE is defined. That might come
+# from the OEM.cmake for branded clients or from OWNCLOUD.cmake for the non
+# branded client.
+# Make sure that the MAC_INSTALLER_BACKGROUND_FILE contains the full path, ie.
+# includes CMAKE_SOURCE_DIR or so.
+
+if (DEFINED MAC_INSTALLER_BACKGROUND_FILE )
+  set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "1")
+else()
+  set(MAC_INSTALLER_DO_CUSTOM_BACKGROUND "0")
+endif()
+
 configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
-configure_file(macosx.pkgproj ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)
+configure_file(macosx.pkgproj ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)

+ 2 - 2
admin/osx/macosx.pkgproj

@@ -1055,12 +1055,12 @@
 				<key>BACKGROUND_PATH</key>
 				<dict>
 					<key>PATH</key>
-					<string>@CMAKE_SOURCE_DIR@/admin/osx/installer-background.png</string>
+					<string>@MAC_INSTALLER_BACKGROUND_FILE@</string>
 					<key>PATH_TYPE</key>
 					<integer>0</integer>
 				</dict>
 				<key>CUSTOM</key>
-				<integer>1</integer>
+				<integer>@MAC_INSTALLER_DO_CUSTOM_BACKGROUND@</integer>
 				<key>SCALING</key>
 				<integer>0</integer>
 			</dict>