mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Create Mac Pack: Copy the creator script to the build directory.
This commit is contained in:
parent
79b547b83b
commit
eb898646bc
4 changed files with 16 additions and 9 deletions
|
@ -144,6 +144,7 @@ add_subdirectory(csync)
|
|||
add_subdirectory(src)
|
||||
add_subdirectory(shell_integration)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(admin)
|
||||
|
||||
if(UNIT_TESTING)
|
||||
include(CTest)
|
||||
|
|
2
admin/CMakeLists.txt
Normal file
2
admin/CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# traverse into osx subdirectory to install and patch the create-pack script
|
||||
add_subdirectory(osx)
|
2
admin/osx/CMakeLists.txt
Normal file
2
admin/osx/CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
configure_file(create_mac_pkg.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/create_mac.sh)
|
|
@ -10,19 +10,23 @@ if [ -z "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
prjfile="admin/osx/macosx.pkgproj"
|
||||
if [ ! -f $prjfile ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
pack="admin/ownCloud Installer.pkg"
|
||||
rm -f $pack
|
||||
cp $vanilla_prjfile $prjfile
|
||||
|
||||
install_path=$1
|
||||
|
||||
# The name of the installer package
|
||||
installer=ownCloud\ Installer.pkg
|
||||
installer=ownCloud-@MIRALL_VERSION_STRING@
|
||||
installer_file=$installer.pkg
|
||||
|
||||
# set the installer name to the copied prj config file
|
||||
/usr/local/bin/packagesutil --file $prjfile set project name $installer
|
||||
|
||||
# The command line tool of the "Packages" tool, see link above.
|
||||
pkgbuild=/usr/local/bin/packagesbuild
|
||||
|
@ -31,9 +35,9 @@ $pkgbuild -F $install_path $prjfile
|
|||
rc=$?
|
||||
|
||||
if [ $rc == 0 ]; then
|
||||
echo "Successfully created $pack"
|
||||
echo "Successfully created $installer_file"
|
||||
else
|
||||
echo "Failed to create $pack"
|
||||
echo "Failed to create $installer_file"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
|
@ -41,5 +45,3 @@ fi
|
|||
# See http://s.sudre.free.fr/Software/documentation/Packages/en/Project_Configuration.html#5
|
||||
# certname=gdbsign
|
||||
# productsign --cert $certname admin/$installer ./$installer
|
||||
|
||||
|
Loading…
Reference in a new issue