Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  WARNING: skin format changing on the weekend!
« previous next »
  • Print
Pages: [1] 2 3 ... 5

Author Topic: WARNING: skin format changing on the weekend!  (Read 24688 times)

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
WARNING: skin format changing on the weekend!
« on: May 27, 2010, 06:43:02 AM »
After 3.6 is release I will be changing the skin syntax a bit which will make every single skin out there break!

I have updated checkwps to be able to update current skins to the new format (code in my git repo... http://github.com/jdgordon/rockbox skinbreak branch) but other than that there has been no work to update skins.

If someone would like to volunteer to make a web frontend for checkwps to go on the theme site that would be very much appreciated.

http://www.rockbox.org/wiki/SkinBreakingChange outlines the changed tags, the major thing is ()'s are being used for parameterised tags now with comma being the seperator and | only seperating conditional options. (also not that the colours are being taken off the viewport tags and put into new tags).
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: WARNING: skin format changing on the weekend!
« Reply #1 on: May 27, 2010, 03:48:55 PM »
2 things:

1) I think I know enough php to write the code to handle the files, run the program on them, and modify as needed (unless the program outputs modified WPS code) but I don't know the front-end part. I'm not a developer but I do file manipulation as my job and do a fair bit of scripting in both dos batch and korn shell, and bash for my personal computer. Plus I maintain my own website which uses php. I've just never written a submit form wrapper around it. Also, I've never done anything with javascirpt, ruby, or any other web development tools.

So, with all those warnings :) I'm offering my help.

2) Would the site still offer the 3.6-compatible themes? I don't have plans on upgrading past 3.6 when it comes out.
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: WARNING: skin format changing on the weekend!
« Reply #2 on: May 28, 2010, 02:41:05 AM »
(I deleted a bunch on off topic posts, I didnt think splitting was really appropriate, I can undelete them if asked)...

I've written a better update program and put it in svn (although it doesnt work 100% yet)... its in utils/skinupdater if anyone wants to try it (there is also a boiler plater perl script to update a full theme zip file).

I need someone who knows perl to fix that script though. My goal for it is to run it on every theme zip on the site and have that diff file emailed to the theme author.

Yotto: re 2), One thing we might do is clone the current site and make the clone read only which will work for the pre-break builds which includes 3.6
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: WARNING: skin format changing on the weekend!
« Reply #3 on: June 01, 2010, 11:01:00 AM »
Quote from: JdGordon on May 28, 2010, 02:41:05 AM
One thing we might do is clone the current site and make the clone read only which will work for the pre-break builds which includes 3.6
Meaning the 3.6 compatible versions couldn't then be corrected/updated/etc?

Which theme versions would the Rockbox Utility be able to download?
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: WARNING: skin format changing on the weekend!
« Reply #4 on: June 01, 2010, 11:04:03 AM »
it gets tricky... there is talk that a quick fix in rbutil to grab from the 3.6/cloned theme site if it is installing the 3.6 or earlier build. We need to wait for the weekend to see if that happens or not though (Both main rbutil guys are going to be at devcon iirc so it is possible.)
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline atsakir

  • Member
  • *
  • Posts: 35
Re: WARNING: skin format changing on the weekend!
« Reply #5 on: June 02, 2010, 12:27:58 PM »
Should we post 2 different versions of our themes to the themes site to support both 3.5.1 and svn builds that used the old syntax and current builds with the new syntax until the 3.6 release is out?
Logged

Offline csavery

  • Member
  • *
  • Posts: 32
Re: WARNING: skin format changing on the weekend!
« Reply #6 on: June 06, 2010, 05:52:24 AM »
These skin files aren't very big. Why not just add a conditional tag into the format that allows loading either a new or old section according to loader version? Similar to an #ifdef directive. Then the converter could convert all skins in place and they would work for any version. This would make changes to the web site minimal and no need to manage duplicate skins.

Or maybe it's too late for this...

(To clarify - it could just be a comment line that the reader uses as a trigger for what to ignore in the file. eg. Older loaders ignore after #version X, new loaders ignore before #version X)
« Last Edit: June 06, 2010, 06:00:03 AM by csavery »
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: WARNING: skin format changing on the weekend!
« Reply #7 on: June 06, 2010, 05:58:45 AM »
because the rockbox build can only load one format, leaving the parser for the old format would add a massive amount of dead code which we don't want.

The current scheme is going to be a copy of the current theme site for some time until rbutil and the themesite work nicely together to ask for thmes which worked before some revision.

Plan is still to do the changeover today.. waiting for the themesite to happen
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline csavery

  • Member
  • *
  • Posts: 32
Re: WARNING: skin format changing on the weekend!
« Reply #8 on: June 06, 2010, 06:04:53 AM »
There wouldn't be a need to leave the old parser in the code. The new parser would simply ignore code it doesn't read. Eventually the .wps files could all be trimmed to drop the old format codes.

Anyway, I guess there's no point in me commenting on this as it's already in progress. It just seems a little more planning into the new format could have aided a simpler transition with no sites changes or skin author interventions.
Logged

Offline JdGordon

  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: WARNING: skin format changing on the weekend!
« Reply #9 on: June 06, 2010, 06:10:41 AM »
maybe I misunderstood...

Oh you want both formats in the one file? na that would be crazy :p
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: WARNING: skin format changing on the weekend!
« Reply #10 on: June 06, 2010, 06:20:13 AM »
Having both copies of the theme in the same file would be useless - the old parser would always reject them (since it rejects anything it doesn't know as an "invalid" tag). The only way this could work is if the old theme versions were updated to be forward compatible with ignoring the new theme version first, which would of course still break all prior builds anyway.

There's basically always going to be a point of time after which the new files won't work on older builds.
Logged

Offline csavery

  • Member
  • *
  • Posts: 32
Re: WARNING: skin format changing on the weekend!
« Reply #11 on: June 06, 2010, 01:29:34 PM »
Only useless because not well designed to start with. Introducing a version tag (like "#>3") now would make transitions easy in the future. Comments can be used to make code backward compatible but any new parser would have to understand when it should read a comment as code. As a transition device it would work until the 99% of users are on the new version. Then comments could be removed automatically.

eg.

# this is old code only read by old parser
#<3 this special comment tells the new parser not to read this block
%Vl|blah blah|

#now some new code skipped by old parser but understood as a transition block by new parser
#>3
#%Vl(blah, blah)
# and so on
## double comments still really a comment
#>4 version greater than current parser so not read
# someday a batch process removes old code and cuts first # between #>3 and #>4

It just seems like adding an escape sequence understood by the new parser would bypass website issues and make the transition pretty transparent to most users. Adding version tags now would be useful for future updates and the comment escape hack wouldn't be needed once versions tags were standard.
« Last Edit: June 06, 2010, 01:54:20 PM by csavery »
Logged

Offline audio-i

  • Artist
  • Member
  • *
  • Posts: 266
Re: WARNING: skin format changing on the weekend!
« Reply #12 on: June 06, 2010, 02:02:02 PM »
Since I don't see the reason for not adapting the simplest solution (from a user standpoint), I feel I'm looking at this in a very naive way, but anyway... why not just leave the current theme site as it is, modifying this:
The "normal" download would work for 3.6 compatible themes (i.e. the current versions). The current parser puts a "Works with current build", that would be changed for "Doesn't work with current build" and a link for downloading the converted version. If a theme is uploaded with the new syntax, it would work as it works currently (i.e "Works with current build" and no "Works with realease 3.6)

I don't know the statistics, but my guess is, the majority of users use the stable version when available for the target, so IMHO, things should be oriented accordingly. When the new syntax is in the stable version (3.7?), the current themesite scheme could be used again having only the new syntax compatible theme versions.
« Last Edit: June 06, 2010, 04:29:15 PM by audio-i »
Logged

Offline csavery

  • Member
  • *
  • Posts: 32
Re: WARNING: skin format changing on the weekend!
« Reply #13 on: June 06, 2010, 02:26:46 PM »
Here's a refinement on my suggestion above to make code changes simpler...

Old parser skips comments anyway - no change.
New parser understands two new comment escapes:

#>N
means skip if N > parser version - for future updates to avoid comment hacks
(could be generalized for < >= <= etc if desired)

#>-
means remove first # from following code
as a transition mode comment hack since we don't have a version tag now

Adding these two comment escapes would allow for old version compatibility and future version tags.
Then the converter app just converts old version code updated into a comment block in the new version file.

The beauty of this is nothing needs to be changed on the website at all.
Just run the converter on all .wps files and it's done.

If a user edits old version code then the converter can re-save it with comment added.
These files are typically only a few hundred bytes long so it's not like size is a concern and once an old version is finally deprecated the #>- block can be copied back in as normal code. In future only the version tag is needed to transition to new versions.
« Last Edit: June 06, 2010, 02:28:18 PM by csavery »
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: WARNING: skin format changing on the weekend!
« Reply #14 on: June 06, 2010, 04:12:53 PM »
Yes, but saying "it wasn't well designed in the first place" doesn't solve anything, it's still the case. Your solution won't solve this transition.

And to be honest, we generally like themes breaking when someone's using an outdated version of Rockbox - it's a good reminder that you should update from time to time. Major rewrites of the whole theme syntax are few and far between, but there doesn't really need to be a system in place for authors to ensure that their themes remain compatible with drastically outdated versions of Rockbox.
Logged

  • Print
Pages: [1] 2 3 ... 5
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  WARNING: skin format changing on the weekend!
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.106 seconds with 15 queries.