|
Rockbox mail archiveSubject: Re: Plan for skin changeover?Re: Plan for skin changeover?
From: Maurus Cuelenaere <mcuelenaere_at_gmail.com>
Date: Wed, 02 Jun 2010 00:06:38 +0200 Op 01-06-10 16:04, Jonathan Gordon schreef: > On 1 June 2010 21:56, Maurus Cuelenaere <mcuelenaere_at_gmail.com> wrote: > >> That shouldn't be really hard, just do something like 'SELECT * FROM targets', assemble the path to the zip and pass it to your converter along with the right args. >> >> > "$ ./updatetheme.pl <zip filename> <working directory>" is the command > for colour and grey targets. it uses working directory for temp files > and the output zip file. mono targets just need to add "-m" after the > <working directory>. > That script also creates a text diff of the changed files which might > be useful to email to authors (or at least keep incase somehing breaks > later) in <working dir>/<theme name>.diff > I just tried this on the theme server, it seems to work OK: <?php $r = sqlite_open("private/themes.db"); $q = sqlite_query($r, "SELECT * FROM targets"); foreach (sqlite_fetch_all($q, SQLITE_ASSOC) as $row) { /* This depends on targets with same resolution having same depth */ $targets[$row['mainlcd']] = $row['depth']; } $q = sqlite_query($r, "SELECT * FROM themes"); foreach (sqlite_fetch_all($q, SQLITE_ASSOC) as $row) { $name = sprintf("private/themes/%s/%s/%s", $row['mainlcd'], $row['shortname'], $row['zipfile']); if (file_exists($name)) { $cmd = sprintf("updatetheme.pl %s %s/tmp", $name, $targets[$row['mainlcd']] == 1 ? "-m " : ""); echo $cmd."\n"; /* Replace this with exec() */ /* Do something with the diff */ } } sqlite_close($r); ?> -- Maurus CuelenaereReceived on 2010-06-02 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |