[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9669 - in trunk/gnue-common/packaging: osx win32
From: |
johannes |
Subject: |
[gnue] r9669 - in trunk/gnue-common/packaging: osx win32 |
Date: |
Wed, 6 Jun 2007 02:47:33 -0500 (CDT) |
Author: johannes
Date: 2007-06-06 02:47:32 -0500 (Wed, 06 Jun 2007)
New Revision: 9669
Added:
trunk/gnue-common/packaging/osx/create-build.dist_template
Removed:
trunk/gnue-common/packaging/osx/create-build
Modified:
trunk/gnue-common/packaging/win32/setup.cmd
Log:
Remove the build-environmen on win32 after fetching the installer-exe.
Changed to dist_template on OS X
Deleted: trunk/gnue-common/packaging/osx/create-build
===================================================================
--- trunk/gnue-common/packaging/osx/create-build 2007-06-06 07:35:46 UTC
(rev 9668)
+++ trunk/gnue-common/packaging/osx/create-build 2007-06-06 07:47:32 UTC
(rev 9669)
@@ -1,142 +0,0 @@
-#!/bin/bash
-#
-# Create a disk image containing an installer package of gnue-common
-#
-# Usage: create-build
-
-if [ $UID -ne 0 ];
-then
- echo "Please run this script as admin (or sudo)"
- exit 1
-fi
-
-packagedir="../.."
-if [ ! -d "$packagedir" ];
-then
- echo "Usage: $0"
- exit 1
-fi
-
-
-if [ ! -f "$packagedir/setup.py" ];
-then
- echo "$packagedir does not contain a setup.py file"
- exit 1
-fi
-
-# ---------------------------------------------------------------------------
-# Get the package-name and version from the PKG-INFO file
-# ---------------------------------------------------------------------------
-
-pkgvers=`grep "^Version" ../../PKG-INFO | cut -d" " -f2`
-pkgname=`grep "^Name" ../../PKG-INFO | cut -d" " -f2`
-volname="$pkgname-$pkgvers-py23"
-package="$pkgname-$pkgvers-py23.pkg"
-
-if [ "$package" = "--py23.pkg" ];
-then
- echo "Cannot determine package and version"
- exit 1
-fi
-
-# ---------------------------------------------------------------------------
-# Populate the package environment
-# ---------------------------------------------------------------------------
-
-curdir=`pwd`
-destdir="$curdir/build-env/pkg-root"
-resdir="$curdir/build-env/Resources"
-pkgres="$curdir/build-env/pkg-resources"
-
-test -d "$destdir" || mkdir "$destdir"
-
-cd "$packagedir"
-python setup.py install --prefix=/usr --root=$destdir --no-compile
-
-# ---------------------------------------------------------------------------
-# Make sure to have a gnue.pth file in the Framework
-# ---------------------------------------------------------------------------
-# TODO: Check if this isn't better placed in a postflight script
-cd "$destdir"
-syslnk="System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages"
-mkdir -p $syslnk
-echo "/usr/lib/python2.3/site-packages" > "$syslnk/gnue.pth"
-
-# ---------------------------------------------------------------------------
-# Apply the proper permissions to all files of the package
-# ---------------------------------------------------------------------------
-cd "$destdir"
-echo "Applying permissions ..."
-
-find . -print | while read filename
-do
- real="/$filename"
- if [ -e "$real" ];
- then
- data=`stat -f "%u %g %p" "$real"`
-
- uid=`echo $data | cut -f1 -d" "`
- gid=`echo $data | cut -f2 -d" "`
- mod=`echo $data | cut -f3 -d" "`
-
- chmod $mod "$filename"
- chgrp $gid "$filename"
- chown $uid "$filename"
- else
- chown root "$filename"
- chgrp admin "$filename"
-
- if [ -d "$filename" ];
- then
- chmod 775 "$filename"
- else
- if [ -x "$filename" ]; then
- chmod 775 "$filename"
- else
- chmod 664 "$filename"
- fi
- fi
- fi
-done
-
-
-cd $curdir
-
-# ---------------------------------------------------------------------------
-# Build the package
-# ---------------------------------------------------------------------------
-echo "Building the package ..."
-/Developer/Tools/packagemaker -build -p $package -f $destdir -ds -r $resdir -i
Info.plist -d Description.plist
-
-# ---------------------------------------------------------------------------
-# Get rid of the obsolte directories
-# ---------------------------------------------------------------------------
-
-rm -rf "$destdir"
-
-
-# ---------------------------------------------------------------------------
-# Create a disk image
-# ---------------------------------------------------------------------------
-
-cd $curdir
-echo "Creating disk image ..."
-rm -f temp.dmg "$volname.dmg"
-
-# Prepare the directory tree for the disk image. This contains the previously
-# created installer-package as well as everything from build-env/pkg-resources
-rm -rf "build-dmg"
-mkdir "build-dmg"
-cp -R "$pkgres/" "build-dmg"
-mv $package "build-dmg"
-
-hdiutil create -srcfolder "build-dmg" -volname $volname temp.dmg
-
-# Convert the image
-echo "Converting disk image ..."
-hdiutil convert temp.dmg -format UDZO -o $volname.dmg
-
-# Clean up the working directory
-rm -f temp.dmg
-rm -rf "build-dmg"
-
Copied: trunk/gnue-common/packaging/osx/create-build.dist_template (from rev
9668, trunk/gnue-common/packaging/osx/create-build)
===================================================================
--- trunk/gnue-common/packaging/osx/create-build 2007-06-06 07:35:46 UTC
(rev 9668)
+++ trunk/gnue-common/packaging/osx/create-build.dist_template 2007-06-06
07:47:32 UTC (rev 9669)
@@ -0,0 +1,135 @@
+#!/bin/bash
+#
+# Create a disk image containing an installer package of gnue-common
+#
+# Usage: create-build
+
+if [ $UID -ne 0 ];
+then
+ echo "Please run this script as admin (or sudo)"
+ exit 1
+fi
+
+packagedir="../.."
+if [ ! -d "$packagedir" ];
+then
+ echo "Usage: $0"
+ exit 1
+fi
+
+
+if [ ! -f "$packagedir/setup.py" ];
+then
+ echo "$packagedir does not contain a setup.py file"
+ exit 1
+fi
+
+# ---------------------------------------------------------------------------
+# Get the package-name and version from the PKG-INFO file
+# ---------------------------------------------------------------------------
+
+volname=":PACKAGE:-:VERSION:-py23"
+package="$volname.pkg"
+
+
+# ---------------------------------------------------------------------------
+# Populate the package environment
+# ---------------------------------------------------------------------------
+
+curdir=`pwd`
+destdir="$curdir/build-env/pkg-root"
+resdir="$curdir/build-env/Resources"
+pkgres="$curdir/build-env/pkg-resources"
+
+test -d "$destdir" || mkdir "$destdir"
+
+cd "$packagedir"
+python setup.py install --prefix=/usr --root=$destdir --no-compile
+
+# ---------------------------------------------------------------------------
+# Make sure to have a gnue.pth file in the Framework
+# ---------------------------------------------------------------------------
+# TODO: Check if this isn't better placed in a postflight script
+cd "$destdir"
+syslnk="System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages"
+mkdir -p $syslnk
+echo "/usr/lib/python2.3/site-packages" > "$syslnk/gnue.pth"
+
+# ---------------------------------------------------------------------------
+# Apply the proper permissions to all files of the package
+# ---------------------------------------------------------------------------
+cd "$destdir"
+echo "Applying permissions ..."
+
+find . -print | while read filename
+do
+ real="/$filename"
+ if [ -e "$real" ];
+ then
+ data=`stat -f "%u %g %p" "$real"`
+
+ uid=`echo $data | cut -f1 -d" "`
+ gid=`echo $data | cut -f2 -d" "`
+ mod=`echo $data | cut -f3 -d" "`
+
+ chmod $mod "$filename"
+ chgrp $gid "$filename"
+ chown $uid "$filename"
+ else
+ chown root "$filename"
+ chgrp admin "$filename"
+
+ if [ -d "$filename" ];
+ then
+ chmod 775 "$filename"
+ else
+ if [ -x "$filename" ]; then
+ chmod 775 "$filename"
+ else
+ chmod 664 "$filename"
+ fi
+ fi
+ fi
+done
+
+
+cd $curdir
+
+# ---------------------------------------------------------------------------
+# Build the package
+# ---------------------------------------------------------------------------
+echo "Building the package ..."
+/Developer/Tools/packagemaker -build -p $package -f $destdir -ds -r $resdir -i
Info.plist -d Description.plist
+
+# ---------------------------------------------------------------------------
+# Get rid of the obsolte directories
+# ---------------------------------------------------------------------------
+
+rm -rf "$destdir"
+
+
+# ---------------------------------------------------------------------------
+# Create a disk image
+# ---------------------------------------------------------------------------
+
+cd $curdir
+echo "Creating disk image ..."
+rm -f temp.dmg "$volname.dmg"
+
+# Prepare the directory tree for the disk image. This contains the previously
+# created installer-package as well as everything from build-env/pkg-resources
+rm -rf "build-dmg"
+mkdir "build-dmg"
+cp -R "$pkgres/" "build-dmg"
+mv $package "build-dmg"
+
+hdiutil create -srcfolder "build-dmg" -volname $volname temp.dmg
+
+# Convert the image
+echo "Converting disk image ..."
+hdiutil convert temp.dmg -format UDZO -o $volname.dmg
+
+# Clean up the working directory
+rm -f temp.dmg
+rm -rf "build-dmg"
+
Modified: trunk/gnue-common/packaging/win32/setup.cmd
===================================================================
--- trunk/gnue-common/packaging/win32/setup.cmd 2007-06-06 07:35:46 UTC (rev
9668)
+++ trunk/gnue-common/packaging/win32/setup.cmd 2007-06-06 07:47:32 UTC (rev
9669)
@@ -33,6 +33,8 @@
REM Compile everything into an exe
REM ---------------------------------------------------------------------------
+CD packaging\win32
+
@ECHO "Building EXE-File ..."
PUSHD %GNUE_PATH%\Scripts
@@ -40,4 +42,9 @@
POPD
+REM Catch the built EXE and clean up the build environment
+COPY %GNUE_PATH%\dist\*.exe .
+
+RMDIR /S /Q %GNUE_PATH%
+
:EXIT
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9669 - in trunk/gnue-common/packaging: osx win32,
johannes <=