From d9dbab68772e7d2f7db5c64c0713fddc789e215c Mon Sep 17 00:00:00 2001 From: Pete Fotheringham Date: Fri, 3 Feb 2012 10:44:55 +0000 Subject: [PATCH] Everything done! --- mac-client-installer/.jhbuildrc-custom | 21 ++-- mac-client-installer/README.MacOsBuildInstructions | 32 ++---- mac-client-installer/build-installer.sh | 110 ++++++++++++++++----- mac-client-installer/moonshot-mac.modules | 99 +++++++++---------- 4 files changed, 149 insertions(+), 113 deletions(-) diff --git a/mac-client-installer/.jhbuildrc-custom b/mac-client-installer/.jhbuildrc-custom index a34b559..5d1060d 100644 --- a/mac-client-installer/.jhbuildrc-custom +++ b/mac-client-installer/.jhbuildrc-custom @@ -1,23 +1,14 @@ # -*- mode: python -*- -_jhb = os.environ.get("JHB") -if _jhb is None: - # The default setup... - # checkoutroot = os.path.expanduser("~/Source/gtk") - # prefix = "/opt/gtk" - pass -elif _jhb == "FW": - # The framework build... - # checkoutroot = os.path.expanduser("~/Source/gtk-fw") - # prefix = "/opt/gtk-fw" - pass +#module_autogenargs['gtk+'] = autogenargs + "--enable-introspection=no" + +append_autogenargs ("dbus", "--enable-launchd --sysconfdir=/Applications/moonshot-ui.app/Contents/Resources/etc") +# uncomment this and comment the previous line for working with Dbus without launched +# append_autogenargs ("dbus", "--with-x") + -# not sure yet if this is needed -append_autogenargs ("dbus", "--with-x") setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"]) os.environ['MAKEFLAGS'] = '-j 4' -module_autogenargs['moonshot'] = '--enable-acceptor=no' -module_autogenargs['gtk+'] = '--enable-introspection=no' moduleset=os.environ['HOME'] + '/moonshot/mac-client-installer/moonshot-mac.modules' diff --git a/mac-client-installer/README.MacOsBuildInstructions b/mac-client-installer/README.MacOsBuildInstructions index c191182..6bf18fb 100644 --- a/mac-client-installer/README.MacOsBuildInstructions +++ b/mac-client-installer/README.MacOsBuildInstructions @@ -9,29 +9,10 @@ The software to be installed, the installer package and the disk image are produ ++++++++++++++ 1: Install jhbuild, which Creates working folder ~/gtk -2: Install gtk-mac-bundler as described at https://live.gnome.org/GTK%2B/OSX/Bundlingr -Either$ cd ~ -$ wget http://ftp.gnome.org/pub/gnome/sources/gtk-mac-bundler/0.6/gtk-mac-bundler-0.6.1.tar.bz2 -$ tar jxvf gtk-mac-bundler-0.6.1.tar.gz -$ cd gtk-mac-bundler-0.6.1 -$ make install - -3: bootstrap jhbuild -copy file moonshot/mac-client-installer/.jhbuildrc-custom to $HOME -then -$ jhbuild bootstrap --ignore-system - -4 MIT Kerberos 1.9.2 Kerberos -Install in ~/gtk/inst to build against - in the Krb5 src directory -$ export CFLAGS="-arch i386" -$ ./configure --prefix=$HOME/gtk/inst/ -$ make -$ make install - -Install in moonshot/mac-client-installer/ to include in the Installer package -$ ./configure -$ make -$ make install DESTDIR=$HOME/moonshot/mac-client-installer/krb +2: MIT Kerberos 1.9.2 Kerberos +Install in ~/gtk/inst to build against - in the Krb5 src directory +jhbuild run build-krb5.sh +Inside jhbuild shell ## Building the Software, Installer Package and Disk Image ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -42,6 +23,9 @@ $ ./build-installer.sh +++++++++++++++ The first time the build-installer.sh script is run the following errors may be generated: +*** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' *** +choose [2] Ignore error and continue + *** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37] choose [4] Start shell $ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch @@ -50,6 +34,8 @@ $ exit choose [2] Ignore error and continue make: *** No targets specified and no makefile found. Stop. + + *** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41] choose [4] Start shell $ ./configure --prefix=/usr/local --with-gss_impl=mit diff --git a/mac-client-installer/build-installer.sh b/mac-client-installer/build-installer.sh index 3622402..85a8736 100755 --- a/mac-client-installer/build-installer.sh +++ b/mac-client-installer/build-installer.sh @@ -2,61 +2,125 @@ # build-installer.sh # -# -# Created by pete on 02/01/2012. -# Copyright (c) 2011, JANET(UK) +# Copyright (c) 2012, JANET(UK) +cd ~/moonshot/mac-client-installer +pwd +echo " * Put the jhbuild config file in the correct place" cp ./.jhbuildrc-custom ~/ +echo " * Remove old files and directories" +rm *.dmg +rm *.pkg +rm -Rf moonshot +rm -Rf moonshot-ui +rm -Rf sasl +echo "Done" -# build moonshot in jhbuild shell -cd ../moonshot && jhbuild run ./configure --enable-acceptor=no --with-krb5=$HOME/gtk/inst && make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot +echo " * Bootstrap jhbuild" +jhbuild bootstrap --ignore-system +pwd +echo "Done preparing" -# build cyrus-sasl using jhbuild +echo " * build moonshot in jhbuild shell" +cd ../moonshot +pwd +jhbuild run ./autogen.sh +jhbuild run ./configure --enable-acceptor=no --with-krb5=$HOME//moonshot/mac-client-installer/krb/usr/local +jhbuild run make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot +cd ~/moonshot/mac-client-installer +pwd +echo "Done" + +echo " * The first time this script is run the following errors may be generated: " +echo " * ** Error during phase build of cyrus-sasl: ########## Error running make *** [39/41]" +echo " * choose [4] Start shell" +echo " $ ./configure --prefix=/usr/local --with-gss_impl=mit" +echo " $ exit " +echo " * choose [1] Rerun phase build" +echo +echo " * build cyrus-sasl using jhbuild" jhbuild build cyrus-sasl +echo "Done" + +echo " * Fix up the cyrus-sasl links" +mkdir -p sasl/usr/lib +cd sasl/usr/lib && ln -fs ../local/lib/sasl2 +cd ~/moonshot/mac-client-installer +pwd +echo "Done" + +# +# ToDo: Remove these lines when the Bug is fixed and the files referenced in the module +# sets can be downloaded succesfully +echo " * Prepare to build moonshot-ui using jhbuild +echo " * We need to get the sources for the tango modules as the versions on the freedesktop.org download page are broken +echo " * see https://bugs.freedesktop.org/show_bug.cgi?id=45526 +curl -L http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme/tango-icon-theme-0.8.90.tar.gz/0795895d2f20eddcbd2bffe94ed431a6/tango-icon-theme-0.8.90.tar.gz -o ~/gtk/source/pkgs/tango-icon-theme-0.8.90.tar.gz +curl -L http://pkgs.fedoraproject.org/repo/pkgs/icon-naming-utils/icon-naming-utils-0.8.90.tar.gz/2c5c7a418e5eb3268f65e21993277fba/icon-naming-utils-0.8.90.tar.gz -o ~/gtk/source/pkgs/icon-naming-utils-0.8.90.tar.gz +curl -L http://pkgs.fedoraproject.org/repo/pkgs/tango-icon-theme-extras/tango-icon-theme-extras-0.1.0.tar.gz/caaceaec7b61f1cbda0db9842f9db281/tango-icon-theme-extras-0.1.0.tar.gz -o ~/gtk/source/pkgs/tango-icon-theme-extras-0.1.0.tar.gz -# build moonshot-ui using jhbuild +echo " * The first time this script is run the following errors may be generated: " +echo " * *** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' *** " +echo " * choose [2] Ignore error and continue" +echo " *" +echo " * *** Error during phase build of perl-xml-parser: ########## Error running make LD_RUN_PATH= *** [6/37]" +echo " * choose [4] Start shell" +echo " * $ git apply ~/moonshot/mac-client-installer/0001-Remove-arch-ppc-flags.patch " +echo " * $ make" +echo " * $ exit " +echo " * choose [2] Ignore error and continue" +echo " *" +echo " * *** Error during phase configure of gtk-mac-bundler: ########## Error running ./configure --prefix /Users/pete/gtk/inst --libdir '/Users/pete/gtk/inst/lib' *** [37/38]" +echo " * choose [2] Ignore error and continue" +echo " *" +echo " * Now we can build moonshot-ui" jhbuild build moonshot-ui +echo "Done" +echo -# make moonshot-ui app bundle in jhbuild shell +echo " * Make moonshot-ui app bundle in jhbuild shell" cd ~/gtk/source/moonshot-ui/ && jhbuild run make app-bundle -pwd +echo "Done" +echo " * Make the libmoonshot files in the correct directory for the installer" +jhbuild run ./configure && make && make install DESTDIR=$HOME/moonshot/mac-client-installer/moonshot-ui cd ~/moonshot/mac-client-installer pwd -# fix up the cyrus-sasl links -mkdir -p sasl/usr/lib -cd sasl/usr/lib && ln -fs ../local/lib/sasl2 -cd ~/moonshot/mac-client-installer -pwd +echo "Done" -# Ensure the permissions are correct for the files to be installed +echo " * Ensure the permissions are correct for the files to be installed" sudo chown -R root:admin sasl krb moonshot moonshot-ui sudo chmod -R g+w sasl krb moonshot moonshot-ui +echo "Done" -# create the installer package +echo " * Put the DBus Property list in the moonshot-ui tree for the installer with the correct permissions" +cp org.freedesktop.dbus-session.plist moonshot-ui/ +sudo chown -R root:admin moonshot-ui/org.freedesktop.dbus-session.plist + +echo " * Create the installer package" /Developer/usr/bin/packagemaker --doc Moonshot\ Client\ Software.pmdoc \ --version 0.1 --filter "/.DS_Store" --root-volume-only \ --domain system --verbose --no-relocate -l "/" --target 10.5 \ --id ja.net.moonshotClientSoftware --out Moonshot\ Client\ Software.pkg -# create and mount a disk image +echo " * Create and mount a disk image" hdiutil create -size 20m -fs HFS+ -volname "Moonshot Client Software" temp.dmg hdiutil attach temp.dmg -# Copy the package and the READMEs +echo " * Copy the package and the READMEs" cp -R Moonshot\ Client\ Software.pkg /Volumes/Moonshot\ Client\ Software/ # TODO we need some readmes for the Mac instalatiom #cp -R resources/* /Volumes/Moonshot\ Client\ Software/ -# Get rid of hidden files and folders that we don't need +echo " * Get rid of hidden files and folders that we don't need" sudo rm -rf /Volumes/Moonshot\ Client\ Software/.fseventsd/ sudo rm -rf /Volumes/Moonshot\ Client\ Software/.Trashes/ sudo find /Volumes/Moonshot\ Client\ Software -name '.*' -type f -delete -# Unmount the image +echo " * Unmount the image" hdiutil detach /Volumes/Moonshot\ Client\ Software -# Convert the disk image to read-only +echo " * Convert the disk image to read-only" hdiutil convert temp.dmg -format UDZO -o moonshotclientsoftware.dmg -rm temp.dmg - +#rm temp.dmg +echo "All Done" diff --git a/mac-client-installer/moonshot-mac.modules b/mac-client-installer/moonshot-mac.modules index d8455f3..84b8653 100644 --- a/mac-client-installer/moonshot-mac.modules +++ b/mac-client-installer/moonshot-mac.modules @@ -3,62 +3,57 @@ - + - - + + + - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + -- 2.1.4