Pārlūkot izejas kodu

ENH: Prototype for OSX packaging.

Brad King 23 gadi atpakaļ
vecāks
revīzija
d5a661b9b9
2 mainītis faili ar 27 papildinājumiem un 0 dzēšanām
  1. 23 0
      Utilities/Release/cmake_release.sh
  2. 4 0
      Utilities/Release/config_Darwin

+ 23 - 0
Utilities/Release/cmake_release.sh

@@ -491,6 +491,29 @@ cygwin_package()
     ) >Logs/cygwin_package.log 2>&1 || error_log Logs/cygwin_package.log
 }
 
+#-----------------------------------------------------------------------------
+osx_install()
+{
+    [ -z "${DONE_osx_install}" ] || return 0 ; DONE_osx_install="yes"
+    config || return 1
+    [ -f "cmake-${VERSION}-${PLATFORM}/Source/ccmake" ] || build || return 1
+    echo "Running make install for OSX package ..." &&
+    (
+        rm -rf OSX &&
+        mkdir -p OSX/Package_Root/Applications &&
+        mkdir -p OSX/Resources/PreFlight &&
+        mkdir -p OSX/Resources/PostFlight &&
+        (
+            cd "cmake-${VERSION}-${PLATFORM}" &&
+            make install DESTDIR="${RELEASE_ROOT}/OSX/Package_Root"
+        ) &&
+        cp cmake-${VERSION}/Copyright.txt OSX/Resources/License.txt &&
+        cp -r cmake-${VERSION}-${PLATFORM}/Source/CMake.app OSX/Package_Root/Applications &&
+        echo "APPL????" > OSX/Package_Root/Applications/CMake.app/Contents/PkgInfo &&
+        cp "${WX_RESOURCES}" OSX/Package_Root/Applications/CMake.app/Contents/Resources/wxCMakeSetup.rsrc
+    ) >Logs/osx_install.log 2>&1 || error_log Logs/osx_install.log
+}
+
 if [ -z "$TASK" ]; then
     [ -z "$REMOTE" ] && TASK="$@"
 fi

+ 4 - 0
Utilities/Release/config_Darwin

@@ -1,6 +1,8 @@
 PLATFORM="darwin"
 CC="cc"
 CXX="c++"
+WX_PREFIX=/Users/andy/vtk/wx
+WX_RESOURCES=${WX_PREFIX}/lib/libwx_mac-2.3.rsrc
 
 # Write entries into the cache file before building cmake.
 write_cache()
@@ -8,5 +10,7 @@ write_cache()
 cat > CMakeCache.txt <<EOF
 BUILD_TESTING:BOOL=OFF
 CURSES_LIBRARY:FILEPATH=/usr/local/lib/libncurses.a
+CMAKE_BUILD_WX_DIALOG:BOOL=ON
+CMAKE_WX_CONFIG:FILEPATH=${WX_PREFIX}/bin/wx-config
 EOF
 }