Distribution script checking for files or package receipt?
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Hi... I'd like my distribution script to check for either /System/Library/StartupItems/MySQLCOM/MySQLCOM or /Library/StartupItems/MySQL/MySQL * Alternatively, is there an 'approved' way to check for the receipt? Thanks, Shay /* js:pkmk:start */ function MySQLStartupItemInstalled() { return mysqlStartupPackageInstalled() ; } /* js:pkmk:end */ /* ******* DO NOT EDIT ANYTHING BELOW THIS LINE ******* */ /* THE TEXT BELOW IS THE DEFINITION FOR THE REQUIREMENTS EDITOR */ (or alternatively, for the presence of a receipt of the MySQLStartupItem package). The questions are: * Why does the check for the files result in a Javascript error? (__choice_my_database_enabled returned error: (null)) /* js:pkmk:start */ function mysqlStartupPackageInstalled() { var result = false; try { result = system.files.fileExistsAtPath('/System/Library/StartupItems/MySQLCOM/MySQLCOM') == true || system.files.fileExistsAtPath('/Library/StartupItems/MySQL/MySQL') == true; } catch (e) {} if(!result) { my.result.type = 'Fatal'; my.result.title = 'MySQL Startup Package missing'; my.result.message = 'You must install the MySQL Startup Package from the MySQL installation'; } return result; } /* js:pkmk:end */ /* %%%Requirements Editor%%% { clauses = ( { anyOrAll = 1; connector = ""; msg = "You must install the MySQL Startup Package from the MySQL installation"; msgTitle = "MySQL Startup Package missing"; rules = ( { argumentField = ""; argumentStringField = ""; booleanType = true; choiceProperty = enabled; comboType = ""; comparator = "=="; mainChoice = "File Exists"; numberType = ""; pathField = "/System/Library/StartupItems/MySQLCOM/MySQLCOM"; pathKeyKeyField = ""; pathKeyPathField = ""; specificChoice = choice0; stringType = ""; }, { argumentField = ""; argumentStringField = ""; booleanType = true; choiceProperty = enabled; comboType = ""; comparator = "=="; mainChoice = "File Exists"; numberType = ""; pathField = "/Library/StartupItems/MySQL/MySQL"; pathKeyKeyField = ""; pathKeyPathField = ""; specificChoice = choice0; stringType = ""; } ); title = "MySQL Startup Package installed"; type = 3; } ); functionName = MySQLStartupItemInstalled; } %%%Requirements Editor%%% */ -- =========================== Shay Telfer ================================ Perth, Western Australia Technomancer The love of liberty is the love Opinions for hire [POQ] of others; the love of power is http://newtonslore.com/ fnord the love of ourselves - Hazlitt _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Shay Telfer