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
translations translations
Search



Donate

Rockbox Technical Forums


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

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  New WYSIWYG Theme Editor and other utilities in one app!
« previous next »
  • Print
Pages: [1]

Author Topic: New WYSIWYG Theme Editor and other utilities in one app!  (Read 4412 times)

Offline Inclement Death

  • Member
  • *
  • Posts: 12
New WYSIWYG Theme Editor and other utilities in one app!
« on: August 31, 2020, 02:38:52 PM »
So, I played around with the existing theme editor and took a look at the code...

It was written in VB6 utilizing Windows Forms. VB6 is a dead language and I want more from a theme editor. So...

I started writing a new one with a C#/WPF front end, CLI (Common Language Interface), and a (hopefully) cross-platform capable C++ back end. The back end will handle all the processing so Linux and Apple devs can attach their own UIs to it for other platforms.

A lot of the UI items will be drag and drop; images, buttons, sliders, etc.

Background image, cached images, and settings will be set in a separate tab.

Images will be resized and converted based on selected device and moved to an %u201CIn Progress%u201D folder. The original images will be held in a temp folder so the theme can be resized for other devices.

The WPS output will be editable and in its own tab or collapsible area (haven%u2019t decided yet).
The goal of this project is to have a theme creator/editor that can package the entire theme and install it to the media player.

I could use some assistance with my screen size JSON file. Need to add all supported devices and their screen sizes. Using JSON because it%u2019s lightweight, easy to understand, and is supported across multiple languages.

I attached the JSON screen size file, but had to change the extension from .json to .txt since they are not in the allowed list.

EDIT: Updated screen size file. Forgot to add color depth.
* PlayerScreenSizes.txt (1.07 kB - downloaded 187 times.)
« Last Edit: August 31, 2020, 03:12:12 PM by Inclement Death »
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #1 on: August 31, 2020, 03:53:31 PM »
You're aware that the Rockbox Theme Editor we have in our git is written in C++, using the Qt framework?
Logged

Offline Inclement Death

  • Member
  • *
  • Posts: 12
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #2 on: August 31, 2020, 07:32:53 PM »
I only saw the one on the "Useful Tools" wiki page... https://www.rockbox.org/wiki/EZWPS

Damn, I thought that was it and wasted a ton of time I could have spent working on something else.

Ok... I'll take a better look in the git repo.
Logged

Offline cereal_killer

  • Member
  • *
  • Posts: 452
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #3 on: September 01, 2020, 11:01:47 AM »
Here is a link to a .exe of the Theme editor, if it is of and help: https://www.reddit.com/r/rockbox/comments/fh001f/build_theme_editor/
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #4 on: September 01, 2020, 04:15:49 PM »
Quote from: Inclement Death on August 31, 2020, 02:38:52 PM
I could use some assistance with my screen size JSON file. Need to add all supported devices and their screen sizes. Using JSON because it%u2019s lightweight, easy to understand, and is supported across multiple languages.

Not a json file but that's what the existing editor is using. Also likely to be somewhat outdated, but well ...
https://git.rockbox.org/cgit/rockbox.git/tree/utils/themeeditor/resources/targetdb
Logged

Offline Inclement Death

  • Member
  • *
  • Posts: 12
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #5 on: September 02, 2020, 04:48:22 PM »
I'm installing QT now. Going to familiarize myself with the code.

Where is the bug list for the Theme Editor? Only found one bug from 2010 and no feature requests in the tracker.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #6 on: September 03, 2020, 01:19:06 PM »
Quote from: Inclement Death on September 02, 2020, 04:48:22 PM
Where is the bug list for the Theme Editor? Only found one bug from 2010 and no feature requests in the tracker.

There is no bug list. There hasn't been much interest in it, so no real bug reports here.

There are also no feature requests. At some point we closed all feature requests, since they simply ended up clogging the tracker.

I'm not planning to maintain it, but since I looked at it I just fixed some build issues of the Theme Editor with Qt5. If you want to do serious work on it I suggest you show around on IRC, since that is where developers hang.

While at it I also created an updated Windows binary. You can find it here: https://drive.google.com/drive/folders/0B8pPsvGJ3RdKfnhyTDAwTWstMlhNR3NDanZURHFzOEI4ZHhoQUJ5OXUzN1NDRlp0U0hZNzQ?usp=sharing
Logged

Offline Inclement Death

  • Member
  • *
  • Posts: 12
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #7 on: September 04, 2020, 03:05:00 AM »
Damn, I fixed most of the build issues with Qt5, but I will revert my changes and grab yours; may solve my linker issue with zlib. Although, it could be an issue with my WSL installation.
« Last Edit: September 04, 2020, 03:12:47 AM by Inclement Death »
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #8 on: September 04, 2020, 10:17:13 AM »
Most issues are simply search and replace (like QString::toAscii() is now toLatin1()). You shouldn't need to use WSL. You only need MinGW, though there is an issue left -- we used msys too in the past. This has been changed long ago, but not for the theme editor. I'm going to address that later today.

After that you should be able to go the qmake; mingw32-make limbo from a cmd window (obviously you need MinGW and Qt in the path, but Qt brings a shortcut for this, or use Qt creator with a MinGW kit)

Edit: Done that. Easiest to build is likely by opening the pro file with Qt Creator and configuring it with a MinGW kit. Works fine for me. No need for WSL or anything extra.
« Last Edit: September 04, 2020, 01:19:42 PM by bluebrother »
Logged

Offline Inclement Death

  • Member
  • *
  • Posts: 12
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #9 on: September 04, 2020, 01:51:17 PM »
WSL makes it easier to use Visual Studio 2019 with the QT extension. I have it set up to open devenv.exe through the terminal window so editing the files won’t screw up the Linux permissions. Most of my Linux experience is using Ubuntu to cross-compile code for IoT devices.

Still have the zlib linker issue; even tried the zlib NuGet package. I’ll figure it out, probably installed the wrong zlib package from apt or it’s a path issue. Downside of C and C++, linker headaches; which is one of the reasons I usually stick to C# frontends and C++ backends with a C++/CLI wrapper.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #10 on: September 04, 2020, 03:36:55 PM »
I don't understand what you're trying to do. The Theme Editor compiles fine as native Windows application. You don't need anything WSL, and no Linux permissions involved.

The only "problem" right now is that there's a Makefile involved, so you need to use MinGW to build, you can't use VS right now (should be easy to fix, but nobody did that so far; you can use it as editor of course, and the Qt extension for VS also doesn't need anything but a Qt installation). Qt comes with MinGW support (and even the environment), so all you need is to install Qt for MinGW, Qt's MinGW tools, and (optionally, if you want an IDE) Qt Creator. Then either use the MinGW shell (Qt installs a shortcut) to run qmake and mingw32-make or open the pro file in Qt Creator. Build. Done.

Don't install random things with NuGet or apt. You don't need that. Qt brings everything that is needed. There are no linker headaches when doing it properly ...
Logged

Offline Inclement Death

  • Member
  • *
  • Posts: 12
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #11 on: September 04, 2020, 04:55:15 PM »
I‘m setting up my dev environment to add features and fix bugs, not just build the latest. My VS install has a cross-compiler with CMake support and the Qt5 extension adds QMake support. Just working on getting the cross-compiler set up properly.

I want to add support for drag drop, image resizing, font conversion, and packaging themes for multiple screen sizes. Basically, I want to make it an easy to use, all-in-one theme editor. I have experience with cross-platform C++ written in Visual Studio for IoT devices running different flavors of Linux.

I don’t code professionally anymore due to a connective tissue disorder that took away most of the fine motor control in my hands and causes my joints to dislocate. I went from typing ~120 words per minute to ~30, on a good day. I’m mostly bedridden, bored as hell, and trying to help out as best I can with the tools I have.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #12 on: September 04, 2020, 05:15:55 PM »
If you're working on Windows why are you trying to cross compile? If you want to work on the code there's no benefit in not working natively since there is no need to do otherwise. It only complicates things, and if you're writing portable code there's no problem in building for another OS later. I also don't see how you want to effectively debug a GUI application remotely. Sure it's possible but why go through all those extra hoops for what? Are you running those c# frontends you mentioned on a different (cross) platform for development as well?

And btw, the Theme Editor is not a pure qmake project. Having qmake support in VS will not be enough, at least for native builds (and I don't see why that should be different for remote builds)

And setting up a dev environment usually starts with getting the current code to compile 🤔
Logged

Offline tobijampar

  • Member
  • *
  • Posts: 1
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #13 on: June 06, 2023, 01:05:51 PM »
Quote from: bluebrother on September 03, 2020, 01:19:06 PM
Quote from: Inclement Death on September 02, 2020, 04:48:22 PM
Where is the bug list for the Theme Editor? Only found one bug from 2010 and no feature requests in the tracker.
While at it I also created an updated Windows binary. You can find it here: https://drive.google.com/drive/folders/0B8pPsvGJ3RdKfnhyTDAwTWstMlhNR3NDanZURHFzOEI4ZHhoQUJ5OXUzN1NDRlp0U0hZNzQ?usp=sharing

After getting back into building a theme I looked for the theme editor again.
Sadly your google drive link does not work any more.
Do you still have the binary, and if so would you re-upload it?

Many thanks
Tobi
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: New WYSIWYG Theme Editor and other utilities in one app!
« Reply #14 on: June 06, 2023, 01:23:40 PM »
At some point Google changed those links., seems old links broke. It's still up, try here:

https://drive.google.com/drive/folders/1MG_GaE0_7r-LoVy57_O-0ZG68U_ARWXG
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  New WYSIWYG Theme Editor and other utilities in one app!
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.083 seconds with 22 queries.