Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9344 - Mutlitarget WPS Editor

Attached to Project: Rockbox
Opened by krz (krz) - Sunday, 31 August 2008, 12:06 GMT+2
Last edited by Dominik Wenger (Domonoky) - Wednesday, 03 September 2008, 21:25 GMT+2
Task Type Patches
Category Applications
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch enables ability to switch different targets on runtime. Currently not all targets available.
   multitarget_wpseditor.patch (27.9 KiB)
 gui/gui.pro                                 |   80 ++++++++++++------------
 gui/src/QPropertyEditor/QPropertyEditor.pro |   52 +++++++--------
 gui/src/qtrackstate.h                       |    2 
 gui/src/qwpsdrawer.cpp                      |   92 +++++++++++++++++++---------
 gui/src/qwpsdrawer.h                        |   14 ++--
 gui/src/qwpsdrawer_static.cpp               |    6 -
 gui/src/qwpseditorwindow.cpp                |   56 ++++++++++++-----
 gui/src/qwpseditorwindow.h                  |   10 ++-
 gui/src/slider.cpp                          |    6 -
 gui/src/slider.h                            |    1 
 gui/src/utils.h                             |    1 
 gui/ui/mainwindow.ui                        |   40 +++++++-----
 libwps/Makefile                             |    2 
 libwps/src/api.c                            |   44 ++++++-------
 libwps/src/proxy.c                          |    4 -
 libwps/src/proxy.h                          |    4 -
 TODO                                        |    1 
 wpseditor.pro                               |    4 -
 18 files changed, 250 insertions(+), 169 deletions(-)

This task depends upon

Closed by  Dominik Wenger (Domonoky)
Wednesday, 03 September 2008, 21:25 GMT+2
Reason for closing:  Accepted
Comment by krz (krz) - Sunday, 31 August 2008, 18:24 GMT+2
Added comment highliting, added error handling, added debug output. From now default build will be "debug". README tels how to build release.
   multitarget_wpseditor2.patch (32.2 KiB)
 gui/gui.pro                                 |   83 ++++++++++++-----------
 gui/src/QPropertyEditor/QPropertyEditor.pro |   52 +++++++-------
 gui/src/qsyntaxer.cpp                       |   24 ++++++
 gui/src/qsyntaxer.h                         |   22 ++++++
 gui/src/qtrackstate.h                       |    2 
 gui/src/qwpsdrawer.cpp                      |   99 +++++++++++++++++++---------
 gui/src/qwpsdrawer.h                        |   14 ++-
 gui/src/qwpsdrawer_static.cpp               |    6 -
 gui/src/qwpseditorwindow.cpp                |   69 ++++++++++++++-----
 gui/src/qwpseditorwindow.h                  |   10 ++
 gui/src/slider.cpp                          |    6 -
 gui/src/slider.h                            |    1 
 gui/src/utils.cpp                           |    1 
 gui/src/utils.h                             |    1 
 gui/ui/mainwindow.ui                        |   40 ++++++-----
 libwps/Makefile                             |    2 
 libwps/src/api.c                            |   35 ++++-----
 libwps/src/proxy.c                          |    9 +-
 libwps/src/proxy.h                          |    8 +-
 README                                      |    4 -
 TODO                                        |    2 
 wpseditor.pro                               |    4 -
 22 files changed, 316 insertions(+), 178 deletions(-)

Comment by Dominik Riebeling (bluebrother) - Sunday, 31 August 2008, 18:31 GMT+2
it looks like the diff contains some files (almost) completely unchanged -- looks pretty much like a line ending issue to me. Please make sure to ignore line endings when creating diffs (diff -b) so they only contain the real changes.
Comment by Dominik Wenger (Domonoky) - Sunday, 31 August 2008, 20:02 GMT+2
Apart from what bluebrother said, the patch looks nice.

One of the missing things is, the automatic build of the libs.
You could change the build command for libwps in the gui.pro to call the buildall shell script... :-)

Also it seems its only possible to build libwps libs for colour targets. But that can be fixed later.
Comment by Dominik Riebeling (bluebrother) - Sunday, 31 August 2008, 20:55 GMT+2
using a shell script for building the various libwps versions doesn't sound like a good idea to me -- you get a dependency to a sh-compatible shell, and on w32 you most probably won't have one installed. IMO it would be much better using a list with targets to build and trying to use wildcard matching.
Comment by krz (krz) - Tuesday, 02 September 2008, 15:44 GMT+2
New build system. Bat-files for win, sh-files for lunix.
   multitarget_wpseditor5.patch (35.6 KiB)
 utils/wpseditor/buildall.bat                                |    9 +
 utils/wpseditor/buildall.sh                                 |    4 
 utils/wpseditor/gui/gui.pro                                 |   12 -
 utils/wpseditor/gui/src/QPropertyEditor/QPropertyEditor.pro |    2 
 utils/wpseditor/gui/src/qsyntaxer.h                         |   22 ++
 utils/wpseditor/gui/src/qtrackstate.h                       |    2 
 utils/wpseditor/gui/src/qwpsdrawer.cpp                      |   99 ++++++++----
 utils/wpseditor/gui/src/qwpsdrawer.h                        |   14 +
 utils/wpseditor/gui/src/qwpsdrawer_static.cpp               |    6 
 utils/wpseditor/gui/src/qwpseditorwindow.cpp                |   69 ++++++--
 utils/wpseditor/gui/src/qwpseditorwindow.h                  |   10 -
 utils/wpseditor/gui/src/slider.cpp                          |    6 
 utils/wpseditor/gui/src/slider.h                            |    1 
 utils/wpseditor/gui/src/utils.cpp                           |    1 
 utils/wpseditor/gui/src/utils.h                             |    1 
 utils/wpseditor/gui/ui/mainwindow.ui                        |   40 ++--
 utils/wpseditor/libwps/buildall.bat                         |    4 
 utils/wpseditor/libwps/buildall.sh                          |    2 
 utils/wpseditor/libwps/Makefile                             |   55 +++---
 utils/wpseditor/libwps/src/api.c                            |   35 ++--
 utils/wpseditor/libwps/src/proxy.c                          |    9 -
 utils/wpseditor/libwps/src/proxy.h                          |    6 
 utils/wpseditor/libwps/targets.txt                          |   24 --
 utils/wpseditor/README                                      |   10 -
 utils/wpseditor/TODO                                        |   17 +-
 25 files changed, 289 insertions(+), 171 deletions(-)

Comment by Maurus Cuelenaere (mcuelenaere) - Tuesday, 02 September 2008, 23:06 GMT+2
You forgot to include qsyntaxer.cpp in your diff...

Next to that I still get these error messages:
9 libs found
"ERR: failed to resolve <get_model_name>"
"libwps_c200.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_e200.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_gigabeatf.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_gigabeats.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_h10.so" "unknown"
"libwps_h10_5gb.so" "h10_5gb"
"ERR: failed to resolve <get_model_name>"
"libwps_ipodcolor.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_ipodnano.so" "unknown"
"ERR: failed to resolve <get_model_name>"
"libwps_ipodvideo.so" "unknown"

EDIT:
A fix for this is (I'm too lazy to make a one-line patch):
change l.225 in qwpsdrawer.cpp to this:

QString modelName = getModelName(qApp->applicationDirPath()+"/"+libs[i].fileName());


EDIT2:
Building on MingW on Windows seems to be broken for me (using buildall.bat), I can only build by doing 'qmake && make release' in gui & gui/src/QPropertyEditor manually..
Comment by Maurus Cuelenaere (mcuelenaere) - Tuesday, 02 September 2008, 23:50 GMT+2
I took the liberty of adding some extra syntax rules with coloring/formatting.
What do you think?
   wps_editor_qsyntax.diff (2.6 KiB)
 utils/wpseditor/gui/src/qsyntaxer.cpp |   46 ++++++++++++++++++++++++++++++++++
 utils/wpseditor/gui/src/qsyntaxer.h   |   26 +++++++++++++++++++
 2 files changed, 72 insertions(+)

Comment by krz (krz) - Wednesday, 03 September 2008, 19:32 GMT+2
Now qsyntaxer.cpp is included :)

Error "ERR: failed to resolve <get_model_name>" is solved.

To build on mingw you should add your Qt/bin and mingw/bin dirs to PATH and run script from Qt command line.

Your syntax highliting added.
   multitarget_wpseditor6.patch (38.6 KiB)
 utils/wpseditor/buildall.bat                                |    9 
 utils/wpseditor/buildall.sh                                 |    4 
 utils/wpseditor/gui/gui.pro                                 |   12 -
 utils/wpseditor/gui/src/QPropertyEditor/QPropertyEditor.pro |    2 
 utils/wpseditor/gui/src/qsyntaxer.cpp                       |   44 ++++
 utils/wpseditor/gui/src/qsyntaxer.h                         |   21 ++
 utils/wpseditor/gui/src/qtrackstate.h                       |    5 
 utils/wpseditor/gui/src/qwpsdrawer.cpp                      |  112 ++++++++----
 utils/wpseditor/gui/src/qwpsdrawer.h                        |   27 +-
 utils/wpseditor/gui/src/qwpsdrawer_static.cpp               |    7 
 utils/wpseditor/gui/src/qwpseditorwindow.cpp                |   69 +++++--
 utils/wpseditor/gui/src/qwpseditorwindow.h                  |   17 +
 utils/wpseditor/gui/src/slider.cpp                          |    6 
 utils/wpseditor/gui/src/slider.h                            |    1 
 utils/wpseditor/gui/src/utils.cpp                           |    1 
 utils/wpseditor/gui/src/utils.h                             |    1 
 utils/wpseditor/gui/ui/mainwindow.ui                        |   40 ++--
 utils/wpseditor/libwps/buildall.bat                         |    4 
 utils/wpseditor/libwps/buildall.sh                          |    2 
 utils/wpseditor/libwps/Makefile                             |   55 +++--
 utils/wpseditor/libwps/src/api.c                            |   35 +--
 utils/wpseditor/libwps/src/proxy.c                          |    9 
 utils/wpseditor/libwps/src/proxy.h                          |    6 
 utils/wpseditor/libwps/targets.txt                          |   24 --
 utils/wpseditor/README                                      |   10 -
 utils/wpseditor/TODO                                        |   18 +
 26 files changed, 355 insertions(+), 186 deletions(-)

Loading...