Theme Editor: Added a small PHP script to auto-generate a qrc entry for a directory with aliases for each file

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27298 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-07-05 20:38:04 +00:00
parent 4158192975
commit ac58d02cee
2 changed files with 122 additions and 0 deletions

View file

@ -0,0 +1,46 @@
#!/usr/bin/php -q
<?php
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2010 Robert Bieber
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
if($argc < 2)
$path = getcwd();
else
$path = $argv[1];
if($path[count($path) - 1] != '/')
$path = $path . '/';
$dir = dir($path);
$split = explode("/", $path);
$last = $split[count($split) - 2];
echo "\t<qresource prefix=\"/$last\">\n";
while(false !== ($entry = $dir->read()))
{
if($entry == '.' || $entry == '..')
continue;
echo "\t\t";
echo "<file alias = \"$entry\">";
echo $path . $entry . "</file>";
echo "\n";
}
echo "\t</qresource>\n";
$dir->close();
?>

View file

@ -15,4 +15,80 @@
<file alias="albumart.png">resources/render/albumart.png</file>
<file alias="statusbar.png">resources/render/statusbar.png</file>
</qresource>
<qresource prefix="/fonts">
<file>resources/fonts/05-Tiny.fnt</file>
<file>resources/fonts/06-Tiny.fnt</file>
<file>resources/fonts/07-Fixed.fnt</file>
<file>resources/fonts/08-Atadore.fnt</file>
<file>resources/fonts/08-Fixed.fnt</file>
<file>resources/fonts/08-Namil.fnt</file>
<file>resources/fonts/08-Nedore.fnt</file>
<file>resources/fonts/08-Rockbox-Propfont.fnt</file>
<file>resources/fonts/08-Rockfont.fnt</file>
<file>resources/fonts/08-Sazanami-Mincho.fnt</file>
<file>resources/fonts/08-Schumacher-Clean.fnt</file>
<file>resources/fonts/09-Fixed.fnt</file>
<file>resources/fonts/09-Nedore.fnt</file>
<file>resources/fonts/09-Sazanami-Mincho.fnt</file>
<file>resources/fonts/10-Adobe-Helvetica.fnt</file>
<file>resources/fonts/10-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/10-Artwiz-Snap.fnt</file>
<file>resources/fonts/10-Fixed.fnt</file>
<file>resources/fonts/10-Nimbus.fnt</file>
<file>resources/fonts/10-ProFont.fnt</file>
<file>resources/fonts/10-Sazanami-Mincho.fnt</file>
<file>resources/fonts/11-Nimbus.fnt</file>
<file>resources/fonts/11-ProFont.fnt</file>
<file>resources/fonts/11-Sazanami-Mincho.fnt</file>
<file>resources/fonts/12-Adobe-Helvetica.fnt</file>
<file>resources/fonts/12-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/12-Fixed-SemiCond.fnt</file>
<file>resources/fonts/12-Nimbus.fnt</file>
<file>resources/fonts/12-ProFont.fnt</file>
<file>resources/fonts/12-Sazanami-Mincho.fnt</file>
<file>resources/fonts/12-Terminus.fnt</file>
<file>resources/fonts/13-Fixed.fnt</file>
<file>resources/fonts/13-Fixed-Bold.fnt</file>
<file>resources/fonts/13-Fixed-SemiCond.fnt</file>
<file>resources/fonts/13-Fixed-SemiCond-Bold.fnt</file>
<file>resources/fonts/13-Nimbus.fnt</file>
<file>resources/fonts/13-Sazanami-Mincho.fnt</file>
<file>resources/fonts/14-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/14-Nimbus.fnt</file>
<file>resources/fonts/14-Rockbox-Mix.fnt</file>
<file>resources/fonts/14-Sazanami-Mincho.fnt</file>
<file>resources/fonts/14-Terminus.fnt</file>
<file>resources/fonts/14-Terminus-Bold.fnt</file>
<file>resources/fonts/15-Adobe-Helvetica.fnt</file>
<file>resources/fonts/15-ProFont.fnt</file>
<file>resources/fonts/16-Adobe-Helvetica.fnt</file>
<file>resources/fonts/16-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/16-GNU-Unifont.fnt</file>
<file>resources/fonts/16-Jackash.fnt</file>
<file>resources/fonts/16-Terminus.fnt</file>
<file>resources/fonts/16-Terminus-Bold.fnt</file>
<file>resources/fonts/17-ProFont.fnt</file>
<file>resources/fonts/18-Adobe-Helvetica.fnt</file>
<file>resources/fonts/18-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/18-Fixed.fnt</file>
<file>resources/fonts/18-Fixed-Bold.fnt</file>
<file>resources/fonts/19-Nimbus.fnt</file>
<file>resources/fonts/20-Terminus.fnt</file>
<file>resources/fonts/20-Terminus-Bold.fnt</file>
<file>resources/fonts/21-Adobe-Helvetica.fnt</file>
<file>resources/fonts/21-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/22-ProFont.fnt</file>
<file>resources/fonts/24-Terminus.fnt</file>
<file>resources/fonts/24-Terminus-Bold.fnt</file>
<file>resources/fonts/27-Adobe-Helvetica.fnt</file>
<file>resources/fonts/27-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/28-Terminus.fnt</file>
<file>resources/fonts/28-Terminus-Bold.fnt</file>
<file>resources/fonts/29-ProFont.fnt</file>
<file>resources/fonts/32-Terminus.fnt</file>
<file>resources/fonts/32-Terminus-Bold.fnt</file>
<file>resources/fonts/35-Adobe-Helvetica.fnt</file>
<file>resources/fonts/35-Adobe-Helvetica-Bold.fnt</file>
<file>resources/fonts/35-Nimbus.fnt</file>
</qresource>
</RCC>