Difference between revisions of "FRScreenSaver 101"

From AwkwardTV
Jump to: navigation, search
m
m (Reverted edits by Itextras (Talk) to last revision by Peoplemover)
 
(48 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[http://amohseni.info/img/styles/display-nokia/ display nokia 3310 cellulari] [http://nobinters.org/auto-panther.htm auto panther] [http://bloprofeldi.info/lib/eizo-tft.htm eizo tft 19 l778] [http://kinunia.cn/aspiratore-da.htm aspiratore da giardino] [http://kinunia.cn/abbonati-telefoni.htm abbonati telefoni] [http://ustall.org/web/sony-dvd.htm sony dvd 92e] [http://psisemiya.com/images/small/mango-visto/ mango visto cosi] [http://chaba.info/np-fp/ np fp 50] [http://helmed.info/topic/nokia-/ nokia 6230 black] [http://kinunia.cn/felicita-albano.htm felicita albano e romina power] [http://davte.info/library/html/lagazzettadelmezzogiorno-it.htm lagazzettadelmezzogiorno it] [http://psisemiya.com/images/small/y-gas/ y gas] [http://nobinters.org/clash-cd.htm clash cd] [http://helmed.info/topic/renault-scenic/ renault scenic iceland] [http://ustall.org/web/golder-miner.htm golder miner] [http://ashythro.info/library/html/auto-noleggio/ auto noleggio lisbona] [http://nobinters.org/vacation-homes.htm vacation homes] [http://psisemiya.com/images/small/doppio-colpo/ doppio colpo] [http://nobinters.org/icon-oakley.htm icon oakley] [http://davte.info/library/html/virgili.htm virgili] [http://davte.info/library/html/asus-pc.htm asus p4c800 e deluxe] [http://bloprofeldi.info/lib/meteora.htm meteora] [http://davte.info/library/html/twiddle.htm twiddle] [http://davte.info/library/html/marica-giannini.htm marica giannini] [http://davte.info/library/html/patchwork-libri.htm patchwork libri] [http://saibso.org/sei-giorni.htm sei giorni di enduro 2004] [http://davte.info/library/html/incontri-verbania.htm incontri verbania] [http://davte.info/library/html/dragonsta-tei.htm dragonsta tei din] [http://helmed.info/topic/riassunto-della/ riassunto della prima guerra mondiale] [http://psisemiya.com/images/small/www-lunapop/ www lunapop com] [http://chaba.info/carnaval-de/ carnaval de barranquilla] [http://ashythro.info/library/html/suzie-villeneuve/ suzie villeneuve] [http://chaba.info/larry-carlton/ larry carlton] [http://saibso.org/la-rumba.htm la rumba de los santos salsa] [http://ustall.org/web/franchising-attivita.htm franchising attivita] [http://ashythro.info/library/html/i-m/ i m guilty] [http://saibso.org/biliardo-semplice.htm biliardo semplice] [http://helmed.info/topic/bmw-x/ bmw x5 in toscana] [http://kinunia.cn/configurazione-wap.htm configurazione wap] [http://amohseni.info/img/styles/due-occhi/ due occhi azzurri] [http://kinunia.cn/officeconnect-wireless.htm officeconnect wireless router] [http://kinunia.cn/the-return.htm the return of the king] [http://saibso.org/giubbotti.htm giubbotti] [http://davte.info/library/html/usb-.htm usb 2 0 pcmcia] [http://davte.info/library/html/orexina.htm orexina] [http://ustall.org/web/benassi-bross.htm benassi bross feat dhany] [http://amohseni.info/img/styles/www-arezzo/ www arezzo wave com] [http://saibso.org/call-of.htm call of duty ps2] [http://psisemiya.com/images/small/video-re/ video re tratamento] [http://ustall.org/web/effetti-musicali.htm effetti musicali per dj] [http://amohseni.info/img/styles/auto-destruct/ auto destruct] [http://helmed.info/topic/la-demo/ la demo xbox nel dvd di hulk] [http://chaba.info/packard-bell/ packard bell 1gb] [http://ustall.org/web/frigorifero-ad.htm frigorifero ad assorbimento frigoriferi] [http://bloprofeldi.info/lib/epson-aculaser.htm epson aculaser al-cx11n] [http://ashythro.info/library/html/fuoriditesta/ fuoriditesta] [http://davte.info/library/html/watergames.htm watergames] [http://nobinters.org/aldo-riso.htm aldo riso] [http://nobinters.org/residence-orchidea.htm residence orchidea diano marina] [http://ashythro.info/library/html/baath/ baath] [http://chaba.info/tv-lcd/ tv lcd samsung lw 22] [http://davte.info/library/html/usr.htm usr] [http://bloprofeldi.info/lib/www-chieti.htm www chieti it] [http://ustall.org/web/lavoro-sesto.htm lavoro sesto san giovanni] [http://saibso.org/falce-e.htm falce e martello in video] [http://helmed.info/topic/hotel-boston/ hotel boston] [http://saibso.org/iliade-traduzione.htm iliade traduzione] [http://nobinters.org/champions-leage.htm champions leage] [http://saibso.org/tunica-abbigliamento.htm tunica abbigliamento] [http://saibso.org/zion-y.htm zion y lennox yo voy] [http://chaba.info/autonoleggio-barcellona/ autonoleggio barcellona] [http://bloprofeldi.info/lib/the-game.htm the game. the documentary] [http://davte.info/library/html/golf-tdi.htm golf tdi 2004 105 cv] [http://chaba.info/yeah-usher/ yeah usher] [http://helmed.info/topic/osage/ osage] [http://amohseni.info/img/styles/incurvatura/ incurvatura] [http://saibso.org/offerte-di.htm offerte di lavoro brescia] [http://saibso.org/concessionari-fiat.htm concessionari fiat punto 2 serie] [http://psisemiya.com/images/small/no-cd/ no cd crack call of duty] [http://ustall.org/web/vendita-case.htm vendita case amalfi] [http://saibso.org/roma-new.htm roma new york] [http://bloprofeldi.info/lib/ti-diro.htm ti diro che tu mi piaci] [http://nobinters.org/ho-ucciso.htm ho ucciso tuo fratello] [http://nobinters.org/theclub-it.htm theclub it] [http://saibso.org/chicos-guapos.htm chicos guapos] [http://kinunia.cn/tamburo-per.htm tamburo per brother] [http://davte.info/library/html/crepes-alla.htm crepes alla nutella] [http://helmed.info/topic/femme-en/ femme en chaleur] [http://nobinters.org/irradio-mp.htm irradio mp3 1gb] [http://ustall.org/web/venga-boys.htm venga boys] [http://chaba.info/software-creazione/ software creazione stereogramma] [http://kinunia.cn/the-beat.htm the beat - violenza alla deriva] [http://nobinters.org/colgar.htm colgar] [http://kinunia.cn/filamti.htm filamti] [http://davte.info/library/html/spari-e.htm spari e bombe] [http://amohseni.info/img/styles/david-bowie/ david bowie] [http://chaba.info/say-nothing/ say nothing at all] [http://ashythro.info/library/html/agenzia-immobiliare/ agenzia immobiliare roma] [http://saibso.org/hsw-nokia.htm hs-11w nokia] [http://chaba.info/virtual-girl/ virtual girl] [http://bloprofeldi.info/lib/cs-cad.htm cs200 cad] [http://psisemiya.com/images/small/plato-con/ plato con cereal] [http://amohseni.info/img/styles/mengacci/ mengacci] [http://amohseni.info/img/styles/xiao-xiao/ xiao xiao2] [http://davte.info/library/html/linda-e.htm linda e il brigadiere. episodio 1] [http://helmed.info/topic/dediche-laurea/ dediche laurea] [http://saibso.org/havana-nights.htm havana nights] [http://bloprofeldi.info/lib/putas-laguna.htm putas laguna] [http://amohseni.info/img/styles/audi-a/ audi a3 1.9tdi] [http://nobinters.org/il-commissario.htm il commissario pepe] [http://ashythro.info/library/html/gigis/ gigis] [http://ustall.org/web/mac-mini.htm mac mini 1 25 ghz g4 512 40gb combo 56k] [http://helmed.info/topic/scheda-gps/ scheda gps] [http://helmed.info/topic/cremar/ cremar] [http://helmed.info/topic/fay-william/ fay, william george] [http://helmed.info/topic/lettore-dvd/ lettore dvd divx portatile toshiba] [http://nobinters.org/lettore-cd.htm lettore cd aiwa] [http://amohseni.info/img/styles/m-bjk/ m bjk] [http://nobinters.org/topa-grassa.htm topa grassa] [http://chaba.info/the-guest/ the guest] [http://chaba.info/i-jam/ i jam] [http://psisemiya.com/images/small/ati-radeon/ ati radeon 9800 se 256mb] [http://saibso.org/ti-si.htm ti si mrne] [http://amohseni.info/img/styles/allstar-baseball/ all-star baseball 2002] [http://davte.info/library/html/magazzini-messina.htm magazzini messina] [http://saibso.org/francesco-degregori.htm francesco degregori] [http://davte.info/library/html/burg-beheading.htm burg beheading] [http://amohseni.info/img/styles/roma-lugano/ roma lugano] [http://nobinters.org/alimentazione-latte.htm alimentazione latte] [http://amohseni.info/img/styles/home-coppia/ home coppia scambista] [http://chaba.info/nino-d/ nino d angelo senza giacca e cravata mp3] [http://helmed.info/topic/tutto-per/ tutto per tutto] [http://amohseni.info/img/styles/modem-adsl/ modem adsl2 ethernet] [http://nobinters.org/gps-palmare.htm gps palmare europa] [http://ashythro.info/library/html/diorskin-airflash/ diorskin airflash] [http://davte.info/library/html/berretti.htm berretti] [http://amohseni.info/img/styles/la-natura/ la natura in goethe] [http://saibso.org/pooh-sballo.htm pooh sballo] [http://kinunia.cn/la-fidanzata.htm la fidanzata di mio marito] [http://chaba.info/frigoriferi-ad/ frigoriferi ad incasso] [http://chaba.info/borodin/ borodin] [http://saibso.org/suoni-e.htm suoni e colori della natura] [http://davte.info/library/html/kentucky-diga.htm kentucky, diga del-] [http://nobinters.org/dannunzio-i.htm dannunzio. i grandi della storia] [http://ustall.org/web/samsonite-zaino.htm samsonite zaino] [http://psisemiya.com/images/small/cz-trasporti/ cz (trasporti)] [http://kinunia.cn/disegno-colorare.htm disegno colorare pasqua] [http://bloprofeldi.info/lib/onkyo-dvd.htm onkyo dvd 501] [http://chaba.info/lg-gsad/ lg gsa5163d] [http://kinunia.cn/id-.htm id 00 7c 00] [http://ustall.org/web/discografia-genesis.htm discografia genesis] [http://davte.info/library/html/lavatrici-incasso.htm lavatrici incasso dimensioni] [http://bloprofeldi.info/lib/control-mg.htm control 2,5mg 20 cpr] [http://bloprofeldi.info/lib/apartment-rentals.htm apartment rentals] [http://chaba.info/live-erotic/ live erotic hot bio room chat free] [http://ustall.org/web/zzt.htm zzt] [http://psisemiya.com/images/small/hector-y/ hector y tito midi] [http://bloprofeldi.info/lib/logitech-casse.htm logitech casse audio] [http://bloprofeldi.info/lib/noway-in.htm noway in hell] [http://bloprofeldi.info/lib/egittologia.htm egittologia] [http://davte.info/library/html/negre-nude.htm negre nude gratis] [http://kinunia.cn/pompa-acqua.htm pompa acqua auto] [http://ustall.org/web/luigi-tenco.htm luigi tenco cd] [http://psisemiya.com/images/small/mc-solaar/ mc solaar] [http://davte.info/library/html/yensid.htm yensid] [http://psisemiya.com/images/small/vincenzo-ferrara/ vincenzo ferrara] [http://bloprofeldi.info/lib/ipod-gb.htm i-pod 60gb apple] [http://davte.info/library/html/tesi-maturita.htm tesi maturita] [http://davte.info/library/html/agarum.htm agarum] [http://nobinters.org/foto-stereo.htm foto stereo] [http://davte.info/library/html/biagio-antonacci.htm biagio antonacci. live in palermo] [http://chaba.info/asset-intangibili/ asset intangibili] [http://ustall.org/web/e-va.htm e va albert sordi] [http://saibso.org/ariston-incasso.htm ariston incasso lavastoviglie] [http://chaba.info/cavalli-uomo/ cavalli uomo] [http://kinunia.cn/spr.htm spr] [http://bloprofeldi.info/lib/marti.htm marti] [http://bloprofeldi.info/lib/inquietos-vallenatos.htm inquietos vallenatos] [http://nobinters.org/soy-muchacho.htm soy muchacho provinciano] [http://chaba.info/ipood-apple/ ipood apple] [http://amohseni.info/img/styles/testi-canzoni/ testi canzoni gemelli diversi] [http://nobinters.org/roma-s.htm roma s pietroburgo] [http://saibso.org/yamaha-ystsw.htm yamaha yst-sw1500] [http://davte.info/library/html/braun-.htm braun 8500 dlx center] [http://nobinters.org/marianne-faithfull.htm marianne faithfull. dreaming my dream] [http://davte.info/library/html/funk-cops.htm funk cops] [http://kinunia.cn/kersnik-janko.htm kersnik, janko] [http://davte.info/library/html/ati-a.htm ati a9550] [http://kinunia.cn/fisiologia-umana.htm fisiologia umana] [http://chaba.info/un-servizio/ un servizio fotografico per john constantine] [http://psisemiya.com/images/small/lettore-memory/ lettore memory stick sd xd] [http://bloprofeldi.info/lib/seagate-.htm seagate 2 5 80gb] [http://davte.info/library/html/midi-films.htm midi films] [http://saibso.org/voli-last.htm voli last minute madrid] [http://amohseni.info/img/styles/oki-ml/ oki ml 3320] [http://ustall.org/web/canne-daiwa.htm canne daiwa] [http://amohseni.info/img/styles/vita-da/ vita da paperi] [http://davte.info/library/html/cherubini-hi.htm cherubini hi fi] [http://ustall.org/web/acqua-energizer.htm acqua energizer] [http://saibso.org/brother-.htm brother - telefax fax t106] Finally the screen saver problem has been solved too!  
+
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.  
 
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.  
Line 5: Line 5:
 
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.
 
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===
+
==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.
 
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.
 +
"RSSVisualizerSaver"
  
===Creating the Plugin===
+
==Creating the Plugin==
  
 
Open InfoPlist.strings (for English) and make sure CFBundleName accurately reflects your new screen saver name:
 
Open InfoPlist.strings (for English) and make sure CFBundleName accurately reflects your new screen saver name:
Line 15: Line 16:
 
<pre>CFBundleName = "RSS Visualizer";</pre>
 
<pre>CFBundleName = "RSS Visualizer";</pre>
  
====The Main Appliance Class====
+
===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.
 
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.
Line 66: Line 67:
 
</pre>
 
</pre>
  
===Building the Plugin===
+
==Building the Plugin==
====Build Settings====
+
===Build Settings===
  
 
Everything is the same, except:
 
Everything is the same, except:
Line 73: Line 74:
 
* set the Wrapper Extension to <tt>frss</tt>, not <tt>frappliance</tt>.
 
* set the Wrapper Extension to <tt>frss</tt>, not <tt>frappliance</tt>.
  
====Building====
+
===Building===
 
Click Build. The compiled screen saver will appear in <tt>build/Debug/RSSVisualizerSaver.frss</tt>.
 
Click Build. The compiled screen saver will appear in <tt>build/Debug/RSSVisualizerSaver.frss</tt>.
  
===Running the Plugin===
+
==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:
 
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:
  

Latest revision as of 08:18, 30 December 2012

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. "RSSVisualizerSaver"

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