Property changes on: trunk/ChameleonPrefPane/build
___________________________________________________________________
Added: svn:ignore
+ *
Index: trunk/ChameleonPrefPane/version.plist
===================================================================
--- trunk/ChameleonPrefPane/version.plist (revision 0)
+++ trunk/ChameleonPrefPane/version.plist (revision 9)
@@ -0,0 +1,16 @@
+
+
+
+
+ BuildVersion
+ 1
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1.0
+ ProjectName
+ PreferencePaneTemplate
+ SourceVersion
+ 270000
+
+
Index: trunk/ChameleonPrefPane/APPLE_LICENSE
===================================================================
--- trunk/ChameleonPrefPane/APPLE_LICENSE (revision 0)
+++ trunk/ChameleonPrefPane/APPLE_LICENSE (revision 9)
@@ -0,0 +1,367 @@
+APPLE PUBLIC SOURCE LICENSE
+Version 2.0 - August 6, 2003
+
+Please read this License carefully before downloading this software.
+By downloading or using this software, you are agreeing to be bound by
+the terms of this License. If you do not or cannot agree to the terms
+of this License, please do not download or use the software.
+
+1. General; Definitions. This License applies to any program or other
+work which Apple Computer, Inc. ("Apple") makes publicly available and
+which contains a notice placed by Apple identifying such program or
+work as "Original Code" and stating that it is subject to the terms of
+this Apple Public Source License version 2.0 ("License"). As used in
+this License:
+
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
+the grantor of rights, (i) claims of patents that are now or hereafter
+acquired, owned by or assigned to Apple and (ii) that cover subject
+matter contained in the Original Code, but only to the extent
+necessary to use, reproduce and/or distribute the Original Code
+without infringement; and (b) in the case where You are the grantor of
+rights, (i) claims of patents that are now or hereafter acquired,
+owned by or assigned to You and (ii) that cover subject matter in Your
+Modifications, taken alone or in combination with Original Code.
+
+1.2 "Contributor" means any person or entity that creates or
+contributes to the creation of Modifications.
+
+1.3 "Covered Code" means the Original Code, Modifications, the
+combination of Original Code and any Modifications, and/or any
+respective portions thereof.
+
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or
+otherwise make Covered Code available, directly or indirectly, to
+anyone other than You; and/or (b) to use Covered Code, alone or as
+part of a Larger Work, in any way to provide a service, including but
+not limited to delivery of content, through electronic communication
+with a client other than You.
+
+1.5 "Larger Work" means a work which combines Covered Code or portions
+thereof with code not governed by the terms of this License.
+
+1.6 "Modifications" mean any addition to, deletion from, and/or change
+to, the substance and/or structure of the Original Code, any previous
+Modifications, the combination of Original Code and any previous
+Modifications, and/or any respective portions thereof. When code is
+released as a series of files, a Modification is: (a) any addition to
+or deletion from the contents of a file containing Covered Code;
+and/or (b) any new file or other representation of computer program
+statements that contains any part of Covered Code.
+
+1.7 "Original Code" means (a) the Source Code of a program or other
+work as originally made available by Apple under this License,
+including the Source Code of any updates or upgrades to such programs
+or works made available by Apple under this License, and that has been
+expressly identified by Apple as such in the header file(s) of such
+work; and (b) the object code compiled from such Source Code and
+originally made available by Apple under this License.
+
+1.8 "Source Code" means the human readable form of a program or other
+work that is suitable for making modifications to it, including all
+modules it contains, plus any associated interface definition files,
+scripts used to control compilation and installation of an executable
+(object code).
+
+1.9 "You" or "Your" means an individual or a legal entity exercising
+rights under this License. For legal entities, "You" or "Your"
+includes any entity which controls, is controlled by, or is under
+common control with, You, where "control" means (a) the power, direct
+or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b) ownership of fifty percent
+(50%) or more of the outstanding shares or beneficial ownership of
+such entity.
+
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms
+and conditions of this License, Apple hereby grants You, effective on
+the date You accept this License and download the Original Code, a
+world-wide, royalty-free, non-exclusive license, to the extent of
+Apple's Applicable Patent Rights and copyrights covering the Original
+Code, to do the following:
+
+2.1 Unmodified Code. You may use, reproduce, display, perform,
+internally distribute within Your organization, and Externally Deploy
+verbatim, unmodified copies of the Original Code, for commercial or
+non-commercial purposes, provided that in each instance:
+
+(a) You must retain and reproduce in all copies of Original Code the
+copyright and other proprietary notices and disclaimers of Apple as
+they appear in the Original Code, and keep intact all notices in the
+Original Code that refer to this License; and
+
+(b) You must include a copy of this License with every copy of Source
+Code of Covered Code and documentation You distribute or Externally
+Deploy, and You may not offer or impose any terms on such Source Code
+that alter or restrict this License or the recipients' rights
+hereunder, except as permitted under Section 6.
+
+2.2 Modified Code. You may modify Covered Code and use, reproduce,
+display, perform, internally distribute within Your organization, and
+Externally Deploy Your Modifications and Covered Code, for commercial
+or non-commercial purposes, provided that in each instance You also
+meet all of these conditions:
+
+(a) You must satisfy all the conditions of Section 2.1 with respect to
+the Source Code of the Covered Code;
+
+(b) You must duplicate, to the extent it does not already exist, the
+notice in Exhibit A in each file of the Source Code of all Your
+Modifications, and cause the modified files to carry prominent notices
+stating that You changed the files and the date of any change; and
+
+(c) If You Externally Deploy Your Modifications, You must make
+Source Code of all Your Externally Deployed Modifications either
+available to those to whom You have Externally Deployed Your
+Modifications, or publicly available. Source Code of Your Externally
+Deployed Modifications must be released under the terms set forth in
+this License, including the license grants set forth in Section 3
+below, for as long as you Externally Deploy the Covered Code or twelve
+(12) months from the date of initial External Deployment, whichever is
+longer. You should preferably distribute the Source Code of Your
+Externally Deployed Modifications electronically (e.g. download from a
+web site).
+
+2.3 Distribution of Executable Versions. In addition, if You
+Externally Deploy Covered Code (Original Code and/or Modifications) in
+object code, executable form only, You must include a prominent
+notice, in the code itself as well as in related documentation,
+stating that Source Code of the Covered Code is available under the
+terms of this License with information on how and where to obtain such
+Source Code.
+
+2.4 Third Party Rights. You expressly acknowledge and agree that
+although Apple and each Contributor grants the licenses to their
+respective portions of the Covered Code set forth herein, no
+assurances are provided by Apple or any Contributor that the Covered
+Code does not infringe the patent or other intellectual property
+rights of any other entity. Apple and each Contributor disclaim any
+liability to You for claims brought by any other entity based on
+infringement of intellectual property rights or otherwise. As a
+condition to exercising the rights and licenses granted hereunder, You
+hereby assume sole responsibility to secure any other intellectual
+property rights needed, if any. For example, if a third party patent
+license is required to allow You to distribute the Covered Code, it is
+Your responsibility to acquire that license before distributing the
+Covered Code.
+
+3. Your Grants. In consideration of, and as a condition to, the
+licenses granted to You under this License, You hereby grant to any
+person or entity receiving or distributing Covered Code under this
+License a non-exclusive, royalty-free, perpetual, irrevocable license,
+under Your Applicable Patent Rights and other intellectual property
+rights (other than patent) owned or controlled by You, to use,
+reproduce, display, perform, modify, sublicense, distribute and
+Externally Deploy Your Modifications of the same scope and extent as
+Apple's licenses under Sections 2.1 and 2.2 above.
+
+4. Larger Works. You may create a Larger Work by combining Covered
+Code with other code not governed by the terms of this License and
+distribute the Larger Work as a single product. In each such instance,
+You must make sure the requirements of this License are fulfilled for
+the Covered Code or any portion thereof.
+
+5. Limitations on Patent License. Except as expressly stated in
+Section 2, no other patent rights, express or implied, are granted by
+Apple herein. Modifications and/or Larger Works may require additional
+patent licenses from Apple which Apple may grant in its sole
+discretion.
+
+6. Additional Terms. You may choose to offer, and to charge a fee for,
+warranty, support, indemnity or liability obligations and/or other
+rights consistent with the scope of the license granted herein
+("Additional Terms") to one or more recipients of Covered Code.
+However, You may do so only on Your own behalf and as Your sole
+responsibility, and not on behalf of Apple or any Contributor. You
+must obtain the recipient's agreement that any such Additional Terms
+are offered by You alone, and You hereby agree to indemnify, defend
+and hold Apple and every Contributor harmless for any liability
+incurred by or claims asserted against Apple or such Contributor by
+reason of any such Additional Terms.
+
+7. Versions of the License. Apple may publish revised and/or new
+versions of this License from time to time. Each version will be given
+a distinguishing version number. Once Original Code has been published
+under a particular version of this License, You may continue to use it
+under the terms of that version. You may also choose to use such
+Original Code under the terms of any subsequent version of this
+License published by Apple. No one other than Apple has the right to
+modify the terms applicable to Covered Code created under this
+License.
+
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
+part pre-release, untested, or not fully tested works. The Covered
+Code may contain errors that could cause failures or loss of data, and
+may be incomplete or contain inaccuracies. You expressly acknowledge
+and agree that use of the Covered Code, or any portion thereof, is at
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
+You acknowledge that the Covered Code is not intended for use in the
+operation of nuclear facilities, aircraft navigation, communication
+systems, or air traffic control machines in which case the failure of
+the Covered Code could lead to death, personal injury, or severe
+physical or environmental damage.
+
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
+TO YOU. In no event shall Apple's total liability to You for all
+damages (other than as may be required by applicable law) under this
+License exceed the amount of fifty dollars ($50.00).
+
+10. Trademarks. This License does not grant any rights to use the
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,
+service marks, logos or trade names belonging to Apple (collectively
+"Apple Marks") or to any trademark, service mark, logo or trade name
+belonging to any Contributor. You agree not to use any Apple Marks in
+or as part of the name of products derived from the Original Code or
+to endorse or promote products derived from the Original Code other
+than as expressly permitted by and in strict compliance at all times
+with Apple's third party trademark usage guidelines which are posted
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership. Subject to the licenses granted under this License,
+each Contributor retains all rights, title and interest in and to any
+Modifications made by such Contributor. Apple retains all rights,
+title and interest in and to the Original Code and any Modifications
+made by or on behalf of Apple ("Apple Modifications"), and such Apple
+Modifications will not be automatically subject to this License. Apple
+may, at its sole discretion, choose to license such Apple
+Modifications under this License, or on different terms from those
+contained in this License or may choose not to license them at all.
+
+12. Termination.
+
+12.1 Termination. This License and the rights granted hereunder will
+terminate:
+
+(a) automatically without notice from Apple if You fail to comply with
+any term(s) of this License and fail to cure such breach within 30
+days of becoming aware of such breach;
+
+(b) immediately in the event of the circumstances described in Section
+13.5(b); or
+
+(c) automatically without notice from Apple if You, at any time during
+the term of this License, commence an action for patent infringement
+against Apple; provided that Apple did not first commence
+an action for patent infringement against You in that instance.
+
+12.2 Effect of Termination. Upon termination, You agree to immediately
+stop any further use, reproduction, modification, sublicensing and
+distribution of the Covered Code. All sublicenses to the Covered Code
+which have been properly granted prior to termination shall survive
+any termination of this License. Provisions which, by their nature,
+should remain in effect beyond the termination of this License shall
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
+12.2 and 13. No party will be liable to any other for compensation,
+indemnity or damages of any sort solely as a result of terminating
+this License in accordance with its terms, and termination of this
+License will be without prejudice to any other right or remedy of
+any party.
+
+13. Miscellaneous.
+
+13.1 Government End Users. The Covered Code is a "commercial item" as
+defined in FAR 2.101. Government software and technical data rights in
+the Covered Code include only those rights customarily provided to the
+public as defined in this License. This customary commercial license
+in technical data and software is provided in accordance with FAR
+12.211 (Technical Data) and 12.212 (Computer Software) and, for
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer
+Software or Computer Software Documentation). Accordingly, all U.S.
+Government End Users acquire Covered Code with only those rights set
+forth herein.
+
+13.2 Relationship of Parties. This License will not be construed as
+creating an agency, partnership, joint venture or any other form of
+legal association between or among You, Apple or any Contributor, and
+You will not represent to the contrary, whether expressly, by
+implication, appearance or otherwise.
+
+13.3 Independent Development. Nothing in this License will impair
+Apple's right to acquire, license, develop, have others develop for
+it, market and/or distribute technology or products that perform the
+same or similar functions as, or otherwise compete with,
+Modifications, Larger Works, technology or products that You may
+develop, produce, market or distribute.
+
+13.4 Waiver; Construction. Failure by Apple or any Contributor to
+enforce any provision of this License will not be deemed a waiver of
+future enforcement of that or any other provision. Any law or
+regulation which provides that the language of a contract shall be
+construed against the drafter will not apply to this License.
+
+13.5 Severability. (a) If for any reason a court of competent
+jurisdiction finds any provision of this License, or portion thereof,
+to be unenforceable, that provision of the License will be enforced to
+the maximum extent permissible so as to effect the economic benefits
+and intent of the parties, and the remainder of this License will
+continue in full force and effect. (b) Notwithstanding the foregoing,
+if applicable law prohibits or restricts You from fully and/or
+specifically complying with Sections 2 and/or 3 or prevents the
+enforceability of either of those Sections, this License will
+immediately terminate and You must immediately discontinue any use of
+the Covered Code and destroy all copies of it that are in your
+possession or control.
+
+13.6 Dispute Resolution. Any litigation or other dispute resolution
+between You and Apple relating to this License shall take place in the
+Northern District of California, and You and Apple hereby consent to
+the personal jurisdiction of, and venue in, the state and federal
+courts within that District with respect to this License. The
+application of the United Nations Convention on Contracts for the
+International Sale of Goods is expressly excluded.
+
+13.7 Entire Agreement; Governing Law. This License constitutes the
+entire agreement between the parties with respect to the subject
+matter hereof. This License shall be governed by the laws of the
+United States and the State of California, except that body of
+California law concerning conflicts of law.
+
+Where You are located in the province of Quebec, Canada, the following
+clause applies: The parties hereby confirm that they have requested
+that this License and all related documents be drafted in English. Les
+parties ont exige que le present contrat et tous les documents
+connexes soient rediges en anglais.
+
+EXHIBIT A.
+
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
+Reserved.
+
+This file contains Original Code and/or Modifications of Original Code
+as defined in and that are subject to the Apple Public Source License
+Version 2.0 (the 'License'). You may not use this file except in
+compliance with the License. Please obtain a copy of the License at
+http://www.opensource.apple.com/apsl/ and read it before using this
+file.
+
+The Original Code and all software distributed under the License are
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+Please see the License for the specific language governing rights and
+limitations under the License."
Index: trunk/ChameleonPrefPane/Sources/process.cpp
===================================================================
--- trunk/ChameleonPrefPane/Sources/process.cpp (revision 0)
+++ trunk/ChameleonPrefPane/Sources/process.cpp (revision 9)
@@ -0,0 +1,178 @@
+/*
+ * shell_process.cpp
+ *
+ * Created by Rekursor on 1/17/2010.
+ *
+ */
+
+#include "process.h"
+#include
+
+//----------------------------------------------------------------
+// portable open process:
+FILE * ShellProcess::open(const char *cmd, const char *mode) {
+ _fpt=::popen(cmd,mode);
+ return _fpt;
+}
+
+//----------------------------------------------------------------
+int ShellProcess::close() {
+ int ret = ::pclose(_fpt);
+ _fpt=NULL;
+ return ret;
+}
+
+//----------------------------------------------------------------
+void PartitionInfo::removeSpaces(std::string &str)
+{
+ if (!str.size()) return;
+ int posl=0,posr=0;
+ for (posl=0; posl0 && str[posr]==' '; posr--);
+ str = (posl>posr) ? "" : str.substr(posl, posr-posl+1);
+}
+//----------------------------------------------------------------
+/**
+ * return the image index corresponding to a fs:
+ */
+int PartitionInfo::indexFromFs() const
+{
+ if (_fsType.find("Apple")!=std::string::npos ||
+ _fsType.find("HFS")!=std::string::npos)
+ return 0; // Windows
+ else if (_fsType.find("Windows")!=std::string::npos ||
+ _fsType.find("NTFS")!=std::string::npos ||
+ _fsType.find("FAT")!=std::string::npos)
+ return 1; // Windows
+ else if (_fsType.find("Linux")!=std::string::npos)
+ return 2; // Unknown
+ return 10; //Unknown
+
+}
+//----------------------------------------------------------------
+bool PartitionInfo::fromPartitionHdString(const char * inHdStr)
+{
+ if (!inHdStr || !(*inHdStr) ||
+ strlen(inHdStr)<7 || !strstr(inHdStr,"hd(")) return false;
+
+ // enhance me here: should not assume that we have less than 10 partitions per disk/ disks
+ _disk = inHdStr[3]-'0';
+ _part = inHdStr[5]-'0';
+ return true;
+}
+//----------------------------------------------------------------
+const char * PartitionExtractor::checkForRename(const char * label, const char *szHd)
+{
+ const int MAX_ALIAS_SIZE=31;
+ static char szAlias[MAX_ALIAS_SIZE+1];
+ char *q=szAlias;
+ const char* szAliases = _renamedParts.c_str();
+
+ if (!szHd || !*szHd || !szAliases || !*szAliases) return label; // no renaming wanted
+
+ const char * p = strstr(szAliases, szHd);
+ if(!p || !(*p)) return label; // this volume must not be renamed, or option is malformed
+
+ p+= strlen(szHd); // skip the "hd(n,m) " field
+ // multiple aliases can be found separated by a semi-column
+ while(*p && *p != ';' && q<(szAlias+MAX_ALIAS_SIZE)) *q++=*p++;
+ *q='\0';
+
+ return szAlias;
+
+}
+//----------------------------------------------------------------
+const std::vector&
+PartitionExtractor::extractPartitions(const char* szHide, const char* szRenamed)
+{
+ const char * const diskTag = "/dev/disk";
+ const char * const nameTag = "NAME";
+ const char * const sizeTag = "SIZE";
+
+ PartitionInfo partInfo;
+
+ char line[1024]="";
+ char label[32]="", fsType[32]="" ;
+ size_t len=0;
+ int disk =0, part=0;
+ int label_pos=0, size_pos=0;
+ char * p=0,*q=0;
+ int skipwhite=0;
+
+ _partList.clear();
+ if (szHide) hidePartitions(szHide);
+ if (szRenamed) renamedPartitions(szRenamed);
+ this->open("diskutil list");
+
+ while(get_line(line, sizeof(line)-1))
+ {
+ // printf("%s\n",line);
+ len = strlen(line);
+ for(skipwhite=0; line[skipwhite]==' ';skipwhite++);
+
+ const char * sdisk = strstr(line, diskTag);
+ const char * sName = strstr(line, nameTag);
+ const char * sSize = strstr(line, sizeTag);
+
+ if (sdisk)
+ {
+ // extract disk number
+ disk= sdisk[strlen(diskTag)]-'0';
+ if (disk>=0 && disk =0 if a match happens
+ */
+int PartitionExtractor::getIndexFromHdStringSpec(const char* inHDStr)
+{
+ PartitionInfo info;
+
+ if (info.fromPartitionHdString(inHDStr)) // try decode the partition disk and part infos
+ {
+ for (int i=0; i<_partList.size(); i++)
+ {
+ if (_partList[i].disk() == info.disk() && _partList[i].partition() == info.partition())
+ return i;
+ }
+ }
+
+ return -1;
+}
Index: trunk/ChameleonPrefPane/Sources/property_list.cpp
===================================================================
--- trunk/ChameleonPrefPane/Sources/property_list.cpp (revision 0)
+++ trunk/ChameleonPrefPane/Sources/property_list.cpp (revision 9)
@@ -0,0 +1,332 @@
+/*
+ * property_list.cpp
+ *
+ * Created by Rekursor on 1/17/10.
+ *
+ */
+
+#include "property_list.h"
+#include
+
+/****************************************************************************/
+/**
+ * Simple parsing and splitting args function, does handle env. vars
+ */
+static void parseArgs(const char * args, const char* argv[], int argvlen)
+{
+ // Create a list of args fron the space delimited args parameters
+ int n=0;
+ if (args && *args)
+ {
+ bool skipSpaces = true;
+ bool prevCharwasDelim =false;
+ char * buf = strdup(args);
+ char lastPriorityDelim=' ';
+
+ printf("Parsing <%s>\n", args);
+
+ int k=0;
+ for (int i=0; i< strlen(args); i++)
+ {
+ switch (args[i])
+ {
+ case ' ': case '\t':
+ if(!skipSpaces) {
+ buf[k++]=args[i];
+ }
+ else {
+ prevCharwasDelim = true; // // keep a track of delim to further split tokens
+ }
+ break;
+ case '\0':
+ case '\'':
+ case '"':
+ if (!skipSpaces &&lastPriorityDelim!=args[i])
+ { // consider the imbricated delim as a simple char
+ buf[k++]=args[i];
+ break;
+ }
+
+ if (!skipSpaces) // end of priority substr
+ {
+ skipSpaces = true;
+ lastPriorityDelim=' ';
+ buf[k]='\0';
+ argv[n++]=strdup(buf); // copy the priority substr
+ k=0; // reset the buf index for next token
+ buf[0]='\0';
+ }
+ else
+ { // start of priority substr
+ skipSpaces=false;
+ lastPriorityDelim=args[i];
+ if(k>0) // previous string to store first
+ {
+ buf[k++]='\0'; // finish the substr
+ argv[n++]=strdup(buf); // copy the substr
+ k=0; // rest the index for next token
+ buf[0]='\0';
+ }
+ //if (args[i] !='\0') buf[k++] = args[i]; // start the new priority substr
+ }
+ break;
+ default: // non delimiters chars
+ if(skipSpaces && prevCharwasDelim)
+ {
+ if(k>0) // a previous substr was before the space
+ { // store previous token
+ buf[k++]='\0'; // finish the substr
+ argv[n++]=strdup(buf); // copy the substr
+ k=0; // rest the index for next token
+ buf[0]='\0';
+ }
+ }
+ prevCharwasDelim = false;
+ buf[k++]=args[i];
+ break;
+ }
+ }
+
+ if(*buf)
+ {
+ buf[k]='\0';
+ argv[n++]=strdup(buf); // copy the last buffer
+ }
+ free((void*) buf);
+ }
+ argv[n]=NULL;
+}
+
+/****************************************************************************/
+ bool executePrivilegedCmd(AuthorizationRef auth,
+ const char* pathToTool,
+ const char* args,
+ AuthorizationFlags flags)
+{
+ const char * argv[16];
+
+ parseArgs(args, argv, sizeof(argv)/sizeof(const char*));
+
+ // Execute Cmd
+ OSStatus status = AuthorizationExecuteWithPrivileges(auth, pathToTool,flags, (char**)argv, NULL);
+
+
+ // Cleanup mem
+ for (int i=0; argv[i]; i++) free ((void*) argv[i]);
+
+ return status ? false : true;
+}
+
+
+/****************************************************************************/
+/**
+ * Write a property list from a file
+ */
+bool WritePropertyListToFile( CFPropertyListRef propertyList, CFURLRef fileURL )
+{
+ CFDataRef xmlData;
+ Boolean status;
+ SInt32 errorCode;
+
+ // Convert the property list into XML data.
+ xmlData = CFPropertyListCreateXMLData( kCFAllocatorDefault, propertyList );
+
+ // Write the XML data to the file.
+ status = CFURLWriteDataAndPropertiesToResource (
+ fileURL, // URL to use
+ xmlData, // data to write
+ NULL,
+ &errorCode);
+ CFRelease(xmlData);
+
+ return status ? true: false;
+}
+
+/****************************************************************************/
+/**
+ * Read a property list from a file
+ */
+static CFPropertyListRef CreatePropertyListFromFile( CFURLRef fileURL, CFStringRef * errorString ) {
+ CFPropertyListRef propertyList;
+ CFDataRef resourceData;
+ Boolean status;
+ SInt32 errorCode;
+
+ // Read the XML file.
+ status = CFURLCreateDataAndPropertiesFromResource(
+ kCFAllocatorDefault,
+ fileURL,
+ &resourceData, // place to put file data
+ NULL,
+ NULL,
+ &errorCode);
+ if (!status) return NULL;
+
+ // Reconstitute the dictionary using the XML data.
+ propertyList = CFPropertyListCreateFromXMLData( kCFAllocatorDefault,
+ resourceData,
+ kCFPropertyListMutableContainersAndLeaves,
+ errorString);
+
+
+ CFRelease( resourceData );
+ return propertyList;
+}
+
+/****************************************************************************/
+static void show(CFStringRef formatString, ...) {
+ CFStringRef resultString;
+ CFDataRef data;
+ va_list argList;
+
+ va_start(argList, formatString);
+ resultString = CFStringCreateWithFormatAndArguments(NULL, NULL, formatString, argList);
+ va_end(argList);
+
+ data = CFStringCreateExternalRepresentation(NULL, resultString, CFStringGetSystemEncoding(), '?');
+
+ if (data != NULL) {
+ printf ("%.*s\n\n", (int)CFDataGetLength(data), CFDataGetBytePtr(data));
+ CFRelease(data);
+ }
+
+ CFRelease(resultString);
+}
+/****************************************************************************/
+/*
+ * Always return a valid static const string, if the CFSTR is not valid, then we return ""
+ */
+static const char * CfsToCs(CFStringRef inRef)
+{
+ static char buffer[512]="";
+ if(CFStringGetFileSystemRepresentation (inRef, buffer, sizeof(buffer)))
+ return buffer;
+ return "";
+}
+
+/****************************************************************************/
+/**
+ * Creates a PropertyList Incstance
+ */
+PropertyList::~PropertyList()
+{
+ if (_CFURLRef) CFRelease(_CFURLRef);
+ if (_proplistRef) CFRelease(_proplistRef);
+
+}
+
+/****************************************************************************/
+/**
+ * Open a properlist from a path name
+ */
+bool PropertyList::open(const char * path, CFStringRef * errorString, AuthorizationRef auth, AuthorizationFlags flags)
+{
+ bool ret = false;
+
+ if (!path || !*path) return false;
+
+ if (auth)
+ { // give write temporary write rights to the file
+ std::string args = " 0777 "+ _propFilePath;
+ if(!executePrivilegedCmd(auth, "/bin/chmod", args.c_str(), flags))
+ return false;
+ }
+
+ _propFilePath = path;
+
+ CFStringRef cfPath = CFStringCreateWithCString (kCFAllocatorDefault, path, kCFStringEncodingUTF8);
+ CFURLRef inURL = CFURLCreateWithFileSystemPath( kCFAllocatorDefault,
+ cfPath,
+ kCFURLPOSIXPathStyle, // interpret as POSIX path
+ false ); // is it a directory?
+ CFRelease(cfPath);
+ if (_CFURLRef) CFRelease(_CFURLRef);
+ _CFURLRef = inURL;
+
+ if (_CFURLRef)
+ {
+ _proplistRef = CreatePropertyListFromFile(inURL, errorString);
+
+ if (_proplistRef)
+ ret= true;
+ }
+ if (auth)
+ { // give write temporary write rights to the file
+ std::string args = " 0644 "+ _propFilePath;
+ if(!executePrivilegedCmd(auth, "/bin/chmod", args.c_str(), flags))
+ ret= false;
+ }
+
+ return ret;
+}
+
+/****************************************************************************/
+/**
+ * Save the current property list
+ */
+bool PropertyList::save(AuthorizationRef auth, AuthorizationFlags flags)
+{
+ bool ret=false;
+ if (auth)
+ { // give write temporary write rights to the file
+ std::string args = " 0777 "+ _propFilePath;
+ if(!executePrivilegedCmd(auth, "/bin/chmod", args.c_str(), flags))
+ return false;
+ }
+ if (_proplistRef && _CFURLRef)
+ ret= WritePropertyListToFile(_proplistRef,_CFURLRef);
+ if (auth)
+ { // give write temporary write rights to the file
+ std::string args = " 0644 "+ _propFilePath;
+ if(!executePrivilegedCmd(auth, "/bin/chmod", args.c_str(), flags))
+ return false;
+ }
+ return ret;
+}
+
+/****************************************************************************/
+/**
+ * Extract a sring value from a property list key,
+ * value returned is not owned by caller, copy it necessary.
+ */
+const char * PropertyList::getStringForKey(const char *key)
+{
+ if (!_proplistRef) return 0;
+ CFDictionaryRef myDict =
+ (CFGetTypeID(_proplistRef) == CFDictionaryGetTypeID()) ? (CFDictionaryRef) _proplistRef : NULL;
+ CFStringRef cfKey = CFStringCreateWithCString (kCFAllocatorDefault, key, kCFStringEncodingUTF8);
+ CFStringRef myString;
+
+ if (myDict && CFDictionaryGetValueIfPresent(myDict, cfKey, (const void **) &myString))
+ {
+ // show(CFSTR("Key '%@' found , value = <%@>\n"), cfKey, !myString ? CFSTR("") : myString);
+ CFRelease(cfKey);
+ return CfsToCs(myString);
+ }
+
+ if(cfKey) CFRelease(cfKey);
+ return NULL;
+}
+/****************************************************************************/
+/**
+ * replace a sring value from a property list key,
+ * value returned is not owned by caller, copy it necessary.
+ */
+bool PropertyList::setStringForKey(const char *key, const char * value)
+{
+ if (!_proplistRef) return false;
+ bool ret = false;
+ CFMutableDictionaryRef myDict =
+ (CFGetTypeID(_proplistRef) == CFDictionaryGetTypeID()) ? (CFMutableDictionaryRef) _proplistRef : NULL;
+ CFStringRef cfKey = CFStringCreateWithCString (kCFAllocatorDefault, key, kCFStringEncodingUTF8);
+ CFStringRef myString = CFStringCreateWithCString (kCFAllocatorDefault, value, kCFStringEncodingUTF8);
+
+ if (myDict) {
+ CFDictionaryReplaceValue(myDict, cfKey, myString);
+ ret=true;
+ }
+ if(cfKey) CFRelease(cfKey);
+ if(myString) CFRelease(myString);
+ return ret;
+}
+
Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h
===================================================================
--- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 0)
+++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.h (revision 9)
@@ -0,0 +1,57 @@
+//
+// ChameleonPrefPane.h
+// ChameleonPrefPane
+//
+// Created by Rekursor on 1/16/10.
+//
+
+#import
+#import
+#import
+
+@interface ChameleonPrefPane : NSPreferencePane
+{
+@public
+ // Objects corresponding to the interface mapping:
+ IBOutlet NSTableView * mPartitionsTable;
+ IBOutlet NSTableColumn * mPartitionImgColumn;
+ IBOutlet NSTableColumn * mFileSystemColumn;
+ IBOutlet NSTableColumn * mPartitionNameColumn;
+ IBOutlet NSTableColumn * mPartitionIDColumn;
+ IBOutlet NSButton * mResetButton;
+ IBOutlet NSButton * mSwapHD01;
+ IBOutlet NSButton * mSwapHD02;
+ IBOutlet NSTextField* mStatusText;
+ IBOutlet NSBox* mOptions;
+
+ IBOutlet SFAuthorizationView *authView;
+ IBOutlet NSButton *touchButton;
+
+ NSImage * mMacOSXImage;
+ NSImage * mWindowsImage;
+ NSImage * mLinuxImage;
+ NSImage * mUnknownImage;
+ NSMutableDictionary *mOptionsDict;
+ NSString * mOptionsPlistPath;
+}
+
+
+- (void)awakeFromNib;
+- (void)initBootConfig;
+- (id) getImageResource: (NSString *) str ofType: (NSString*) sType;
+
+//- (void) mainViewDidLoad;
+- (void)tableViewSelectionDidChange:(NSNotification *)notification;
+- (void) selectDefaultPartition;
+
+- (IBAction)onRestart: (id)sender;
+- (IBAction)onSwapHD: (id)sender;
+
+- (BOOL)isUnlocked;
+- (void) refreshLockStates;
+- (void) doSwapHD: (int) val save: (bool) doSave src: (int)isrc dst: (int) idst;
+- (void)tableViewSelectionDidChange:(NSNotification *)notification;
+
+- (void) swapDisks: (bool) bSwap src: (int) iSrc dst: (int) iDst;
+
+@end
Index: trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
===================================================================
--- trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 0)
+++ trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm (revision 9)
@@ -0,0 +1,369 @@
+//
+// StartupPrefPanePref.m
+//
+// Created by Rekursor on 1/16/10.
+//
+
+#import "ChameleonPrefPane.h"
+
+#include
+#include
+#include
+
+//--------------------------------------------------------------------------
+// Constants
+//--------------------------------------------------------------------------
+static const char * const szBootPaths[]= {
+ "/",
+ "/Extra/",
+ "/Volumes/EFI/Extra/",
+ "/Volumes/Cham/Extra/",
+ "/Volumes/BootLoaders/Extra/",
+ "/Volumes/RX0/Extra/",
+ "/Library/Preferences/SystemConfiguration/",
+ NULL
+};
+
+static const char* const szPropFileName = "com.apple.Boot.plist";
+static const char* const kDefaultPartition = "Default Partition";
+static const char* const kHidePartition = "Hide Partition";
+static const char* const kRenamePartition = "Rename Partition";
+//--------------------------------------------------------------------------
+// Static file variables
+//--------------------------------------------------------------------------
+static std::string sCurrentDefaultPartition;
+
+static PartitionExtractor * partExtractor=NULL;
+static PropertyList * prop = NULL;
+static int currentRowSel = -1;
+//--------------------------------------------------------------------------
+
+@implementation ChameleonPrefPane
+
+//--------------------------------------------------------------------------
+/**
+ * SFAuthorization delegates
+ */
+- (void)authorizationViewDidAuthorize:(SFAuthorizationView *)view {
+ [self selectDefaultPartition];
+ [self refreshLockStates];
+
+}
+
+//--------------------------------------------------------------------------
+- (void)authorizationViewDidDeauthorize:(SFAuthorizationView *)view {
+ [self refreshLockStates];
+}
+
+//--------------------------------------------------------------------------
+- (void) refreshLockStates
+{
+ [mPartitionsTable setEnabled:[self isUnlocked]];
+ [mSwapHD01 setEnabled:[self isUnlocked]];
+ [mSwapHD02 setEnabled:[self isUnlocked]];
+ [mStatusText setEnabled:[self isUnlocked]];
+}
+
+//--------------------------------------------------------------------------
+- (BOOL)isUnlocked
+{
+ return [authView authorizationState] == SFAuthorizationViewUnlockedState;
+}
+
+//--------------------------------------------------------------------------
+- (id) getImageResource: (NSString *) str ofType: (NSString*) sType
+{
+ NSImage * img=nil;
+ if(!str) return nil;
+ NSBundle * b = [NSBundle bundleForClass:[self class]];
+ NSString* sRes = [b pathForResource: str ofType:sType ];
+ img = [[NSImage alloc] initWithContentsOfFile: sRes];
+ return img;
+}
+//--------------------------------------------------------------------------
+- (id) init
+{
+ self = [super init];
+
+ // set the image to display the current file being played
+ mMacOSXImage = [self getImageResource: @"MacOSX" ofType: @"tiff"];
+ mWindowsImage = [self getImageResource: @"Windows" ofType: @"tiff"];
+ mLinuxImage = [self getImageResource: @"Linux" ofType: @"tiff"];
+ mUnknownImage = [self getImageResource: @"Unknown" ofType: @"tiff"];
+
+
+ // Retrieve the Info.plist file info
+ NSBundle * b = [NSBundle bundleForClass:[self class]];
+ // Careful here : we must create copies of the path and dict for later use
+ // other wise it would be released...
+ mOptionsPlistPath = [[NSString alloc] initWithString: [b pathForResource: @"Data" ofType:@"plist"]];
+ NSMutableDictionary * d = [NSMutableDictionary dictionaryWithContentsOfFile: mOptionsPlistPath];
+ mOptionsDict = [[NSMutableDictionary alloc] initWithCapacity:64 ];
+ [mOptionsDict addEntriesFromDictionary: d];
+
+ if (!mOptionsDict) NSLog(@"Error reading plist: %@", mOptionsPlistPath);
+ return self;
+}
+
+//--------------------------------------------------------------------------
+/** When called here, all outlets references are initialized */
+- (void)awakeFromNib
+{ // called more than once, we only need one resource init
+ static bool ft=true;
+ if(ft)
+ {
+ ft=false;
+ [self initBootConfig];
+ }
+}
+
+//--------------------------------------------------------------------------
+- (void) initBootConfig
+{
+ static bool ft=true;
+
+ // Cosmetics setup
+ // Setup security for changing boot options
+ AuthorizationItem items = {kAuthorizationRightExecute, 0, NULL, 0};
+ AuthorizationRights rights = {1, &items};
+
+ [authView setAuthorizationRights:&rights];
+ authView.delegate = self;
+ [authView updateStatus:nil];
+
+ // create the propertylist object that will handle com.apple.Boot.plist
+ if(!prop) prop = new PropertyList();
+
+ // create the process that will extract the diskutil list infos
+ if(!partExtractor) partExtractor = new PartitionExtractor();
+
+ if (!prop->isValid())
+ {
+ std::string sPath;
+ AuthorizationRef auth = [self isUnlocked] ? [[authView authorization] authorizationRef] : NULL;
+ CFStringRef errorString=NULL;
+ bool cont =true;
+
+ id sForcedPath = [mOptionsDict valueForKey: @"forceBootConfigPath"];
+ const char * szForcedPath = sForcedPath!=nil ? [sForcedPath UTF8String] : NULL;
+ if (szForcedPath && *szForcedPath)
+ {
+ cont = !prop->open(szForcedPath, &errorString, auth);
+ }
+ else {
+ for(int i=0; szBootPaths[i] && cont; i++)
+ {
+ sPath = szBootPaths[i];
+ sPath += szPropFileName;
+ cont = !prop->open(sPath.c_str(), &errorString, auth);
+ }
+ }
+ if (cont)
+ {
+ if(!ft) return;
+ ft=false;
+ [mStatusText setTextColor: [NSColor redColor] ];
+ if (errorString)
+ [mStatusText setStringValue:[NSString stringWithFormat: @"Error while parsing com.apple.Boot.plist : %@",
+ errorString] ];
+ else
+ [mStatusText setStringValue: @"Error while searching for com.apple.Boot.plist"];
+
+ }
+ else
+ {
+ [mStatusText setTextColor: [NSColor grayColor] ];
+ NSString* ns = [ [NSString alloc] initWithUTF8String:prop->bootConfigPath() ];
+ [mStatusText setStringValue: [NSString stringWithFormat: @"bootConfig: %@", ns] ];
+ }
+ if (prop->isValid())
+ {
+ // read options in the plist file
+
+ partExtractor->hidePartitions(prop->getStringForKey(kHidePartition));
+ partExtractor->renamedPartitions(prop->getStringForKey(kRenamePartition));
+
+ // partExtractor->resetSwapping();
+ id val = [mOptionsDict valueForKey:@"swapHD01"];
+ [mSwapHD01 setIntValue: [val intValue] ];
+ [self doSwapHD: [val boolValue] save: false src:0 dst:1];
+
+ val = [mOptionsDict valueForKey:@"swapHD02"];
+ [mSwapHD02 setIntValue: [val intValue] ];
+ [self doSwapHD: [val boolValue] save: false src:0 dst:2];
+
+ [self selectDefaultPartition];
+ }
+
+ }
+}
+//--------------------------------------------------------------------------
+- (void) selectDefaultPartition
+{
+ if(!authView) return;
+
+ [self refreshLockStates];
+
+ // try to get the current default partition if any
+ if(partExtractor && prop && prop->isValid())
+ {
+ const char *sdp = prop->getStringForKey(kDefaultPartition);
+ sCurrentDefaultPartition = sdp ? sdp : "";
+ if (sCurrentDefaultPartition.size())
+ {
+ int index = partExtractor->getIndexFromHdStringSpec(sCurrentDefaultPartition.c_str());
+ if (index>=0)
+ {
+ [mPartitionsTable selectRowIndexes:
+ [NSIndexSet indexSetWithIndex:index] byExtendingSelection:NO];
+ currentRowSel = index;
+ }
+ }
+ }
+
+}
+
+//--------------------------------------------------------------------------
+- (void) swapDisks: (bool) bSwap src: (int) iSrc dst: (int) iDst;
+{
+ if(!partExtractor || !prop || !prop->isValid()) return;
+ if (bSwap)
+ {
+ partExtractor->swapHD(iSrc, iDst);
+ }
+ partExtractor->extractPartitions();
+ [ self selectDefaultPartition];
+
+}
+
+//--------------------------------------------------------------------------
+- (void) doSwapHD: (int) val save: (bool) doSave src: (int) isrc dst: (int) idst
+{
+
+ if( val>0) //on
+ {
+ [self swapDisks: true src:isrc dst:idst ];
+ }
+ else
+ {
+ [self swapDisks: false src:isrc dst:idst ];
+ }
+
+ if(doSave)
+ {
+ if (! [ mOptionsDict fileIsImmutable] )
+ {
+ if (isrc==0 && idst==1)
+ [mOptionsDict setObject: [NSNumber numberWithBool: val ? true : false] forKey:@"swapHD01"];
+ if (isrc==0 && idst==2)
+ [mOptionsDict setObject: [NSNumber numberWithBool: val ? true : false] forKey:@"swapHD02"];
+ [mOptionsDict writeToFile:mOptionsPlistPath atomically:YES];
+ }
+ }
+
+ [mPartitionsTable reloadData];
+ [mPartitionsTable scrollRowToVisible: 0];
+ //[self tableViewSelectionDidChange: nil];
+
+}
+//--------------------------------------------------------------------------
+- (IBAction)onSwapHD: (id)sender
+{
+ partExtractor->resetSwapping();
+ [self doSwapHD: !![mSwapHD01 intValue] save:true src:0 dst:1];
+ [self doSwapHD: !![mSwapHD02 intValue] save:true src:0 dst:2];
+}
+
+//--------------------------------------------------------------------------
+- (IBAction)onRestart: (id)sender
+{
+ NSInteger n = NSRunAlertPanel(@"Restarting OS X",
+ @"Are you sure you want to restart now ?",
+ @"OK", @"Cancel", /*ThirdButtonHere:*/nil
+ /*, args for a printf-style msg go here */);
+ if (n==1)
+ {
+ AuthorizationRef auth = [self isUnlocked] ? [[authView authorization] authorizationRef] : NULL;
+ // executePrivilegedCmd(auth,"/sbin/reboot");
+ // following DieBuch recommendation (thanks!):
+ executePrivilegedCmd(auth,"/usr/bin/osascript","-e 'tell application \"System Events\" to restart'");
+ }
+
+}
+
+//--------------------------------------------------------------------------
+- (void)tableViewSelectionDidChange:(NSNotification *)notification {
+
+ NSTableView* tv= mPartitionsTable;
+ if ([tv selectedRow] != currentRowSel)
+ {
+ currentRowSel = [tv selectedRow];
+ if (currentRowSel>=0)
+ {
+ const std::vector& partInfo = partExtractor->partList();
+ char hd[7+1]="hd(n,m)";
+ hd[3]= ('0'+partInfo[currentRowSel].disk());
+ hd[5]= ('0'+partInfo[currentRowSel].partition());
+ AuthorizationRef auth= [self isUnlocked] ? [[authView authorization] authorizationRef] : NULL;
+ if(prop->setStringForKey(kDefaultPartition, hd))
+ prop->save(auth);
+ }
+ }
+
+}
+
+//--------------------------------------------------------------------------
+- (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView
+{
+ return partExtractor ? partExtractor->partList().size() : 0;
+}
+
+//--------------------------------------------------------------------------
+- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
+{
+ id ret=nil;
+
+ const std::vector& partInfo = partExtractor->partList();
+
+ if (tableColumn == mPartitionImgColumn)
+ {
+ switch(partInfo[row].indexFromFs())
+ {
+ case 0:
+ ret = mMacOSXImage;
+ break;
+ case 1:
+ ret = mWindowsImage;
+ break;
+ case 2:
+ ret = mLinuxImage;
+ break;
+ defualt:
+ ret = mUnknownImage;
+ break;
+
+ }
+ }
+ if (tableColumn == mFileSystemColumn)
+ {
+ ret = [NSString stringWithFormat: @"%s", partInfo[row].fsType().c_str() ];
+ }
+ else if (tableColumn == mPartitionNameColumn)
+ {
+ ret = [NSString stringWithFormat: @"%s",
+ partInfo[row].label().c_str()
+ ];
+ }
+ else if (tableColumn == mPartitionIDColumn)
+ {
+ ret= [NSString stringWithFormat: @"hd(%d,%d)",
+ partInfo[row].disk(),
+ partInfo[row].partition()
+ ];
+ }
+
+ return ret;
+}
+//--------------------------------------------------------------------------
+
+@end
Index: trunk/ChameleonPrefPane/Sources/process.h
===================================================================
--- trunk/ChameleonPrefPane/Sources/process.h (revision 0)
+++ trunk/ChameleonPrefPane/Sources/process.h (revision 9)
@@ -0,0 +1,127 @@
+/*
+ * shell_process.h
+ *
+ * Created by Rekursor on 1/17/2010.
+ *
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+//----------------------------------------------------------------
+const int MAX_HD = 10;
+
+//----------------------------------------------------------------
+class ShellProcess
+{
+public:
+ // construction / destruction
+ ShellProcess() {_fpt= NULL;}
+ ~ShellProcess() {if (_fpt) close();}
+
+ FILE * open (const char *cmd, const char *mode="r");
+ int close();
+ FILE * desc() const { return _fpt;} // non null if file is open
+ char * get_line(char * line, size_t s) const {return _fpt ? fgets(line, s, _fpt) : NULL;}
+
+protected:
+ FILE * _fpt;
+};
+
+//----------------------------------------------------------------
+class PartitionInfo
+{
+public:
+ PartitionInfo() : _disk(0), _part(0) {}
+ PartitionInfo(int disk, int part) { set(disk, part);}
+
+ void disk(int disk) { _disk=disk;}
+ int disk() const { return _disk;}
+
+ void partition(int part) { _part=part;}
+ int partition () const { return _part;}
+
+ const std::string& label() const { return _label; }
+ void label(const char * l) {
+ if (l) _label = l;
+ removeSpaces(_label);
+ }
+
+ const std::string& fsType() const { return _fsType;}
+ void fsType(const char * fs) {
+ if (fs) _fsType = fs;
+ removeSpaces(_fsType);
+ }
+
+ void set(int disk, int part) { _disk =disk; _part = part;}
+ bool fromPartitionHdString(const char * inHdStr);
+ std::string toHdStr() const
+ {
+ std::string buf = "hd(n,m)";
+ buf[3]= '0'+disk();
+ buf[5]='0'+partition();
+ return buf;
+ }
+
+ int indexFromFs() const;
+protected:
+ void removeSpaces(std::string & s);
+
+private:
+ int _disk, _part;
+ std::string _fsType, _label;
+};
+
+static inline bool isDiskIndexInf(PartitionInfo i, PartitionInfo j)
+{
+ return ((i.disk()*100+i.partition()) < (j.disk()*100 + j.partition()) ) ;
+}
+
+//----------------------------------------------------------------
+class PartitionExtractor : public ShellProcess
+{
+public:
+ PartitionExtractor() : ShellProcess() { init(); }
+
+ const std::vector& extractPartitions(
+ const char* szHide=NULL,
+ const char* szRenamed=NULL);
+ int getListCount() const {return (int) _partList.size();}
+
+ const std::vector& partList() const
+ {
+ return _partList;
+ }
+ // get the index in the internal partlist of the hd(n,m) partition specified by the input string
+ // return -1 if no match, >=0 if a match happens
+ int getIndexFromHdStringSpec(const char*);
+
+ void hidePartitions(const char* szParts){ _hiddenParts = (szParts ? szParts : "");}
+ void renamedPartitions(const char* szParts){ _renamedParts = (szParts ? szParts : "");}
+ const char * checkForRename(const char * label, const char* szHd);
+
+ void swapHD(int src, int dst)
+ {
+ if(src < 0 || src > MAX_HD-1 || dst < 0 || dst > MAX_HD-1) return;
+ _hdRedirTable[src]=dst;
+ _hdRedirTable[dst]=src;
+ }
+
+ void resetSwapping() { init();}
+
+protected:
+ void init() {
+ for (int i=0; i _partList;
+ int _hdRedirTable[MAX_HD];
+ std::string _hiddenParts;
+ std::string _renamedParts;
+
+};
Index: trunk/ChameleonPrefPane/Sources/property_list.h
===================================================================
--- trunk/ChameleonPrefPane/Sources/property_list.h (revision 0)
+++ trunk/ChameleonPrefPane/Sources/property_list.h (revision 9)
@@ -0,0 +1,51 @@
+/*
+ * property_list.h
+ *
+ * Created by Rekursor on 1/17/10.
+ *
+ */
+
+#include
+#include
+#include
+#include
+
+/****************************************************************/
+
+/**
+ * priviledged command run for cmds like property chmods and restard command
+ */
+bool executePrivilegedCmd(AuthorizationRef auth,
+ const char* pathToTool,
+ const char* args=NULL,
+ AuthorizationFlags flags=kAuthorizationFlagDefaults);
+
+/****************************************************************/
+
+/**
+ * Simple PropertyList Abstraction
+ */
+class PropertyList
+{
+
+public:
+ PropertyList() : _proplistRef(0), _CFURLRef(0) { }
+ virtual ~PropertyList();
+
+ bool open(const char *propListPath, CFStringRef* errString,
+ AuthorizationRef auth=NULL, AuthorizationFlags flags=kAuthorizationFlagDefaults);
+ bool save(AuthorizationRef auth=NULL, AuthorizationFlags flags=kAuthorizationFlagDefaults);
+ bool isValid() const { return _proplistRef!=NULL;}
+
+ const char * getStringForKey(const char *key);
+ bool setStringForKey(const char* key, const char* value);
+ const char * bootConfigPath() const {
+ return _propFilePath.c_str();
+ }
+
+private:
+ CFPropertyListRef _proplistRef;
+ CFURLRef _CFURLRef;
+ std::string _propFilePath; // keep a track of the proplist filename
+};
+
Index: trunk/ChameleonPrefPane/Info.plist
===================================================================
--- trunk/ChameleonPrefPane/Info.plist (revision 0)
+++ trunk/ChameleonPrefPane/Info.plist (revision 9)
@@ -0,0 +1,34 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ ${EXECUTABLE_NAME}
+ CFBundleIconFile
+ Chameleon.icns
+ CFBundleIdentifier
+ com.chameleon.${PRODUCT_NAME:identifier}
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ ${PRODUCT_NAME}
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ NSMainNibFile
+ Chameleon
+ NSPrefPaneIconFile
+ Chameleon.tiff
+ NSPrefPaneIconLabel
+ Chameleon
+ NSPrincipalClass
+ ChameleonPrefPane
+
+
Index: trunk/ChameleonPrefPane/CHANGES
===================================================================
--- trunk/ChameleonPrefPane/CHANGES (revision 0)
+++ trunk/ChameleonPrefPane/CHANGES (revision 9)
@@ -0,0 +1,20 @@
+- Refined cosmetics for the GUI
+- Added images icon on the first column of each partition entries
+- Added APSL and README for instructions
+- Added swap disk (01 and 02) fixes
+- Added Rename and Hide display from bootConfig
+- Fixed 10.5 and 10.6 would crash because of memory references erased
+- Added more bootConfig paths and an option to force it
+ (i.e:if not found automatically)
+- Added new paths for bootConfig search now looking in this order:
+ "/",
+ "/Extra/",
+ "/Volumes/EFI/Extra/",
+ "/Volumes/Cham/Extra/",
+ "/Volumes/BootLoaders/Extra/",
+ "/Library/Preferences/SystemConfiguration/",
+- Change the restart by replacing the internal reboot shell cmd by an applescript
+ eq. to the AppleMenu/Restart command
+- Fixed nib file loading and initialization problem, possibly fixes the lock pb as well?
+- Added Apple_Free filter to filter these free partitions
+
Index: trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj
===================================================================
--- trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj (revision 0)
+++ trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj/project.pbxproj (revision 9)
@@ -0,0 +1,408 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 01396EF51106ADD500643ECF /* ChameleonPrefPane.h in Headers */ = {isa = PBXBuildFile; fileRef = 01396EEF1106ADD500643ECF /* ChameleonPrefPane.h */; };
+ 01396EF61106ADD500643ECF /* ChameleonPrefPane.mm in Sources */ = {isa = PBXBuildFile; fileRef = 01396EF01106ADD500643ECF /* ChameleonPrefPane.mm */; };
+ 01396EF71106ADD500643ECF /* process.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01396EF11106ADD500643ECF /* process.cpp */; };
+ 01396EF81106ADD500643ECF /* process.h in Headers */ = {isa = PBXBuildFile; fileRef = 01396EF21106ADD500643ECF /* process.h */; };
+ 01396EF91106ADD500643ECF /* property_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 01396EF31106ADD500643ECF /* property_list.cpp */; };
+ 01396EFA1106ADD500643ECF /* property_list.h in Headers */ = {isa = PBXBuildFile; fileRef = 01396EF41106ADD500643ECF /* property_list.h */; };
+ 01396F021106ADEA00643ECF /* cdrom.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 01396EFB1106ADEA00643ECF /* cdrom.tiff */; };
+ 01396F031106ADEA00643ECF /* Chameleon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 01396EFC1106ADEA00643ECF /* Chameleon.icns */; };
+ 01396F041106ADEA00643ECF /* Chameleon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 01396EFD1106ADEA00643ECF /* Chameleon.tiff */; };
+ 01396F051106ADEA00643ECF /* Data.plist in Resources */ = {isa = PBXBuildFile; fileRef = 01396EFE1106ADEA00643ECF /* Data.plist */; };
+ 01396F061106ADEA00643ECF /* Linux.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 01396EFF1106ADEA00643ECF /* Linux.tiff */; };
+ 01396F071106ADEA00643ECF /* MacOSX.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 01396F001106ADEA00643ECF /* MacOSX.tiff */; };
+ 01396F081106ADEA00643ECF /* Windows.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 01396F011106ADEA00643ECF /* Windows.tiff */; };
+ 01466A931104062500088464 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466A921104062500088464 /* Security.framework */; };
+ 01466C2A110408CC00088464 /* SecurityInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466C29110408CC00088464 /* SecurityInterface.framework */; };
+ 01466C381104091400088464 /* SecurityFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01466C371104091400088464 /* SecurityFoundation.framework */; };
+ 0196529B11066CC0009E8F2F /* README in Resources */ = {isa = PBXBuildFile; fileRef = 0196529A11066CC0009E8F2F /* README */; };
+ 01A40F75110550F4002A74CD /* CHANGES in Resources */ = {isa = PBXBuildFile; fileRef = 01A40F74110550F4002A74CD /* CHANGES */; };
+ 8D202CEA0486D31800D8A456 /* StartupPrefPane_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCFA20370C41700C91783 /* StartupPrefPane_Prefix.pch */; };
+ 8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
+ 8D202CEF0486D31800D8A456 /* Chameleon.xib in Resources */ = {isa = PBXBuildFile; fileRef = F506C042013D9D8C01CA16C8 /* Chameleon.xib */; };
+ 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
+ 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F506C035013D953901CA16C8 /* PreferencePanes.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 01396EEF1106ADD500643ECF /* ChameleonPrefPane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChameleonPrefPane.h; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/ChameleonPrefPane.h; sourceTree = SOURCE_ROOT; };
+ 01396EF01106ADD500643ECF /* ChameleonPrefPane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ChameleonPrefPane.mm; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/ChameleonPrefPane.mm; sourceTree = SOURCE_ROOT; };
+ 01396EF11106ADD500643ECF /* process.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = process.cpp; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/process.cpp; sourceTree = SOURCE_ROOT; };
+ 01396EF21106ADD500643ECF /* process.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = process.h; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/process.h; sourceTree = SOURCE_ROOT; };
+ 01396EF31106ADD500643ECF /* property_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = property_list.cpp; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/property_list.cpp; sourceTree = SOURCE_ROOT; };
+ 01396EF41106ADD500643ECF /* property_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = property_list.h; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Sources/property_list.h; sourceTree = SOURCE_ROOT; };
+ 01396EFB1106ADEA00643ECF /* cdrom.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = cdrom.tiff; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/cdrom.tiff; sourceTree = SOURCE_ROOT; };
+ 01396EFC1106ADEA00643ECF /* Chameleon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Chameleon.icns; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/Chameleon.icns; sourceTree = SOURCE_ROOT; };
+ 01396EFD1106ADEA00643ECF /* Chameleon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Chameleon.tiff; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/Chameleon.tiff; sourceTree = SOURCE_ROOT; };
+ 01396EFE1106ADEA00643ECF /* Data.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Data.plist; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/Data.plist; sourceTree = SOURCE_ROOT; };
+ 01396EFF1106ADEA00643ECF /* Linux.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Linux.tiff; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/Linux.tiff; sourceTree = SOURCE_ROOT; };
+ 01396F001106ADEA00643ECF /* MacOSX.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = MacOSX.tiff; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/MacOSX.tiff; sourceTree = SOURCE_ROOT; };
+ 01396F011106ADEA00643ECF /* Windows.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = Windows.tiff; path = ../../../../devl/OSX/chameleonApplications/ChameleonPrefPane/Resources/Windows.tiff; sourceTree = SOURCE_ROOT; };
+ 01466A921104062500088464 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
+ 01466C29110408CC00088464 /* SecurityInterface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityInterface.framework; path = System/Library/Frameworks/SecurityInterface.framework; sourceTree = SDKROOT; };
+ 01466C371104091400088464 /* SecurityFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SecurityFoundation.framework; path = System/Library/Frameworks/SecurityFoundation.framework; sourceTree = SDKROOT; };
+ 0196529A11066CC0009E8F2F /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; };
+ 01A40F74110550F4002A74CD /* CHANGES */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGES; sourceTree = ""; };
+ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; };
+ 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; };
+ 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; };
+ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; };
+ 32DBCFA20370C41700C91783 /* StartupPrefPane_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StartupPrefPane_Prefix.pch; sourceTree = ""; };
+ 8D202CF70486D31800D8A456 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; };
+ 8D202CF80486D31800D8A456 /* Chameleon.prefPane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Chameleon.prefPane; sourceTree = BUILT_PRODUCTS_DIR; };
+ F506C035013D953901CA16C8 /* PreferencePanes.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PreferencePanes.framework; path = /System/Library/Frameworks/PreferencePanes.framework; sourceTree = ""; };
+ F506C043013D9D8C01CA16C8 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/Chameleon.xib; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D202CF20486D31800D8A456 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D202CF30486D31800D8A456 /* Cocoa.framework in Frameworks */,
+ 8D202CF40486D31800D8A456 /* PreferencePanes.framework in Frameworks */,
+ 01466A931104062500088464 /* Security.framework in Frameworks */,
+ 01466C2A110408CC00088464 /* SecurityInterface.framework in Frameworks */,
+ 01466C381104091400088464 /* SecurityFoundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 089C166AFE841209C02AAC07 /* StartupPrefPane */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB77AFFE84173DC02AAC07 /* Classes */,
+ 32DBCFA10370C40200C91783 /* Other Sources */,
+ 089C167CFE841241C02AAC07 /* Resources */,
+ 089C1671FE841209C02AAC07 /* Frameworks and Libraries */,
+ 19C28FB8FE9D52D311CA2CBB /* Products */,
+ );
+ name = StartupPrefPane;
+ sourceTree = "";
+ };
+ 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */,
+ 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */,
+ );
+ name = "Frameworks and Libraries";
+ sourceTree = "";
+ };
+ 089C167CFE841241C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 01396EFB1106ADEA00643ECF /* cdrom.tiff */,
+ 01396EFC1106ADEA00643ECF /* Chameleon.icns */,
+ 01396EFD1106ADEA00643ECF /* Chameleon.tiff */,
+ 01396EFE1106ADEA00643ECF /* Data.plist */,
+ 01396EFF1106ADEA00643ECF /* Linux.tiff */,
+ 01396F001106ADEA00643ECF /* MacOSX.tiff */,
+ 01396F011106ADEA00643ECF /* Windows.tiff */,
+ 8D202CF70486D31800D8A456 /* Info.plist */,
+ 089C167DFE841241C02AAC07 /* InfoPlist.strings */,
+ F506C042013D9D8C01CA16C8 /* Chameleon.xib */,
+ );
+ name = Resources;
+ sourceTree = "";
+ };
+ 08FB77AFFE84173DC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 01396EEF1106ADD500643ECF /* ChameleonPrefPane.h */,
+ 01396EF01106ADD500643ECF /* ChameleonPrefPane.mm */,
+ 01396EF11106ADD500643ECF /* process.cpp */,
+ 01396EF21106ADD500643ECF /* process.h */,
+ 01396EF31106ADD500643ECF /* property_list.cpp */,
+ 01396EF41106ADD500643ECF /* property_list.h */,
+ );
+ name = Classes;
+ sourceTree = "";
+ };
+ 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */,
+ F506C035013D953901CA16C8 /* PreferencePanes.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "";
+ };
+ 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 089C1672FE841209C02AAC07 /* Foundation.framework */,
+ 089C167FFE841241C02AAC07 /* AppKit.framework */,
+ 01466A921104062500088464 /* Security.framework */,
+ 01466C29110408CC00088464 /* SecurityInterface.framework */,
+ 01466C371104091400088464 /* SecurityFoundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "";
+ };
+ 19C28FB8FE9D52D311CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D202CF80486D31800D8A456 /* Chameleon.prefPane */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 32DBCFA10370C40200C91783 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32DBCFA20370C41700C91783 /* StartupPrefPane_Prefix.pch */,
+ 01A40F74110550F4002A74CD /* CHANGES */,
+ 0196529A11066CC0009E8F2F /* README */,
+ );
+ name = "Other Sources";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 8D202CE90486D31800D8A456 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D202CEA0486D31800D8A456 /* StartupPrefPane_Prefix.pch in Headers */,
+ 01396EF51106ADD500643ECF /* ChameleonPrefPane.h in Headers */,
+ 01396EF81106ADD500643ECF /* process.h in Headers */,
+ 01396EFA1106ADD500643ECF /* property_list.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 8D202CE80486D31800D8A456 /* CStartup */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DBD214808BA80EA00186707 /* Build configuration list for PBXNativeTarget "CStartup" */;
+ buildPhases = (
+ 8D202CE90486D31800D8A456 /* Headers */,
+ 8D202CEC0486D31800D8A456 /* Resources */,
+ 8D202CF00486D31800D8A456 /* Sources */,
+ 8D202CF20486D31800D8A456 /* Frameworks */,
+ 8D202CF50486D31800D8A456 /* Rez */,
+ );
+ buildRules = (
+ );
+ comments = "Chameleon Startup PreferencePane By Rekursor, 1/17/2010.\n";
+ dependencies = (
+ );
+ name = CStartup;
+ productInstallPath = "$(HOME)/Library/PreferencePanes";
+ productName = StartupPrefPane;
+ productReference = 8D202CF80486D31800D8A456 /* Chameleon.prefPane */;
+ productType = "com.apple.product-type.bundle";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 089C1669FE841209C02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "ChameleonPrefPane" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 089C166AFE841209C02AAC07 /* StartupPrefPane */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D202CE80486D31800D8A456 /* CStartup */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D202CEC0486D31800D8A456 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D202CED0486D31800D8A456 /* InfoPlist.strings in Resources */,
+ 8D202CEF0486D31800D8A456 /* Chameleon.xib in Resources */,
+ 01A40F75110550F4002A74CD /* CHANGES in Resources */,
+ 0196529B11066CC0009E8F2F /* README in Resources */,
+ 01396F021106ADEA00643ECF /* cdrom.tiff in Resources */,
+ 01396F031106ADEA00643ECF /* Chameleon.icns in Resources */,
+ 01396F041106ADEA00643ECF /* Chameleon.tiff in Resources */,
+ 01396F051106ADEA00643ECF /* Data.plist in Resources */,
+ 01396F061106ADEA00643ECF /* Linux.tiff in Resources */,
+ 01396F071106ADEA00643ECF /* MacOSX.tiff in Resources */,
+ 01396F081106ADEA00643ECF /* Windows.tiff in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXRezBuildPhase section */
+ 8D202CF50486D31800D8A456 /* Rez */ = {
+ isa = PBXRezBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXRezBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D202CF00486D31800D8A456 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 01396EF61106ADD500643ECF /* ChameleonPrefPane.mm in Sources */,
+ 01396EF71106ADD500643ECF /* process.cpp in Sources */,
+ 01396EF91106ADD500643ECF /* property_list.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C167EFE841241C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "";
+ };
+ F506C042013D9D8C01CA16C8 /* Chameleon.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ F506C043013D9D8C01CA16C8 /* English */,
+ );
+ name = Chameleon.xib;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 018B55E01106D2B5003FAB5E /* Release 10.5 */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_GC = supported;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = NO;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ VALID_ARCHS = "i386 x86_64";
+ };
+ name = "Release 10.5";
+ };
+ 018B55E11106D2B5003FAB5E /* Release 10.5 */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = StartupPrefPane_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
+ PRODUCT_NAME = Chameleon;
+ WRAPPER_EXTENSION = prefPane;
+ };
+ name = "Release 10.5";
+ };
+ 1DBD214908BA80EA00186707 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = StartupPrefPane_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
+ PRODUCT_NAME = Chameleon;
+ WRAPPER_EXTENSION = prefPane;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 1DBD214A08BA80EA00186707 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = StartupPrefPane_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Library/PreferencePanes";
+ PRODUCT_NAME = Chameleon;
+ WRAPPER_EXTENSION = prefPane;
+ };
+ name = Release;
+ };
+ 1DBD214D08BA80EA00186707 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_GC = supported;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ VALID_ARCHS = "i386 ppc x86_64";
+ };
+ name = Debug;
+ };
+ 1DBD214E08BA80EA00186707 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
+ CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_GC = supported;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.6;
+ VALID_ARCHS = "i386 x86_64";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DBD214808BA80EA00186707 /* Build configuration list for PBXNativeTarget "CStartup" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DBD214908BA80EA00186707 /* Debug */,
+ 1DBD214A08BA80EA00186707 /* Release */,
+ 018B55E11106D2B5003FAB5E /* Release 10.5 */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DBD214C08BA80EA00186707 /* Build configuration list for PBXProject "ChameleonPrefPane" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DBD214D08BA80EA00186707 /* Debug */,
+ 1DBD214E08BA80EA00186707 /* Release */,
+ 018B55E01106D2B5003FAB5E /* Release 10.5 */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 089C1669FE841209C02AAC07 /* Project object */;
+}
Property changes on: trunk/ChameleonPrefPane/ChameleonPrefPane.xcodeproj
___________________________________________________________________
Added: svn:ignore
+ *.pbxuser
*.mode*
Index: trunk/ChameleonPrefPane/bin/OSX105/Chameleon.prefPane.zip
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/bin/OSX105/Chameleon.prefPane.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/bin/OSX106/Chameleon.prefPane.zip
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/bin/OSX106/Chameleon.prefPane.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/bin/version
===================================================================
--- trunk/ChameleonPrefPane/bin/version (revision 0)
+++ trunk/ChameleonPrefPane/bin/version (revision 9)
@@ -0,0 +1 @@
+1.0b7-2
Index: trunk/ChameleonPrefPane/StartupPrefPane_Prefix.pch
===================================================================
--- trunk/ChameleonPrefPane/StartupPrefPane_Prefix.pch (revision 0)
+++ trunk/ChameleonPrefPane/StartupPrefPane_Prefix.pch (revision 9)
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'StartupPrefPane' target in the 'StartupPrefPane' project.
+//
+
+#ifdef __OBJC__
+ #import
+ #import
+#endif
Index: trunk/ChameleonPrefPane/Resources/MacOSX.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/MacOSX.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/Resources/Windows.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/Windows.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/Resources/Chameleon.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/Chameleon.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/Resources/Data.plist
===================================================================
--- trunk/ChameleonPrefPane/Resources/Data.plist (revision 0)
+++ trunk/ChameleonPrefPane/Resources/Data.plist (revision 9)
@@ -0,0 +1,12 @@
+
+
+
+
+ forceBootConfigPath
+ /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
+ swapHD01
+
+ swapHD02
+
+
+
Index: trunk/ChameleonPrefPane/Resources/Chameleon.icns
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/Chameleon.icns
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/Resources/Linux.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/Linux.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/Resources/cdrom.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/Resources/cdrom.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/README
===================================================================
--- trunk/ChameleonPrefPane/README (revision 0)
+++ trunk/ChameleonPrefPane/README (revision 9)
@@ -0,0 +1,19 @@
+-----------------------------------
+Chameleon System Preferences panel
+by rekursor 1/17/2010
+-----------------------------------
+
+How to Install:
+ Double click on the panel file to install the resource
+
+Configuration:
+ The swap diskk fix option might be use if your disk order from chameleon is different from what diskutil list returns
+ Idealy we should not need this fix, but as for now, I don't know another way to do it
+
+ In the bundle resources folder, in Data.plist
+ you can insert a 'forceBootConfigPath' key with your com.apple.Boot,plist file path:
+ So if automatic detection does not work, then force your com.apple.Boot.plist path here.
+
+
+
+
\ No newline at end of file
Index: trunk/ChameleonPrefPane/English.lproj/InfoPlist.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/ChameleonPrefPane/English.lproj/InfoPlist.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/ChameleonPrefPane/English.lproj/Chameleon.xib
===================================================================
--- trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 0)
+++ trunk/ChameleonPrefPane/English.lproj/Chameleon.xib (revision 9)
@@ -0,0 +1,1944 @@
+
+
+
+ 1050
+ 10C540
+ 740
+ 1038.25
+ 458.00
+
+
+
+
+
+ YES
+
+ NSPreferencePane
+
+
+ FirstResponder
+
+
+ NSApplication
+
+
+ 7
+ 2
+ {{176, 715}, {668, 368}}
+ 1081606144
+ << do not localize >>
+ NSWindow
+
+ View
+
+ {1.79769e+308, 1.79769e+308}
+ {224.664, 10}
+
+
+ 256
+
+ YES
+
+
+ 268
+
+ YES
+
+
+ 2304
+
+ YES
+
+
+ 8448
+ {471, 198}
+
+ YES
+
+
+
+ -2147483392
+ {{446, 0}, {16, 17}}
+
+
+
+ YES
+
+ 36
+ 10
+ 3.4028234663852886e+38
+
+
+ 67239424
+ 33554432
+
+ LucidaGrande
+ 13
+ 1044
+
+ 0
+ 0
+ 0
+ NO
+
+ 3
+ YES
+ YES
+
+
+
+ 198
+ 40
+ 1000
+
+
+ 69336641
+ 67110912
+ Text Cell
+
+
+ 1
+
+ 6
+ System
+ controlBackgroundColor
+
+ 3
+ MC42NjY2NjY2NjY3AA
+
+
+
+ 6
+ System
+ controlTextColor
+
+
+
+ YES
+ sr_Latn_RS
+ zh
+ ro_RO
+ be_BY
+ si_LK
+ fa_IR
+ en_BW
+ en_JM
+ ka_GE
+ zh_Hans_SG
+ mk_MK
+ en_HK
+ ar_LB
+ ii_CN
+ ru_UA
+ zh_Hant_HK
+ af
+ kl_GL
+ az_Latn
+ ar_SA
+ en_BE
+ bn_BD
+ en_MH
+ be
+ nl_NL
+ el_CY
+ az_Cyrl_AZ
+ ca
+ sr_Latn
+ om_ET
+ es_CL
+ bg
+ en_VI
+ es_VE
+ uz_Cyrl_UZ
+ fr_MC
+ am
+ zh_Hant
+ uz_Arab
+ en_GB
+ da
+ mr_IN
+ es_MX
+ es_PR
+ sq_AL
+ ar
+ fi_FI
+ bn
+ en_NA
+ de
+ as
+ cy_GB
+ en_IE
+ en_BZ
+ de_CH
+ en_US
+ sr_Latn_BA
+ te_IN
+ ar_QA
+ ar_TN
+ zh_Hans_MO
+ de_LI
+ fa
+ kw_GB
+ cs_CZ
+ hu_HU
+ zh_Hant_TW
+ uz_Latn
+ ta_IN
+ az
+ ar_EG
+ ar_SD
+ cs
+ ga
+ ar_LY
+ af_ZA
+ el
+ es_PA
+ es_CO
+ fi
+ en
+ ha
+ eo
+ gl_ES
+ cy
+ es_GT
+ ms_BN
+ ne_IN
+ he_IL
+ he
+ es
+ fo
+ en_CA
+ et
+ hr_HR
+ haw
+ gl
+ ar_SY
+ fr_SN
+ eu
+ uz_Arab_AF
+ id
+ fr
+ az_Latn_AZ
+ hi
+ zh_Hans_HK
+ ja
+ es_ES
+ ar_AE
+ uz_Latn_UZ
+ ca_ES
+ fr_BE
+ hi_IN
+ is_IS
+ ii
+ ps_AF
+ ka
+ tr_TR
+ it_CH
+ kk_Cyrl_KZ
+ gu
+ es_US
+ gv
+ en_PH
+ es_HN
+ hr
+ sv_FI
+ es_CR
+ haw_US
+ ar_MA
+ hu
+ nl_BE
+ th_TH
+ en_ZA
+ kk_Cyrl
+ is
+ it
+ es_PE
+ hy
+ de_DE
+ en_NZ
+ kk
+ kl
+ en_AU
+ pa_Guru
+ el_GR
+ km
+ kn
+ ko
+ nb
+ ar_IQ
+ es_PY
+ es_EC
+ en_US_POSIX
+ vi_VN
+ lv_LV
+ ne
+ kn_IN
+ es_AR
+ mk
+ ml
+ bg_BG
+ hy_AM_REVISED
+ kw
+ uk_UA
+ en_PK
+ pa
+ lt
+ sk_SK
+ nl
+ ur_PK
+ de_BE
+ lv
+ as_IN
+ mr
+ nn
+ en_ZW
+ fr_CA
+ ne_NP
+ ms
+ pl_PL
+ ti_ER
+ ja_JP
+ mt
+ fr_LU
+ om
+ sr_Cyrl_ME
+ en_IN
+ ga_IE
+ sw_KE
+ pl
+ kok
+ ur_IN
+ or
+ it_IT
+ hy_AM
+ ml_IN
+ en_SG
+ es_SV
+ am_ET
+ pt_BR
+ bn_IN
+ mt_MT
+ ar_KW
+ es_DO
+ pa_Arab
+ gv_GB
+ so_KE
+ ti_ET
+ ps
+ ms_MY
+ sl_SI
+ es_UY
+ en_MT
+ pt
+ sw_TZ
+ ta
+ nn_NO
+ sr_Cyrl_RS
+ si
+ te
+ ro
+ so_SO
+ sk
+ az_Cyrl
+ or_IN
+ sl
+ pa_Arab_PK
+ ru_RU
+ th
+ ar_DZ
+ ti
+ so
+ sr_Cyrl
+ es_NI
+ ha_Latn_NG
+ ru
+ en_TT
+ sq
+ fr_FR
+ sr
+ da_DK
+ es_BO
+ nb_NO
+ de_LU
+ uk
+ eu_ES
+ ar_JO
+ sv
+ so_ET
+ tr
+ sw
+ vi
+ zh_Hans_CN
+ km_KH
+ fa_AF
+ et_EE
+ ko_KR
+ pa_Guru_IN
+ sr_Latn_ME
+ so_DJ
+ ur
+ kok_IN
+ uz_Cyrl
+ zh_Hant_MO
+ zh_Hans
+ ar_YE
+ fo_FO
+ sv_SE
+ ha_Latn
+ de_AT
+ lt_LT
+ ar_OM
+ sr_Cyrl_BA
+ uz
+ ar_BH
+ id_ID
+ pt_PT
+ af_NA
+ om_KE
+ fr_CH
+ gu_IN
+
+
+ 3
+ YES
+ YES
+
+
+
+ 84
+ 10
+ 3.4028229999999999e+38
+
+
+ 69336641
+ 134219776
+ Text Cell
+
+
+ YES
+ 1
+
+
+
+ 3
+ YES
+
+ Name Displayed on the bootable partion during Chameleon boot
+
+
+ 141
+ 40
+ 1000
+
+
+ 69336641
+ 2048
+ Text Cell
+
+
+ YES
+ 1
+
+
+
+ 3
+ YES
+
+
+
+ 3
+ 2
+
+
+ 6
+ System
+ gridColor
+
+ 3
+ MC41AA
+
+
+ 32
+ -692060160
+
+
+ 4
+ 15
+ 0
+ YES
+ 0
+
+
+ {{1, 17}, {471, 198}}
+
+
+
+
+ 4
+
+
+
+ -2147483392
+ {{446, 17}, {15, 142}}
+
+
+ _doScroller:
+ 0.9242424242424242
+
+
+
+ -2147483392
+ {{1, 159}, {411, 15}}
+
+ YES
+ 1
+
+ _doScroller:
+ 0.99577167019027479
+
+
+
+ 2304
+
+ YES
+
+
+ {{1, 0}, {471, 17}}
+
+
+
+
+ 4
+
+
+
+ {{20, 104}, {473, 216}}
+
+
+ 690
+
+
+
+
+
+ QSAAAEEgAABCCAAAQggAAA
+
+
+
+ 268
+ {{17, 312}, {146, 22}}
+
+ YES
+
+ 68288064
+ 272761856
+ Select Boot Partition
+
+
+ YES
+ 1
+
+ 6
+ System
+ controlColor
+
+
+
+
+
+
+
+ 268
+ {{495, 96}, {159, 32}}
+
+ YES
+
+ 67239424
+ 134217728
+ Restart Now
+
+
+ -2038284033
+ 129
+
+
+ 200
+ 25
+
+
+
+
+ 268
+ {{20, 20}, {628, 49}}
+
+ SFAuthorizationView
+
+
+
+ 268
+ {{140, 340}, {387, 19}}
+
+ YES
+
+ 72482368
+ 138544128
+ Chameleon System Preferences Panel (Version 1.0 beta 6) by Rekursor
+
+
+ YES
+
+
+ 1
+ MC4wMDI3ODQ5NTE4IDAuMTg5OTYzMzQgMC42NjMwNDM1AA
+
+
+
+
+
+ 268
+ {{20, 77}, {628, 19}}
+
+ YES
+
+ 72482368
+ 4326400
+ Status
+
+
+ YES
+
+
+ 1
+ MC4wMDI3ODQ5NTE4IDAuMTg5OTYzMzQgMC42NjMwNDM1AA
+
+
+
+
+
+ 12
+
+ YES
+
+
+ 256
+
+ YES
+
+
+ 268
+ {{12, 156}, {123, 18}}
+
+ 2
+ YES
+
+ 67239424
+ 131072
+ Swap disks 0<->1
+
+
+ 1211912703
+ 2
+
+ NSImage
+ NSSwitch
+
+
+ NSSwitch
+
+
+
+ 200
+ 25
+
+
+
+
+ 268
+ {{12, 136}, {123, 18}}
+
+ 2
+ YES
+
+ 67239424
+ 131072
+ Swap disks 0<->2
+
+
+ 1211912703
+ 2
+
+
+
+
+ 200
+ 25
+
+
+
+ {{1, 1}, {151, 190}}
+
+ 2
+
+
+ {{498, 128}, {153, 206}}
+
+ YES
+ 2
+ {0, 0}
+
+ 67239424
+ 0
+ Fixes
+
+
+ 6
+ System
+ textBackgroundColor
+
+
+
+ 3
+ MCAwLjgwMDAwMDAxAA
+
+
+
+ 1
+ 0
+ 2
+ NO
+
+
+ {668, 368}
+
+
+ {{0, 0}, {1920, 1178}}
+ {224.664, 32}
+ {1.79769e+308, 1.79769e+308}
+
+
+ ChameleonPrefPane
+
+
+
+
+ YES
+
+
+ _window
+
+
+
+ 26
+
+
+
+ dataSource
+
+
+
+ 121
+
+
+
+ delegate
+
+
+
+ 122
+
+
+
+ mPartitionsTable
+
+
+
+ 123
+
+
+
+ mResetButton
+
+
+
+ 124
+
+
+
+ onRestart:
+
+
+
+ 125
+
+
+
+ mPartitionNameColumn
+
+
+
+ 126
+
+
+
+ mFileSystemColumn
+
+
+
+ 127
+
+
+
+ mPartitionIDColumn
+
+
+
+ 130
+
+
+
+ authView
+
+
+
+ 137
+
+
+
+ mStatusText
+
+
+
+ 142
+
+
+
+ mOptions
+
+
+
+ 147
+
+
+
+ mSwapHD01
+
+
+
+ 150
+
+
+
+ mSwapHD02
+
+
+
+ 154
+
+
+
+ onSwapHD:
+
+
+
+ 156
+
+
+
+ onSwapHD:
+
+
+
+ 157
+
+
+
+ mPartitionImgColumn
+
+
+
+ 161
+
+
+
+
+ YES
+
+ 0
+
+
+
+
+
+ -2
+
+
+ File's Owner
+
+
+ -1
+
+
+ First Responder
+
+
+ 12
+
+
+ YES
+
+
+
+ PrefPane
+
+
+ 6
+
+
+ YES
+
+
+
+
+
+
+
+
+
+
+
+ -3
+
+
+ Application
+
+
+ 99
+
+
+ YES
+
+
+
+
+
+
+
+
+ 100
+
+
+
+
+ 101
+
+
+
+
+ 102
+
+
+ YES
+
+
+
+
+
+
+
+
+ 103
+
+
+
+
+ 104
+
+
+ YES
+
+
+
+
+
+ 105
+
+
+ YES
+
+
+
+
+
+ 106
+
+
+
+
+ 107
+
+
+
+
+ 108
+
+
+ YES
+
+
+
+
+
+ 109
+
+
+
+
+ 110
+
+
+ YES
+
+
+
+
+
+ 111
+
+
+
+
+ 112
+
+
+ ChameleonPrefPane
+
+
+ 128
+
+
+ YES
+
+
+
+
+
+ 129
+
+
+
+
+ 136
+
+
+
+
+ 138
+
+
+ YES
+
+
+
+
+
+ 139
+
+
+
+
+ 140
+
+
+ YES
+
+
+
+
+
+ 141
+
+
+
+
+ 145
+
+
+ YES
+
+
+
+
+
+
+ 143
+
+
+ YES
+
+
+
+
+
+ 144
+
+
+
+
+ 151
+
+
+ YES
+
+
+
+
+
+ 152
+
+
+
+
+ 158
+
+
+ YES
+
+
+
+
+
+ 160
+
+
+
+
+
+
+ YES
+
+ YES
+ -3.IBPluginDependency
+ 100.IBPluginDependency
+ 101.IBPluginDependency
+ 102.IBPluginDependency
+ 103.IBPluginDependency
+ 104.IBPluginDependency
+ 105.IBPluginDependency
+ 106.IBPluginDependency
+ 107.IBPluginDependency
+ 108.IBPluginDependency
+ 109.IBPluginDependency
+ 110.IBAttributePlaceholdersKey
+ 110.IBPluginDependency
+ 111.IBPluginDependency
+ 12.IBEditorWindowLastContentRect
+ 12.IBPluginDependency
+ 12.IBWindowTemplateEditedContentRect
+ 12.ImportedFromIB2
+ 12.windowTemplate.hasMinSize
+ 12.windowTemplate.minSize
+ 128.IBPluginDependency
+ 129.IBPluginDependency
+ 136.IBPluginDependency
+ 138.IBPluginDependency
+ 139.IBPluginDependency
+ 140.IBPluginDependency
+ 141.IBPluginDependency
+ 143.IBAttributePlaceholdersKey
+ 143.IBPluginDependency
+ 144.IBPluginDependency
+ 145.IBPluginDependency
+ 151.IBAttributePlaceholdersKey
+ 151.IBPluginDependency
+ 152.IBPluginDependency
+ 160.IBPluginDependency
+ 6.IBPluginDependency
+ 6.ImportedFromIB2
+ 99.IBAttributePlaceholdersKey
+ 99.IBPluginDependency
+
+
+ YES
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ ToolTip
+
+ ToolTip
+
+ Restarts the sytem
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ {{133, 127}, {668, 368}}
+ com.apple.InterfaceBuilder.CocoaPlugin
+ {{133, 127}, {668, 368}}
+
+
+ {224.664, 10}
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ ToolTip
+
+ ToolTip
+
+ Swap disks indexes 0<->1, use this option if your disk sequence in osx does not match the chameleon boot disk sequence
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+ ToolTip
+
+ ToolTip
+
+ Swap disks indexes 0<->2, use this option if your disk sequence in osx does not match the chameleon boot disk sequence
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+ ToolTip
+
+ ToolTip
+
+ Click on a partition to make it the default boot partition.
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+ YES
+
+
+ YES
+
+
+
+
+ YES
+
+
+ YES
+
+
+
+ 161
+
+
+
+ YES
+
+ ChameleonPrefPane
+ NSPreferencePane
+
+ YES
+
+ YES
+ onRestart:
+ onSwapHD:
+
+
+ YES
+ id
+ id
+
+
+
+ YES
+
+ YES
+ authView
+ mFileSystemColumn
+ mOptions
+ mPartitionIDColumn
+ mPartitionImgColumn
+ mPartitionNameColumn
+ mPartitionsTable
+ mResetButton
+ mStatusText
+ mSwapHD01
+ mSwapHD02
+ touchButton
+
+
+ YES
+ SFAuthorizationView
+ NSTableColumn
+ NSBox
+ NSTableColumn
+ NSTableColumn
+ NSTableColumn
+ NSTableView
+ NSButton
+ NSTextField
+ NSButton
+ NSButton
+ NSButton
+
+
+
+ IBProjectSource
+ ChameleonPrefPane.h
+
+
+
+ FirstResponder
+ NSObject
+
+ IBUserSource
+
+
+
+
+ NSPreferencePane
+ NSObject
+
+ IBUserSource
+
+
+
+
+
+ YES
+
+ NSActionCell
+ NSCell
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSActionCell.h
+
+
+
+ NSApplication
+ NSResponder
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSApplication.h
+
+
+
+ NSApplication
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSApplicationScripting.h
+
+
+
+ NSApplication
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSColorPanel.h
+
+
+
+ NSApplication
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSHelpManager.h
+
+
+
+ NSApplication
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSPageLayout.h
+
+
+
+ NSApplication
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSUserInterfaceItemSearching.h
+
+
+
+ NSBox
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSBox.h
+
+
+
+ NSButton
+ NSControl
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSButton.h
+
+
+
+ NSButtonCell
+ NSActionCell
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSButtonCell.h
+
+
+
+ NSCell
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSCell.h
+
+
+
+ NSControl
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSControl.h
+
+
+
+ NSFormatter
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSFormatter.h
+
+
+
+ NSImageCell
+ NSCell
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSImageCell.h
+
+
+
+ NSMenu
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSMenu.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSAccessibility.h
+
+
+
+ NSObject
+
+
+
+ NSObject
+
+
+
+ NSObject
+
+
+
+ NSObject
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSDictionaryController.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSDragging.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSFontManager.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSFontPanel.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSKeyValueBinding.h
+
+
+
+ NSObject
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSNibLoading.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSOutlineView.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSPasteboard.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSSavePanel.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSTableView.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSToolbarItem.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSView.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSArchiver.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSClassDescription.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSError.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSFileManager.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSKeyValueCoding.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSKeyValueObserving.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSKeyedArchiver.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSObject.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSObjectScripting.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSPortCoder.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSRunLoop.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSScriptClassDescription.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSScriptKeyValueCoding.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSScriptObjectSpecifiers.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSScriptWhoseTests.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSThread.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSURL.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSURLConnection.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ Foundation.framework/Headers/NSURLDownload.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ SecurityInterface.framework/Headers/SFAuthorizationView.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ SecurityInterface.framework/Headers/SFCertificatePanel.h
+
+
+
+ NSObject
+
+ IBFrameworkSource
+ SecurityInterface.framework/Headers/SFChooseIdentityPanel.h
+
+
+
+ NSPreferencePane
+ NSObject
+
+ YES
+
+ YES
+ _firstKeyView
+ _initialKeyView
+ _lastKeyView
+ _window
+
+
+ YES
+ NSView
+ NSView
+ NSView
+ NSWindow
+
+
+
+ IBFrameworkSource
+ PreferencePanes.framework/Headers/NSPreferencePane.h
+
+
+
+ NSResponder
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSInterfaceStyle.h
+
+
+
+ NSResponder
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSResponder.h
+
+
+
+ NSScrollView
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSScrollView.h
+
+
+
+ NSScroller
+ NSControl
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSScroller.h
+
+
+
+ NSTableColumn
+ NSObject
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSTableColumn.h
+
+
+
+ NSTableHeaderView
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSTableHeaderView.h
+
+
+
+ NSTableView
+ NSControl
+
+
+
+ NSTextField
+ NSControl
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSTextField.h
+
+
+
+ NSTextFieldCell
+ NSActionCell
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSTextFieldCell.h
+
+
+
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSClipView.h
+
+
+
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSMenuItem.h
+
+
+
+ NSView
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSRulerView.h
+
+
+
+ NSView
+ NSResponder
+
+
+
+ NSWindow
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSDrawer.h
+
+
+
+ NSWindow
+ NSResponder
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSWindow.h
+
+
+
+ NSWindow
+
+ IBFrameworkSource
+ AppKit.framework/Headers/NSWindowScripting.h
+
+
+
+ SFAuthorizationView
+ NSView
+
+
+
+
+ 0
+
+ com.apple.InterfaceBuilder.CocoaPlugin.macosx
+
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin.macosx
+
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3
+
+
+ YES
+ ../ChameleonPrefPane.xcodeproj
+ 3
+
+