[Proof of Concept] Windows 7 ThemePack Builder (with three test/sample themepacks for you)
My name is Greg and I’m addicted to Windows 7’s wallpaper slideshows…
With Windows 7 I’ve become somewhat addicted to new Theme’s, focusing on those that provide cool wallpaper slideshows. I started with those on the Windows 7 Gallery, but have since moved on (i.e. the Gallery was a gateway drug… ;) The problem since run into is that there are tons of “wallpaper” sites, posts, etc but few seem to package them as ThemePacks (ThemePacks are new to Windows 7, as actually CAB files with all of Theme’s components included).
Manually creating new theme’s isn’t hard but it’s, well, manual.
So being the coding geek I am, I started coding… :)
I’ve now got the ugliest in code & UI PoC now working (below) and thought it time to share a few of my ThemePacks created via my ThemePack Builder. Important Note: All original copyright holders retain their rights, etc. All I’ve done is take their images, without modification and created themepacks of them.
Themes
ThemePacks currently available are;
- Visual Studio Wallpapers (just some select images)
- How-To Geek - Desktop Fun: Battlestar Galactica Wallpapers (all the images in the downloadable zip)
- Boston.com - First of the last Space Shuttle launches (All 43 images)
These are bare-bones Theme’s, with little other customization except for the wallpapers.
Standard Liability Disclaimer: I assume no risk nor liability. If you apply any of these themepacks you assume all risks and liabilities. If something happens to your machine it’s on you. yada, yada, etc, etc. Period
Here’s a snap of my desktop after applying my created Boston.com shuttle theme;
Project/Code
So let’s talk a little bit about the project.
It’s ugly (as is the UI) and not ready for sharing, when it is it will go up on CodePlex. The code is the ugliest of ugly, as only PoC code can be.
This project is only possible because I stand on the shoulders of giants. I’m pretty much just gluing together other people’s code…
Here are the hero’s/projects/references that made this project possible;
- Cabinet File (*.CAB) Compression and Extraction
- INI Editing (Nini)
- HTML Agility Pack
- WebClient Redirect Handling
- Creating and Installing Theme Files
ThemePack Brain Dump/Notes:
- ThemePack files are CAB’s. You can view them in Windows Explorer by changing the .themepack extension to .cab. But don’t! Use 7-Zip instead. Why? Windows Explorer will show you the files, but not the folders those files might be in. It took me a while to finally figure out the wallpapers were actually in a DesktopBackground subfolder in the CAB. 7-zip makes this very clear and easy to see.
- When manually (i.e. I mean really manually, by creating the themepack CAB file yourself, etc) and it won’t install, check names, folder and file names. If there’s bad name, you won’t get an error, warning, nag etc, it just won’t install.
- Again names are important. It’s DesktopBackground, not DesktopBackgrounds (i.e. not plural)
- Also the “[Control Panel\Desktop]” “Wallpaper=” entry in the Theme file must exist (and be named correctly). If it doesn’t, again, the themepack won’t install. For example; Wallpaper=DesktopBackground\download1.jpg (download1.jpg must exist…)
Future
I have about 1.79 billion things I want to do with this code. WPF UI, major refactor, add error handling, MEF support to easily enable new image sources, etc, etc, etc.
The easy part is done. I can now create themepacks from three basic sources, File System, Image URL’s and page parsing for IMG’s. Now comes the hard part, cleaning it all up… :p
2 comments:
hi greg,
i m too trying to make my own themepack, but i am missing something plz help me figuring out where i am going wrong.
1.> i have already prepared the sounds ,wallpapers etc.
2.>then i packed them inside a cab file using Visual studio 2010 Pro.
3.> then , i am renaming the extension .cab as .themepack
4.>DONE.
It changes its icon as themepack, but It wont install.
plz help.
The format of the INI is very important as are the paths to the items in the CAB.
If there are any errors or issues you'll get exactly what you're getting, nothing.
a) Make sure your resources (wallpapers, etc) are in subfolders in the cab. Don't use Windows Explorer to look at/build the CAB (I haven't tried VS to create the CAB so can't say how well it does). This took me forever to figure out. I ended up using using 7Zip (www.7zip.org).
b) Double check the INI. Make sure everything in the INI has the right paths, settings, etc.
c) The best tool to start with is Windows itself. Use Windows to build your theme (i.e. set up your current theme to have everything you want, wallpaper, etc) and then export that. THEN using 7Zip see how that exported themepack is laid out, the ini is setup, etc.
d) Start simple. Create a themepack with only one thing in it, Get that to work, then add more...
The fact that there's no error/log/etc to help diagnose broken/bad themepack's is a major pain and leads to allot of trial and error...
Hope this helps a little,
Greg
Post a Comment