Permalink
Browse files

tweaks to build chain

  • Loading branch information...
1 parent 967d19d commit 35b98eef405e3d57a90e6a46b4135d96a466ea5d RJVB committed May 21, 2012
View
2 README
@@ -36,7 +36,7 @@ Compile
* Compile all targets using XCode.
cd SATSMARTDriver
- xcodebuild -configuration Debug
+ xcodebuild -configuration Release
* Unmount all existing external drives.
View
BIN SATSMARTDriver-0.41.dmg
Binary file not shown.
View
2 SATSMARTDriver.pmdoc/01root-contents.xml
@@ -1 +1 @@
-<pkg-contents spec="1.12"><f n="Root" o="root" g="wheel" p="16877" pt="/Users/vieras/Projects/OS-X-SAT-SMART-Driver/Root" m="false" t="file"><f n="System" o="root" g="wheel" p="16877"><f n="Library" o="root" g="wheel" p="16877"><f n="Extensions" o="root" g="wheel" p="16877"><f n="SATSMARTDriver.kext" o="root" g="wheel" p="16877"><f n="Contents" o="root" g="wheel" p="16877"><f n="Info.plist" o="root" g="wheel" p="33188"><mod>group</mod><mod>owner</mod></f><f n="MacOS" o="root" g="wheel" p="16877"><f n="SATSMARTDriver" o="root" g="wheel" p="33188"><mod>group</mod><mod>owner</mod></f></f><f n="Resources" o="root" g="wheel" p="16877"><f n="English.lproj" o="root" g="wheel" p="16877"><f n="InfoPlist.strings" o="root" g="wheel" p="33188"><mod>group</mod><mod>owner</mod></f></f></f></f></f><f n="SATSMARTLib.plugin" o="root" g="wheel" p="16877"><f n="Contents" o="root" g="wheel" p="16877"><f n="Info.plist" o="root" g="wheel" p="33188"><mod>group</mod><mod>owner</mod></f><f n="MacOS" o="root" g="wheel" p="16877"><f n="SATSMARTLib" o="root" g="wheel" p="33261"><mod>group</mod><mod>owner</mod></f></f></f></f></f></f></f><mod>group</mod><mod>owner</mod></f></pkg-contents>
+<pkg-contents spec="1.12"/>
View
2 SATSMARTDriver.pmdoc/01root.xml
@@ -1 +1 @@
-<pkgref spec="1.12" uuid="8F0C944E-6009-492E-955D-09141AF5DAFE"><config><identifier>org.dungeon.satsmartdriver.Root.pkg</identifier><version>1.0</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/vieras/Projects/OS-X-SAT-SMART-Driver/Root</installFrom><installTo>/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>installTo</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>parent</mod></config><scripts><scripts-dir relative="true" mod="true">Resources</scripts-dir></scripts><contents><file-list>01root-contents.xml</file-list><component id="org.dungeon.driver.SATSMARTDriver" path="/Users/vieras/Projects/OS-X-SAT-SMART-Driver/Root/System/Library/Extensions/SATSMARTDriver.kext" version="1" isDowngradeable="true"><mod>isDowngradeable</mod></component><component id="org.dungeon.driver.SATSMARTLib" path="/Users/vieras/Projects/OS-X-SAT-SMART-Driver/Root/System/Library/Extensions/SATSMARTLib.plugin" version="1" isDowngradeable="true"><mod>isDowngradeable</mod></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
+<pkgref spec="1.12" uuid="8F0C944E-6009-492E-955D-09141AF5DAFE"><config><identifier>org.dungeon.satsmartdriver.Root.pkg</identifier><version>1.1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom relative="true" mod="true">Root</installFrom><installTo>/</installTo><flags><followSymbolicLinks/><updateInstalledLanguagesOnly/><mod>updateInstalledLanguagesOnly</mod></flags><packageStore type="internal"></packageStore><mod>installFrom.isRelativeType</mod><mod>version</mod><mod>scripts.scriptsDirectoryPath.path</mod><mod>scripts.postinstall.isRelativeType</mod><mod>parent</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">Resources/postinstall.sh</postinstall><scripts-dir relative="true" mod="true">Resources</scripts-dir></scripts><contents><component id="org.dungeon.driver.SATSMARTDriver" path="/Volumes/Debian/Users/bertin/work/src/MacOSX/OS-X-SAT-SMART-Driver/Root/System/Library/Extensions/SATSMARTDriver.kext" version="1.1"/><component id="org.dungeon.driver.SATSMARTLib" path="/Volumes/Debian/Users/bertin/work/src/MacOSX/OS-X-SAT-SMART-Driver/Root/System/Library/Extensions/SATSMARTLib.plugin" version="1"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>
View
44 SATSMARTDriver.pmdoc/index.xml
@@ -1 +1,43 @@
-<pkmkdoc spec="1.12"><properties><title>SATSMARTDriver</title><build>/Users/vieras/Projects/OS-X-SAT-SMART-Driver/SATSMARTDriver.pkg</build><organization>org.dungeon</organization><userSees ui="easy"/><min-target os="3"/><domain anywhere="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="Root" id="choice10" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.dungeon.satsmartdriver.Root.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"/></resources><flags/><item type="file">01root.xml</item><mod>properties.title</mod></pkmkdoc>
+<pkmkdoc spec="1.12"><properties><title>SATSMARTDriver</title><build>/Volumes/Debian/Users/bertin/work/src/MacOSX/OS-X-SAT-SMART-Driver/SATSMARTDriver.pkg</build><organization>org.dungeon</organization><userSees ui="easy"/><min-target os="3"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="Root" id="choice10" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.dungeon.satsmartdriver.Root.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource mime-type="text/rtf" kind="embedded" type="license"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fnil\fcharset0 NovareseITCbyBT-Book;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\f0\b\fs22 \cf0 The code is based on Apple opensource files and is therefore published\
+under Apple Public Source License. For details see\
+http://www.opensource.apple.com/license/apsl/}]]></resource><resource mime-type="text/rtf" kind="embedded" type="readme"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360
+{\fonttbl\f0\fnil\fcharset0 NovareseITCbyBT-Book;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\f0\b\fs22 \cf0 OS X SAT SMART Driver\
+#####################\
+\
+This is a kernel driver for Mac OS X external USB or FireWire drives.\
+It extends the standard driver behaviour by providing access to drive\
+SMART data. The interface to SMART data is same as with ATA family\
+driver, so most existing applications should work. The driver requires\
+a SAT (SCSI ATA Translation) capable external drive enclosure.\
+\
+The driver consists of a kernel extension and a user client interface\
+library.\
+\
+The code is based on Apple opensource files and is therefore published\
+under Apple Public Source License. For details see\
+http://www.opensource.apple.com/license/apsl/\
+\
+Install\
+=======\
+ \
+ * Use the dmg image and the installer\
+ * Power cycle the external drives\
+ * Check DiskUtility. The disk should have "S.M.A.R.T. Status: Verified"\
+\
+\
+Uninstall\
+=========\
+\
+ * Remove driver and plugin\
+ sudo rm -r /System/Library/Extensions/SATSMARTDriver.kext\
+ sudo rm -r /System/Library/Extensions/SATSMARTLib.plugin\
+ * Reboot}]]></resource></locale></resources><flags/><item type="file">01root.xml</item><mod>properties.title</mod><mod>properties.anywhereDomain</mod><mod>properties.systemDomain</mod></pkmkdoc>
View
26 SATSMARTDriver/Info.plist
@@ -6,22 +6,22 @@
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.dungeon.driver.SATSMARTDriver</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>1.1</string>
<key>IOKitPersonalities</key>
<dict>
<key>SATSMARTDriver</key>
@@ -30,32 +30,32 @@
<string>org.dungeon.driver.SATSMARTDriver</string>
<key>IOClass</key>
<string>org_dungeon_driver_IOSATDriver</string>
- <key>IOProviderClass</key>
- <string>IOSCSIPeripheralDeviceNub</string>
<key>IOKitDebug</key>
<integer>65535</integer>
+ <key>IOProbeScore</key>
+ <integer>1000</integer>
+ <key>IOProviderClass</key>
+ <string>IOSCSIPeripheralDeviceNub</string>
<key>Peripheral Device Type</key>
<integer>0</integer>
<key>xProduct Identification</key>
<string>My Book</string>
<key>xVendor Identification</key>
<string>WD</string>
- <key>IOProbeScore</key>
- <integer>1000</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
- <key>com.apple.kpi.iokit</key>
- <string>10.8</string>
- <key>com.apple.kpi.libkern</key>
- <string>10.8</string>
<key>com.apple.iokit.IOSCSIArchitectureModelFamily</key>
<string>2.6.8</string>
<key>com.apple.iokit.IOSCSIBlockCommandsDevice</key>
<string>2.6.8</string>
<key>com.apple.iokit.IOStorageFamily</key>
<string>1.6.3</string>
+ <key>com.apple.kpi.iokit</key>
+ <string>10.8</string>
+ <key>com.apple.kpi.libkern</key>
+ <string>10.8</string>
</dict>
<key>OSBundleRequired</key>
<string>Local-Root</string>
View
79 SATSMARTDriver/SATSMARTDriver.xcodeproj/project.pbxproj
@@ -22,6 +22,17 @@
name = "Build All";
productName = "Build All";
};
+ D61EE2F6156A4F5C00A803A2 /* buildDMG */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = D61EE2FE156A4F8700A803A2 /* Build configuration list for PBXAggregateTarget "buildDMG" */;
+ buildPhases = (
+ D61EE2F5156A4F5C00A803A2 /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = buildDMG;
+ productName = buildDMG;
+ };
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
@@ -123,6 +134,9 @@
A8D7732714E9B2DB00195DA7 /* IOSATCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IOSATCommand.cpp; sourceTree = "<group>"; };
A8D7732C14EABA9400195DA7 /* IOSATCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSATCommand.h; sourceTree = "<group>"; };
A8D7732E14EABAC600195DA7 /* IOSATBusCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSATBusCommand.h; sourceTree = "<group>"; };
+ D61EE2F1156A491A00A803A2 /* 01root-contents.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "01root-contents.xml"; sourceTree = "<group>"; };
+ D61EE2F2156A491A00A803A2 /* 01root.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = 01root.xml; sourceTree = "<group>"; };
+ D61EE2F3156A491A00A803A2 /* index.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = index.xml; sourceTree = "<group>"; };
D6E326A115699D1B00C0B62B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README; path = ../README; sourceTree = SOURCE_ROOT; };
D6E326A215699D1B00C0B62B /* mkdmg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = mkdmg; path = ../mkdmg; sourceTree = SOURCE_ROOT; };
D6E326A315699D1B00C0B62B /* makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = makefile; path = ../makefile; sourceTree = SOURCE_ROOT; };
@@ -191,6 +205,7 @@
32D94FCF0562CBF700B6AF17 /* Info.plist */,
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
D6E326A115699D1B00C0B62B /* README */,
+ D61EE2F0156A491A00A803A2 /* SATSMARTDriver.pmdoc */,
D6E326A215699D1B00C0B62B /* mkdmg */,
D6E326A315699D1B00C0B62B /* makefile */,
D6E326A415699D1B00C0B62B /* build.sh */,
@@ -257,6 +272,18 @@
path = UserClientLib;
sourceTree = "<group>";
};
+ D61EE2F0156A491A00A803A2 /* SATSMARTDriver.pmdoc */ = {
+ isa = PBXGroup;
+ children = (
+ D61EE2F1156A491A00A803A2 /* 01root-contents.xml */,
+ D61EE2F2156A491A00A803A2 /* 01root.xml */,
+ D61EE2F3156A491A00A803A2 /* index.xml */,
+ );
+ includeInIndex = 0;
+ name = SATSMARTDriver.pmdoc;
+ path = ../SATSMARTDriver.pmdoc;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -381,6 +408,7 @@
projectRoot = "";
targets = (
A86A787514F57C900067035C /* Build All */,
+ D61EE2F6156A4F5C00A803A2 /* buildDMG */,
32D94FC30562CBF700B6AF17 /* SATSMARTDriver */,
A8CDBA1114E53D3E00881848 /* SATSMARTLib */,
A8CDBAFD14E5405F00881848 /* TestTool */,
@@ -418,6 +446,23 @@
};
/* End PBXRezBuildPhase section */
+/* Begin PBXShellScriptBuildPhase section */
+ D61EE2F5156A4F5C00A803A2 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# shell script goes here\ncd \"${PROJECT_DIR}\"/..\n./build.sh\nexit 0";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
32D94FC90562CBF700B6AF17 /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -532,7 +577,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CURRENT_PROJECT_VERSION = 1.0.3;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_INFORMATION_FORMAT = dwarf;
GCC_MODEL_TUNING = "";
HEADER_SEARCH_PATHS = /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers;
INFOPLIST_FILE = Info.plist;
@@ -723,7 +768,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DEBUG_INFORMATION_FORMAT = dwarf;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -785,6 +830,27 @@
};
name = Release;
};
+ D61EE2F7156A4F5D00A803A2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = buildDMG;
+ };
+ name = Debug;
+ };
+ D61EE2F8156A4F5D00A803A2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = buildDMG;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -851,6 +917,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ D61EE2FE156A4F8700A803A2 /* Build configuration list for PBXAggregateTarget "buildDMG" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D61EE2F7156A4F5D00A803A2 /* Debug */,
+ D61EE2F8156A4F5D00A803A2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
/* End XCConfigurationList section */
};
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
View
53 build.sh 100644 → 100755
@@ -6,18 +6,19 @@ rm -rf SATSMARTDriver/build
rm -rf Root
mkdir -p Root/System/Library/Extensions/
-cp -v -r SATSMARTDriver/build/Release/SATSMARTDriver.kext Root/System/Library/Extensions/
-cp -v -r SATSMARTDriver/build/Release/SATSMARTLib.plugin Root/System/Library/Extensions/
+ditto --rsrc SATSMARTDriver/build/Release/SATSMARTDriver.kext Root/System/Library/Extensions/SATSMARTDriver.kext
+ditto --rsrc SATSMARTDriver/build/Release/SATSMARTLib.plugin Root/System/Library/Extensions/SATSMARTLib.plugin
rm -fr satsmartdriver.pkg
-/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker --doc SATSMARTDriver.pmdoc
+source=SATSMARTDriver.pkg
+
+/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker --doc SATSMARTDriver.pmdoc --out "${source}"
#
size=550
title="SATSMARTDriver"
-source=SATSMARTDriver.pkg
-finalDMGName=SATSMARTDriver-0.4.dmg
+finalDMGName=SATSMARTDriver-0.41.dmg
applicationName=applicationName
#Create a R/W DMG. It must be larger than the result will be. In this example, the bash variable "size" contains the size in Kb and the contents of the folder in the "source" bash variable will be copied into the DMG:
@@ -36,24 +37,25 @@ sleep 3
#Use AppleScript to set the visual styles (name of .app must be in bash variable "applicationName", use variables for the other properties as needed):
echo '
+ activate application "Finder"
tell application "Finder"
tell disk "'${title}'"
open
set current view of container window to icon view
- set toolbar visible of container window to false
- set statusbar visible of container window to false
+ set toolbar visible of container window to true
+ set statusbar visible of container window to true
set the bounds of container window to {400, 100, 885, 430}
set theViewOptions to the icon view options of container window
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 72
-close
-open
- update without registering applications
- delay 5
+ close
end tell
end tell
' | osascript
+# open
+# update without registering applications
+# delay 5
# eject
# make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
@@ -68,33 +70,6 @@ sync
sync
hdiutil detach ${device}
hdiutil convert "pack.temp.dmg" -format UDZO -imagekey zlib-level=9 -o "${finalDMGName}"
-rm -f pack.temp.dmg
+rm -rf pack.temp.dmg "${source}" Root
exit 0
-
-# Create dmg
-VOL="SATSMARTDriver"
-VER="0.4"
-FILES="SATSMARTDriver.pkg"
-
-DMG="tmp-$VOL.dmg"
-
-# create temporary disk image and format, ejecting when done
-SIZE=`du -sk ${FILES} | sed -n '/^[0-9]*/s/([0-9]*).*/1/p'`
-SIZE=$((${SIZE}/1000+1))
-#hdiutil create "$DMG" -megabytes ${SIZE} -ov -type UDIF
-hdiutil create "$DMG" -megabytes ${SIZE} -ov -type UDIF -fs HFS+
-DISK=`hdid "$DMG" | sed -ne ' /Apple_partition_scheme/ s|^/dev/([^ ]*).*$|1|p'`
-#newfs_hfs -v "$VOL" /dev/r${DISK}s2
-hdiutil eject $DISK
-
-# mount and copy files onto volume
-hdid "$DMG"
-cp -R "${FILES}" "/Volumes/$VOL"
-hdiutil eject $DISK
-#osascript -e "tell application "Finder" to eject disk "$VOL"" &&
-
-# convert to compressed image, delete temp image
-rm -f "${VOL}-${VER}.dmg"
-hdiutil convert "$DMG" -format UDZO -o "${VOL}-${VER}.dmg"
-rm -f "$DMG"
View
2 mkdmg
@@ -5,7 +5,7 @@ set -e
size=550
title="SATSMARTDriver"
source=SATSMARTDriver.pkg
-finalDMGName=SATSMARTDriver-0.4.dmg
+finalDMGName=SATSMARTDriver-0.41.dmg
applicationName=applicationName
#Create a R/W DMG. It must be larger than the result will be. In this example, the bash variable "size" contains the size in Kb and the contents of the folder in the "source" bash variable will be copied into the DMG:

0 comments on commit 35b98ee

Please sign in to comment.