bobscure
8th March 2006, 16:42
Hi there.
First, i started to create nokia s40 themes for my phone, after what i was looking for other releases, and finally, found some cool themes.
However, some themes contain files that interested me and i wished to use them in other theme files...i had to find a way to extract what i was looking for...
I found the answer accidentally...and it is more easier than i thought...
To continue with this tutorial u need to know three or more stuffs:
- U need WinRar archiver and know how to use it (winzip could be ok...however i like winrar)
- U needsome extended text editing program, i have attached the unofficial version 2of notepad.
- U must know how to change a file's extension (...)
- A bit of logic is welcome...
If u have these system requirements, u can go further...LOL
First, u need a .nth file, but to follow step by step this toturial just get "window.nth" attached.
Once in hand, change the "window.nth" file's extension from ".nth" to ".zip" in order to get "window.zip" instead of "window.nth"
Extract content with winrar with option "Extract to Window\"...what do u see in the directory? it's content of course !
OK this tutorial is finished...LOL. No, it is not !
The content of the "window.nth" archive...uh...theme is listed above:
- large_thumbnail.gif
- Window_ss.gif
- Window.jpg
- Window_bk.jpg
- Fast-flying.mid
- theme_descriptor.xml
We will see each file's usage:
- "large_thumbnail.gif" is the thumbnail used to show the file preview when opened in gallery
- "Window.jpg" is the wallpaper
- "Window_bk.jpg" is the menu background
- "Fast-flying.mid" is the ringtone and
- "theme_descriptor.xml" is the file used by the phone to know each file's usage !
If u view the file "theme_descriptor.xml" with the winrar viewer, u will see a such stuff:
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE theme PUBLIC "-//NOKIA//DTD THEME 1.1//EN" "theme.dtd">
<theme name="Window" version="1.1">
<wallpaper src="Window.jpg"/>
<screensaver src="Window_ss.gif"/>
<ringtone src="Fast-flying.mid"/>
<colorscheme color="grey"/>
<background src="Window_bk.jpg"/>
</theme>
However, u cannot edit it, and even window's notepad is unable to do so because it does not respect the line endings (For tech info, line endings - when pressing return key - in windows text files are CR-LF but in the xml file, it is only LF)...it is why i joined notepad 2.
Open the notepad 2
Switch the option "View-> Show line endings" to see the difference.
Now, u know how to view/extract a file's content, now will see how to edit the theme file.
Two ways to do :
- Changing the files included in the theme with yours, respecting exact file names and types.
- Using your custom files...to do, just edit the .xml file and change the fields by yours (eg: in the field <wallpaper src="Window.jpg"/>, the file "Window.jpg" is used as wallpaper, to use "myfile.png" as wallpaper, u should change it to <wallpaper src="myfile.png"/> and so on for menu, ringtone...icons...)
In all cases, u need to inlcude your files in a .zip file using winrar with no sub directory (the files should be directly reachable when opening the archive and not in a directory)
The level of compression does not matter, however, the best level is recommended to get less space busy in the phone.
The last step is to change the archive's extension from ".zip" to ".nth", it's done!
Important:
If u forget to include a file listed in the .xml file, the theme should be considered as corrupted and will not be openable by the phone.
".rar" files do not work, so u have to use the option ".zip" in the archiver's archive format option.
OK,i did'nt said all the stuff u can do with the .nth file and the theme_descriptor.xml file which contains minimum fields, there is more fields, i will list them in a next post, some screenshots would be also welcome, now i am out of time... The aim of this tutorial is extracting a theme's content, because to create ur custom theme, u should use Nokia S40 theme studio (described somewhere in the forum)
Now, it is really finished...
Pass is :
bob_is_dead
First, i started to create nokia s40 themes for my phone, after what i was looking for other releases, and finally, found some cool themes.
However, some themes contain files that interested me and i wished to use them in other theme files...i had to find a way to extract what i was looking for...
I found the answer accidentally...and it is more easier than i thought...
To continue with this tutorial u need to know three or more stuffs:
- U need WinRar archiver and know how to use it (winzip could be ok...however i like winrar)
- U needsome extended text editing program, i have attached the unofficial version 2of notepad.
- U must know how to change a file's extension (...)
- A bit of logic is welcome...
If u have these system requirements, u can go further...LOL
First, u need a .nth file, but to follow step by step this toturial just get "window.nth" attached.
Once in hand, change the "window.nth" file's extension from ".nth" to ".zip" in order to get "window.zip" instead of "window.nth"
Extract content with winrar with option "Extract to Window\"...what do u see in the directory? it's content of course !
OK this tutorial is finished...LOL. No, it is not !
The content of the "window.nth" archive...uh...theme is listed above:
- large_thumbnail.gif
- Window_ss.gif
- Window.jpg
- Window_bk.jpg
- Fast-flying.mid
- theme_descriptor.xml
We will see each file's usage:
- "large_thumbnail.gif" is the thumbnail used to show the file preview when opened in gallery
- "Window.jpg" is the wallpaper
- "Window_bk.jpg" is the menu background
- "Fast-flying.mid" is the ringtone and
- "theme_descriptor.xml" is the file used by the phone to know each file's usage !
If u view the file "theme_descriptor.xml" with the winrar viewer, u will see a such stuff:
<?xml version="1.1" encoding="UTF-8"?>
<!DOCTYPE theme PUBLIC "-//NOKIA//DTD THEME 1.1//EN" "theme.dtd">
<theme name="Window" version="1.1">
<wallpaper src="Window.jpg"/>
<screensaver src="Window_ss.gif"/>
<ringtone src="Fast-flying.mid"/>
<colorscheme color="grey"/>
<background src="Window_bk.jpg"/>
</theme>
However, u cannot edit it, and even window's notepad is unable to do so because it does not respect the line endings (For tech info, line endings - when pressing return key - in windows text files are CR-LF but in the xml file, it is only LF)...it is why i joined notepad 2.
Open the notepad 2
Switch the option "View-> Show line endings" to see the difference.
Now, u know how to view/extract a file's content, now will see how to edit the theme file.
Two ways to do :
- Changing the files included in the theme with yours, respecting exact file names and types.
- Using your custom files...to do, just edit the .xml file and change the fields by yours (eg: in the field <wallpaper src="Window.jpg"/>, the file "Window.jpg" is used as wallpaper, to use "myfile.png" as wallpaper, u should change it to <wallpaper src="myfile.png"/> and so on for menu, ringtone...icons...)
In all cases, u need to inlcude your files in a .zip file using winrar with no sub directory (the files should be directly reachable when opening the archive and not in a directory)
The level of compression does not matter, however, the best level is recommended to get less space busy in the phone.
The last step is to change the archive's extension from ".zip" to ".nth", it's done!
Important:
If u forget to include a file listed in the .xml file, the theme should be considered as corrupted and will not be openable by the phone.
".rar" files do not work, so u have to use the option ".zip" in the archiver's archive format option.
OK,i did'nt said all the stuff u can do with the .nth file and the theme_descriptor.xml file which contains minimum fields, there is more fields, i will list them in a next post, some screenshots would be also welcome, now i am out of time... The aim of this tutorial is extracting a theme's content, because to create ur custom theme, u should use Nokia S40 theme studio (described somewhere in the forum)
Now, it is really finished...
Pass is :
bob_is_dead