Changeset 4489
- Timestamp:
- 02/06/07 09:51:05 (2 years ago)
- Files:
-
- WiredServer/trunk/WiredServer.xcodeproj/project.pbxproj (modified) (12 diffs)
- WiredServer/trunk/package.sh (added)
- WiredServer/trunk/wired.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredServer/trunk/WiredServer.xcodeproj/project.pbxproj
r4444 r4489 12 12 buildConfigurationList = A50335B40864C9AC00CE6911 /* Build configuration list for PBXAggregateTarget "Package" */; 13 13 buildPhases = ( 14 A50335AC0864C98900CE6911 /* Run Script ( wired) */,14 A50335AC0864C98900CE6911 /* Run Script (Package) */, 15 15 ); 16 16 dependencies = ( 17 17 A519E5E30978287D002A9A5C /* PBXTargetDependency */, 18 A5FEE2F00B7877D300199A37 /* PBXTargetDependency */, 18 19 ); 19 20 name = Package; … … 53 54 name = Distribution; 54 55 productName = Packaging; 56 }; 57 A5FEE2820B7870E000199A37 /* wired */ = { 58 isa = PBXAggregateTarget; 59 buildConfigurationList = A5FEE2880B7870F400199A37 /* Build configuration list for PBXAggregateTarget "wired" */; 60 buildPhases = ( 61 A5FEE2810B7870E000199A37 /* Run Script (wired) */, 62 ); 63 dependencies = ( 64 ); 65 name = wired; 66 productName = "Wired Server"; 55 67 }; 56 68 /* End PBXAggregateTarget section */ … … 132 144 remoteGlobalIDString = A5E4B55207A98AEE00BD6812; 133 145 remoteInfo = "ZAObject Test"; 146 }; 147 A5FEE2EF0B7877D300199A37 /* PBXContainerItemProxy */ = { 148 isa = PBXContainerItemProxy; 149 containerPortal = 089C1669FE841209C02AAC07 /* Project object */; 150 proxyType = 1; 151 remoteGlobalIDString = A5FEE2820B7870E000199A37 /* wired */; 152 remoteInfo = wired; 134 153 }; 135 154 /* End PBXContainerItemProxy section */ … … 224 243 A5E4A9610794792600FA127F /* WCDashboardController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WCDashboardController.m; sourceTree = "<group>"; }; 225 244 A5E4AAE30794812C00FA127F /* WiredAdditions.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WiredAdditions.framework; path = WiredAdditions/build/WiredAdditions.framework; sourceTree = SOURCE_ROOT; }; 245 A5FEE2FF0B78787900199A37 /* package.sh */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.sh; path = package.sh; sourceTree = "<group>"; }; 226 246 F506C035013D953901CA16C8 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = "<absolute>"; }; 227 247 /* End PBXFileReference section */ … … 417 437 A503354C0864C16700CE6911 /* localize.sh */, 418 438 A503354B0864C16700CE6911 /* makepkg.sh */, 439 A5FEE2FF0B78787900199A37 /* package.sh */, 419 440 77B7C2780973EB34009367B0 /* version.pl */, 420 441 A503354A0864C15D00CE6911 /* wired.sh */, … … 510 531 8D202CE80486D31800D8A456 /* Wired Preference Pane */, 511 532 A5BE6D2D0864B63000DA5C89 /* Wired Additions */, 533 A5FEE2820B7870E000199A37 /* wired */, 512 534 A50335AD0864C98900CE6911 /* Package */, 513 535 A5D97273078E375B00CD982E /* Localization */, … … 569 591 570 592 /* Begin PBXShellScriptBuildPhase section */ 571 A50335AC0864C98900CE6911 /* Run Script ( wired) */ = {593 A50335AC0864C98900CE6911 /* Run Script (Package) */ = { 572 594 isa = PBXShellScriptBuildPhase; 573 595 buildActionMask = 2147483647; … … 576 598 inputPaths = ( 577 599 ); 578 name = "Run Script ( wired)";600 name = "Run Script (Package)"; 579 601 outputPaths = ( 580 602 ); 581 603 runOnlyForDeploymentPostprocessing = 0; 582 604 shellPath = /bin/sh; 583 shellScript = "# Create initial directory\n ROOT=\"$PROJECT_TEMP_DIR/Package\"\nsudo rm -rf \"$ROOT\"\nmkdir -p \"$ROOT\"\n\n# Copy package files\ncp -Rp Package/* \"$ROOT\" || exit 1\n\n# Install Wired Server into directory\nsh wired.sh \"$ROOT/Contents\" || exit 1\n\n# Create package from directory\nmkdir -p \"$BUILT_PRODUCTS_DIR\"\nsh makepkg.sh \"$ROOT\" \"$BUILT_PRODUCTS_DIR/WiredServer.pkg\" || exit 1\n";605 shellScript = "# Create initial directory\nsudo rm -rf \"$PROJECT_TEMP_DIR/Package\"\nmkdir -p \"$PROJECT_TEMP_DIR/Package\"\n\n# Copy package files\ncp -Rp Package/* \"$PROJECT_TEMP_DIR/Package\" || exit 1\n\n# Install Wired Server into directory\nsh package.sh \"$PROJECT_TEMP_DIR/wired\" \"$PROJECT_TEMP_DIR/Package/Contents\" || exit 1\n\n# Create package from directory\nmkdir -p \"$BUILT_PRODUCTS_DIR\"\nsh makepkg.sh \"$PROJECT_TEMP_DIR/Package\" \"$BUILT_PRODUCTS_DIR/WiredServer.pkg\" || exit 1\n"; 584 606 }; 585 607 A5992EB5072A77F900E67617 /* Run Script (Version) */ = { … … 638 660 shellPath = /bin/sh; 639 661 shellScript = "# Zip\ncd \"$BUILT_PRODUCTS_DIR\"\nrm -f \"$BUILD_DIR/WiredServer.zip\"\nzip -ry \"$BUILD_DIR/WiredServer.zip\" \"WiredServer.pkg\" || exit 1\n"; 662 }; 663 A5FEE2810B7870E000199A37 /* Run Script (wired) */ = { 664 isa = PBXShellScriptBuildPhase; 665 buildActionMask = 2147483647; 666 files = ( 667 ); 668 inputPaths = ( 669 ); 670 name = "Run Script (wired)"; 671 outputPaths = ( 672 ); 673 runOnlyForDeploymentPostprocessing = 0; 674 shellPath = /bin/sh; 675 shellScript = "# Build wired\nsh wired.sh \"$PROJECT_TEMP_DIR/wired\" \"$PROJECT_TEMP_DIR/Package/Contents\" || exit 1\n"; 640 676 }; 641 677 /* End PBXShellScriptBuildPhase section */ … … 676 712 targetProxy = A519E5E20978287D002A9A5C /* PBXContainerItemProxy */; 677 713 }; 714 A5FEE2F00B7877D300199A37 /* PBXTargetDependency */ = { 715 isa = PBXTargetDependency; 716 target = A5FEE2820B7870E000199A37 /* wired */; 717 targetProxy = A5FEE2EF0B7877D300199A37 /* PBXContainerItemProxy */; 718 }; 678 719 /* End PBXTargetDependency section */ 679 720 … … 1064 1105 name = Release/Universal; 1065 1106 }; 1107 A5FEE2890B7870F400199A37 /* Debug/Native/32 */ = { 1108 isa = XCBuildConfiguration; 1109 buildSettings = { 1110 PRODUCT_NAME = "Wired Server"; 1111 }; 1112 name = Debug/Native/32; 1113 }; 1114 A5FEE28A0B7870F400199A37 /* Test/Universal */ = { 1115 isa = XCBuildConfiguration; 1116 buildSettings = { 1117 PRODUCT_NAME = "Wired Server"; 1118 }; 1119 name = Test/Universal; 1120 }; 1121 A5FEE28B0B7870F400199A37 /* Release/Universal */ = { 1122 isa = XCBuildConfiguration; 1123 buildSettings = { 1124 PRODUCT_NAME = "Wired Server"; 1125 }; 1126 name = Release/Universal; 1127 }; 1066 1128 /* End XCBuildConfiguration section */ 1067 1129 … … 1127 1189 defaultConfigurationName = Debug/Native/32; 1128 1190 }; 1191 A5FEE2880B7870F400199A37 /* Build configuration list for PBXAggregateTarget "wired" */ = { 1192 isa = XCConfigurationList; 1193 buildConfigurations = ( 1194 A5FEE2890B7870F400199A37 /* Debug/Native/32 */, 1195 A5FEE28A0B7870F400199A37 /* Test/Universal */, 1196 A5FEE28B0B7870F400199A37 /* Release/Universal */, 1197 ); 1198 defaultConfigurationIsVisible = 0; 1199 defaultConfigurationName = Debug/Native/32; 1200 }; 1129 1201 /* End XCConfigurationList section */ 1130 1202 }; WiredServer/trunk/wired.sh
r4484 r4489 1 1 #!/bin/sh 2 2 3 ROOT="$1" 4 5 # Create skeleton directories 6 mkdir -p "$ROOT/Library/PreferencePanes" 7 mkdir -p "$ROOT/Library/StartupItems" 8 mkdir -p "$ROOT/Library/Wired" 3 BUILDDIR="$1" 4 INSTALLDIR="$2" 9 5 10 6 # Build a universal wired installation 11 7 for i in $ARCHS; do 12 if [ ! -f "$ TEMP_FILE_DIR/make/$i/Makefile" ]; then8 if [ ! -f "$BUILDDIR/make/$i/Makefile" ]; then 13 9 SDKROOT=$(eval echo SDKROOT_$i); SDKROOT=$(eval echo \$$SDKROOT) 14 10 RELEASE=$(uname -r) … … 17 13 18 14 cd "$SRCROOT/wired" 19 CFLAGS="-g -O2 -arch $i" CPPFLAGS="-I$ TEMP_FILE_DIR/make/$i -isysroot $SDKROOT" ./configure --build="$BUILD" --host="$HOST" --enable-warnings --srcdir="$SRCROOT/wired" --with-objdir="$OBJECT_FILE_DIR/$i" --with-rundir="$TEMP_FILE_DIR/run/$i/wired" --prefix="$ROOT/Library" --with-fake-prefix="/Library" --with-wireddir="Wired" --mandir="$ROOT/usr/local/man" --without-libwired || exit 115 CFLAGS="-g -O2 -arch $i" CPPFLAGS="-I$BUILDDIR/make/$i -isysroot $SDKROOT" ./configure --build="$BUILD" --host="$HOST" --enable-warnings --srcdir="$SRCROOT/wired" --with-objdir="$OBJECT_FILE_DIR/$i" --with-rundir="$BUILDDIR/run/$i/wired" --prefix="$INSTALLDIR/Library" --with-fake-prefix="/Library" --with-wireddir="Wired" --mandir="$INSTALLDIR/usr/local/man" --without-libwired || exit 1 20 16 21 17 cd "$SRCROOT/wired/libwired" 22 CFLAGS="-g -O2 -arch $i" CPPFLAGS="-I$ TEMP_FILE_DIR/make/$i/libwired -isysroot $SDKROOT" ./configure --build="$BUILD" --host="$HOST" --enable-warnings --enable-ssl --enable-pthreads --srcdir="$SRCROOT/wired/libwired" --with-objdir="$OBJECT_FILE_DIR/$i" --with-rundir="$TEMP_FILE_DIR/run/$i/wired/libwired" || exit 118 CFLAGS="-g -O2 -arch $i" CPPFLAGS="-I$BUILDDIR/make/$i/libwired -isysroot $SDKROOT" ./configure --build="$BUILD" --host="$HOST" --enable-warnings --enable-ssl --enable-pthreads --srcdir="$SRCROOT/wired/libwired" --with-objdir="$OBJECT_FILE_DIR/$i" --with-rundir="$BUILDDIR/run/$i/wired/libwired" || exit 1 23 19 24 mkdir -p "$ TEMP_FILE_DIR/make/$i/libwired" "$TEMP_FILE_DIR/run/$i" "$BUILT_PRODUCTS_DIR"25 mv "$SRCROOT/wired/config.h" "$ TEMP_FILE_DIR/make/$i/config.h"26 mv "$SRCROOT/wired/libwired/config.h" "$ TEMP_FILE_DIR/make/$i/libwired/config.h"27 mv "$SRCROOT/wired/Makefile" "$ TEMP_FILE_DIR/make/$i/Makefile"28 mv "$SRCROOT/wired/libwired/Makefile" "$ TEMP_FILE_DIR/make/$i/libwired/Makefile"29 cp -r "$SRCROOT/wired/run" "$ TEMP_FILE_DIR/run/$i/wired"30 cp -r "$SRCROOT/wired/libwired/run" "$ TEMP_FILE_DIR/run/$i/wired/libwired"20 mkdir -p "$BUILDDIR/make/$i/libwired" "$BUILDDIR/run/$i" "$BUILT_PRODUCTS_DIR" 21 mv "$SRCROOT/wired/config.h" "$BUILDDIR/make/$i/config.h" 22 mv "$SRCROOT/wired/libwired/config.h" "$BUILDDIR/make/$i/libwired/config.h" 23 mv "$SRCROOT/wired/Makefile" "$BUILDDIR/make/$i/Makefile" 24 mv "$SRCROOT/wired/libwired/Makefile" "$BUILDDIR/make/$i/libwired/Makefile" 25 cp -r "$SRCROOT/wired/run" "$BUILDDIR/run/$i/wired" 26 cp -r "$SRCROOT/wired/libwired/run" "$BUILDDIR/run/$i/wired/libwired" 31 27 fi 32 28 33 cd "$TEMP_FILE_DIR/make/$i" 34 make -f "$TEMP_FILE_DIR/make/$i/Makefile" || exit 1 35 36 WIRED_BINARIES="$TEMP_FILE_DIR/run/$i/wired/wired $WIRED_BINARIES" 37 MASTER="$i" 29 cd "$BUILDDIR/make/$i" 30 make -f "$BUILDDIR/make/$i/Makefile" || exit 1 38 31 done 39 32 40 lipo -create $WIRED_BINARIES -output /tmp/wired || exit 141 cp /tmp/wired "$TEMP_FILE_DIR/run/$MASTER/wired/wired"42 43 # Install wired into /Library/Wired44 sudo make -f "$TEMP_FILE_DIR/make/$MASTER/Makefile" install-only || exit 145 46 # Install /Library/PreferencePanes and /Library/StartupItems47 cd "$SRCROOT"48 cp -Rp "$BUILT_PRODUCTS_DIR/Wired.prefPane" "$ROOT/Library/PreferencePanes/"49 cp -Rp "StartupItems/Wired" "$ROOT/Library/StartupItems/"50 51 # Fix permissions52 sudo chmod 1775 "$ROOT"53 sudo chown root:wheel "$ROOT"54 55 sudo chmod 775 "$ROOT/Library"56 sudo chown root:admin "$ROOT/Library"57 58 find "$ROOT/Library/PreferencePanes" \( -type d -o -perm +111 \) -print0 | sudo xargs -0 chmod 77559 find "$ROOT/Library/PreferencePanes" \( -type f -a ! -perm +111 \) -print0 | sudo xargs -0 chmod 66460 sudo chown -R root:admin "$ROOT/Library/PreferencePanes"61 62 sudo chown -R root:wheel "$ROOT/Library/StartupItems"63 64 sudo chmod 755 "$ROOT/usr" "$ROOT/usr/local"65 sudo chown root:wheel "$ROOT/usr" "$ROOT/usr/local"66 67 33 exit 0
