FRScreenSaver 101

From AwkwardTV
Revision as of 04:50, 11 September 2007 by ThnEa7 (talk | contribs)
Jump to: navigation, search

mobiltelefon triple penetrazioni high treck carrozzine mercedes ambiente agenzia matrimoniali varese video porno di oggi http unict it patente auto pavillion hp monitor 21 fujitsu rcm service sas office 2003 small dvd nad notebook acer aspire 1522wlmi e313 usb gioco pc scaricabile gratis telecomando pc diablo 2 lod bliss anello modellismo collezione prestito personale vacanze sud africa johnny il bravo mein weg zu dir luisa corna gallery canon d60 senza nisciuno ibiza shopping fpf acer pd 523 musica de famosos inda gold card snc bloody manihot esperte amp land lecca figa faletti prestito crotone sampei vol 04 jon cena toner brother hl 1650 asta immobile thicke www shg it investigare alexai effetto pergamena tastiera logitech internet pro keyboard rochet waldeck tom tom 5 bluetooth sigma 1735mm f 2 84 ex dg hsm blame it on the silvesterkonzert 2000 giuseppe verdi sway bubble nick lachey samsung ml2550 jinx e la notte di carica batterie per auto e moto jaguar xkr 40 coldplay trouble doppio gioco a devils bridge hard disk teac adidas sneakers stringhe videocamera canon mvx10i hot sex duo on on eamon come partecipare in un set fotografico www torre del moro it tina turner all the best the live collection mastronzo now we are free this love is scarica prophilax video w 3365 porno mantovano grande punto km 0 cambio euro dollaro www arteferro com mickey personale qualificato moda ricerca lottomania pavarotti canto ragazze da marito circoncidere gioco a dama classe a ventilato hdw 3 nx9105 64 carletto pony express escort aosta samsung yp t8 raptor 74 western tenchu stealth assasins shiseido skincare mia moglie violentata v3 nero maglia manica lunga uomo abbigliamento cappotti di lana donna lowara famiglio sara ass la leggenda del paive fx 3400 tom tom go portatile cdrw stradario di milano amaranta ruiz merial dupon cooldrive lite fotos de adolecentes gratis xxnn puntoshop ex ragazza foto di naturisti in spiagga wintv pvr 150 mce racconti erotici gabriele hotel 5 stelle londra ciabatte baby bioy monte carmelo riassunto processo kafka adattatore da viaggio apple fzero x udine immobiliare hc r90 messaggio per augurare buon compleanno cie telematica srl dragonstea din tei ozone spice girls 2 become one whit or whithout yu grande fratello verona www aladino annunci immobiliari dornod gold tv tuner docce solari e da giardino herbal pianoteacher gazzetta ufficiale 28 maggio 2004 hotel rapallo canon minidv mvx300 bibliotecavirtual com mature porno olimpus c 150 canon 1ds mark ii point of view geforce topolino game foto annuncio personali pallavolo femminile serie a up town gitl geosat 2 navigatore satellitare hoover f3880 kodak 5 1 megapixel 3x digitale belli come hector y tito nicky jam yaoo groupe code de gta san andreas oakley xx julia silveira brak the line mi soledad y yo lettore dvd dvx vcr fiat uno dragostea ozn bdsm gallery tigo calderon tv lcd e dvd 8 southern review the offerta lavoro banca nuovo sito per hidden and dangerous 2 console sony playstation 2 slim argento ucds 3 01 barcode compact flash carte prepagate caricabatterie aa nimh quella sporca ultima meta iwbank it km0 toyota auto km 0 armored core nexus orari colpo gobbo el embraje mi sono innamorato di te decapitazione coreano foto v9999gt td lancia musa km zero nokia foto jolin chai yi ling hairy mature risorgiva karaoke dascaricare gratis grossa il manoscritto di van hecken siani dino playstation fifa 2005 poesie di viaggio umidificatore neonati puglia mare come realizzare scooby doo www sexy ladys com castigat ridendo mores sono molto maiala vacanze in puglia ricambi lancia pornografia com comap seiya mappa stradali di cuba eos 20 canon carlos vives siti web erotici samsung inverter satellite m40146 regeaton co (primo elemento di composti) porno en damas newsround craft come salvare un matrimonio e rovinare la propria vita www graffiti com ad ware d home architect titano spartiti musicali mina un altro party per playboy bebo valdes lettore dvd divx mp3 lg 9900 incontri sesso torino garganta profunda pareri svolti esame avvocato billard 3d sacca puma ps2 link mascha dernier cri branko olar racconti sadomaso bdsm cucina siciliana vino abruzzesi pono com giuseppe verdi il trovatore orologio trekking metasomatismo dubai chitta games online maschi nudi gratis odissey living in a fantasy Finally the screen saver problem has been solved too!

All the BackRow screen savers are basically generators for Quartz Composer compositions. These compositions can be very powerful, even driving things like RSS feeds. In fact, that's the example we'll use.

Most of the instructions to create a FRAppliance still apply—the bundles are very similar. I will go by the same steps as the FRAppliance tutorial, but only highlight the DIFFERENCES from those changes. Please review FRAppliance_101 to reference those steps.

Making the Project

First, you'll want a more useful name. Instead of "HelloWorld", let's call it "RSSVisualizerSaver". Create a new Cocoa Bundle project with this name.

Creating the Plugin

Open InfoPlist.strings (for English) and make sure CFBundleName accurately reflects your new screen saver name:

CFBundleName = "RSS Visualizer";

The Main Appliance Class

Our primary class will not be HelloWorldAppliance, rather use "RSSVisualizerSaver". That means you'll add an Objective-C class to your project caled RSSVisualizerSaver. Don't forget to check "Also create RSSVisualizerSaver.h" in Xcode.

Open RSSVisualizerSaver.h and change it so that your RSSVisualizerSaver class inherits from BRQCScreenSaver. Change "NSObject" in the line beginning with "@interface" to read "BRQCScreenSaver".

Make sure you import the BackRow framework.

You'll want to add the className class method to RSSVisualizerSaver.m—screen savers need to bypass their own whitelists too. However, we need to use an unused screen saver item, and the only one appears to be RUIRetailScreenSaver. Folks are working on subverting the whitelists, so stay tuned for that. You will also want to search for a different method in the exception backtrace: _validateBundleAtPath:. Here's the full code to place into RSSVisualizerSaver.m, instead of the one defined by the Appliance instructions.

// Override to allow FrontRow to load custom screen saver bundles
  (NSString *) className {
    // this function creates an NSString from the contents of the
    // struct objc_class, which means using this will not call this
    // function recursively, and it'll also return the *real* class
    // name.
    NSString * className = NSStringFromClass( self );
	
	// new method based on the BackRow NSException subclass, which conveniently provides us a backtrace
	// method!
	NSRange result = [[BRBacktracingException backtrace] rangeOfString:@"_validateBundleAtPath:"];
	
	if(result.location != NSNotFound) {
		NSLog(@" [%@ className] called for screen saver whitelist check, so I'm lying, m'kay?", className);
		className = @"RUIRetailScreenSaver";
	}
	
	return className;
}

We need to copy our Quartz composition into our project, otherwise we'll be making an extremely boring screen saver. First, you'll want to copy a composition into your project. Copy this file from your Mac OS X system:

/System/Library/Screen\ Savers/RSS Visualizer.qtz

into your project folder. Then in Xcode, right-click on the "Resources" directory, select Add > Existing Files..., and select RSS Visualizer.qtz from your project folder. Make sure it is added to your target.

Back to the code. There is no equivalent to the applianceControllerWithScene method in a BRQCScreenSaver. The only thing need to do to run a QuartzComposer composition is override its initWithScene method and set the appropriate composition. We'll call the superclass' initWithScene: method to do all the dirty work, the only change we will make is to set a different composition.

- (id)initWithScene:(id)scene {
	NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
	NSString *compositionPath = [thisBundle pathForResource:@"RSS Visualizer" ofType:@"qtz"];

	self = [super initWithScene:scene];
	[self setCompositionPath:compositionPath];
	return self;
}

Building the Plugin

Build Settings

Everything is the same, except:

  • make sure your Principal Class is set to RSSVisualizerSaver, not HelloWorldAppliance.
  • set the Wrapper Extension to frss, not frappliance.

Building

Click Build. The compiled screen saver will appear in build/Debug/RSSVisualizerSaver.frss.

Running the Plugin

You'll want to copy your built copy to the correct folder. I recommend, as the Appliance tutorial author did, to mount the project from your development system so you can make a symlink to the correct location. Copy or symlink your built project to:

/System/Library/CoreServices/Finder.app/Contents/Screen Savers

Kill Finder, then navigate to Settings > Screen Savers. Select "RSS Visualizer", then click Preview to witness your great creation!

Congratulations...again!

Start experimenting with some cool compositions for AppleTV—I think this will be a hugely popular hack, given I know the Apple TV community can come up with some really creative screen savers to show on their sexy widescreens. :)

I (just call me John Doe, I want no recognition for this) owe this entire hack to EricIII, the creator of the FRAppliance 101 tutorial. Quite simply, it would have been impossible without his work, especially since the Screen Saver project is largely a clone of the Appliance project.

Some pretty compositions can be found here:

http://www.zugakousaku.com/index.php?m=project