Browse Source

OS X: Fix installer creation

The script should know independently of the machine
Markus Goetz 11 years ago
parent
commit
5490063b7e
4 changed files with 20 additions and 14 deletions
  1. 5 0
      CMakeLists.txt
  2. 1 0
      admin/osx/CMakeLists.txt
  3. 8 8
      admin/osx/create_mac_pkg.sh.cmake
  4. 6 6
      admin/osx/macosx.pkgproj

+ 5 - 0
CMakeLists.txt

@@ -128,6 +128,11 @@ configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
 configure_file(test/test_journal.db "${CMAKE_BINARY_DIR}/test/test_journal.db" COPYONLY)
 
+# Copy that logo, the installer uses it later
+if(BUILD_OWNCLOUD_OSX_BUNDLE)
+    install(FILES resources/owncloud_logo_blue.png DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
+endif()
+
 include(OwnCloudCPack.cmake)
 
 add_definitions(-DUNICODE)

+ 1 - 0
admin/osx/CMakeLists.txt

@@ -1,2 +1,3 @@
 
 configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
+configure_file(macosx.pkgproj ${CMAKE_CURRENT_BINARY_DIR}/macosx.pkgproj)

+ 8 - 8
admin/osx/create_mac_pkg.sh.cmake

@@ -6,20 +6,18 @@
 
 # the path of installation must be given as parameter
 if [ -z "$1" ]; then
-  echo "ERROR: Provide the CMAKE_INSTALL_DIR to this script."
+  echo "ERROR: Provide the path to CMAKE_INSTALL_DIR to this script as first parameter."
   exit 1
 fi
 
-prjfile=macosx.pkgproj
-vanilla_prjfile="@CMAKE_SOURCE_DIR@/admin/osx/macosx.pkgproj"
-if [ ! -f $vanilla_prjfile ]; then
-  echo "ERROR: macosx.pkgproj not in admin dir, start from CMAKE_SOURCE_DIR!"
-  exit 2
+if [ -z "$2" ]; then
+  echo "ERROR: Provide the path to build directory as second parameter."
+  exit 1
 fi
 
-cp $vanilla_prjfile $prjfile
-
 install_path=$1
+build_path=$2
+prjfile=$build_path/admin/osx/macosx.pkgproj
 
 # The name of the installer package
 installer=ownCloud-@MIRALL_VERSION_STRING@
@@ -45,3 +43,5 @@ fi
 # See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5
 # certname=gdbsign
 # productsign --cert $certname admin/$installer ./$installer
+
+# FIXME: OEMs?

+ 6 - 6
admin/osx/macosx.pkgproj

@@ -1054,10 +1054,10 @@
 				<integer>6</integer>
 				<key>BACKGROUND_PATH</key>
 				<dict>
-					<key>PATH</key>
-					<string>/Users/mackie/owncloud.com/mirall/resources/owncloud_logo_blue.png</string>
-					<key>PATH_TYPE</key>
-					<integer>0</integer>
+				<key>PATH</key>
+				<string>./owncloud.app/Contents/Resources/owncloud_logo_blue.png</string>
+				<key>PATH_TYPE</key>
+				<integer>3</integer>
 				</dict>
 				<key>CUSTOM</key>
 				<integer>1</integer>
@@ -1240,9 +1240,9 @@
 			<key>BUILD_PATH</key>
 			<dict>
 				<key>PATH</key>
-				<string>/Users/mackie/owncloud.com/mirall/admin</string>
+				<string>../install/.</string>
 				<key>PATH_TYPE</key>
-				<integer>0</integer>
+				<integer>3</integer>
 			</dict>
 			<key>EXCLUDED_FILES</key>
 			<array>