MADDE/Theme building

andrewfblack (Talk | contribs)
(New page: Recently, three source packages that were published in Diablo times was released in their Fremantle versions which I had waited for a long time for. These are:<br> <br> * A source package ...)
Newer edit →

Revision as of 15:09, 26 February 2010

Recently, three source packages that were published in Diablo times was released in their Fremantle versions which I had waited for a long time for. These are:

  • A source package which generates a theme, hildon-theme-variant-example
  • This is done on the basis of hildon-theme-layout-5 (also published in Maemo5.0 update2 SDK), a package that provides the GTK theming and how to slice and dice a template into the theme elements.
  • The slicers and dicers and dithers are provided in hildon-theme-tools (also published in Maemo5.0 update2 SDK).


hildon-theme-variant-example is CC BY SA 2.5, hildon-theme-layout-5 is CC BY SA 3.0 and hildon-theme-tools is GPL 2.0 for those who are interested in that.

Now, on to what this article is actually about.

What I am going to provide you theme makers of Maemo, is a way to make theme packages similar to how the vendor-provided themes on your device is made. We had this ability in Diablo and now we have it in Fremantle.

There was a catch with the Diablo method - it required you installing Maemo SDK, well, under Linux and this isn't always commonly found on graphics designers computers which typically ran Windows or MacOS X.

Thus, cross-platform solutions like [ https://garage.maemo.org/projects/thememaker Kontorri's Theme Maker] was made which emulated what these packages described are doing. It made a binary Debian package, which could only be uploaded to Maemo Extras in the non-free section.

Normally, developers upload a source package to Maemo Extras and the autobuilder builds it for us.

Now, the ballgame has changed with MADDE. MADDE is a cross-platform Maemo SDK (Linux, Windows, MacOS X), which basically implements just about enough to cross-compile a Qt application. But why is this interesting for theme makers?

I've discovered that it is possible to generate the source package for a theme package within MADDE. What does this mean for your workflow as designers? Let me guide you through a workflow of theme design with the help of MADDE and the Maemo Extras repository.

Requirements:

  • Install MADDE on your computer - it's a quite big download but it may be useful when you'd like to wander into Qt development as well. In this example I will be referring to paths from Windows MADDE but it should be transferable to your


  • Something to open tar.gz files, such as WinRAR or similar.



  • Patience and willingness to learn :)


Workflow when beginning a new theme:

Step 1: Downloading the theme source package template

On this page there is a link that is called Download master as tar.gz. What is this? This is a theme template source package which you can customize to your own needs. Unpack the directory inside this into C:\MADDE\0.5\home\your username. Feel free to rename the directory to your intended theme name.

Step 2: Executing MADDE

In your start menu (or whatever your OS calls it's launcher), there should be MADDE -> MADDE Terminal.

You will now end up in your 'home directory' in MADDE, which is C:\MADDE\0.5\home\your username.

In there, you can 'cd directory name' where directory name is the name you gave the folder/directory from before.

Step 3: Customizing the source package template, basics

In the folder you should now 'sh try_it_out.sh'. This will ask you a couple of questions. You only have to do this once.

It will ask you the following questions:

  • What should the package name of your theme be? (Example: hildon-theme-example)


  • What should be theme name be? (Example: My example theme)


  • Who is the maintainer of this theme?


  • What should the directory name be (Example: example)


It will then set up the theme template.

Step 4: Customize the graphics - the fun step!

You can see in the directory several interesting places. The primary place for your work is in the template directory. This contains template.svg (SVG version of the basis template) and template.png (PNG version of the template). While it is up to you which one you want to edit, remember to always export template.png from the SVG.

Similar directories, icons, background images and other things to customize can be found in the applications directory.

Step 5: Building the source package

When you're done customizing, you can finally build your source package. In MADDE, you can do this:

username $ mad dpkg-buildpackage -S -us -uc -d

This will generate a .dsc and .tar.gz in the parent directory which you can use in the next step.

Step 6: Uploading to Maemo Extras

You can now upload this .dsc and .tar.gz file to Maemo Extras through the Maemo Extras Assistant. The autobuilder will then build the theme package for you and your theme will show up in Extras-devel.

As a bonus, anyone can base their themes upon yours as they have the 'source code' of your theme (under CC SA BY 2.5 conditions) - something not possible with ThemeMaker.

There are probably more maintaining issues which I hope the real theme makers will explore such as adding new versions to changelogs and such and tell about in their blogs.

If you have problems with any of the steps, prod me (Stskeeps) on #maemo , irc.freenode.net or comment this post.