Page 2 of 9

WF_Builder (watchfaces for Mi Band 4)

Posted: 09 Sep 2019, 07:17
by lumenvindex
Translated my Mi Band 4 watchface editor into English. Maybe someone will find it useful. (Works on Windows 7+)

Download WF_Builder 1.0.4
Screenshot
WFB_104_2.png
WFB_104_2.png (88.5 KiB) Viewed 649285 times
Changelog

Code: Select all

1.0.4
Fixed the order of controls for [Tab] switching.
Removed "Pulse norm" parameter.
Added [F9] hotkey for fast switching to/from Selective palette packing.
1.0.3
Numeric values can now be changed with keyboard arrows.
Pulse indicator behaves similar to Mi Band's original behaviour:
- You can choose up to 7 images, 7th image will appear if the Pulse isn't defined (-1);
- First image appears up to 93 bpm. Other images appear on every next 20 bpm.
1.0.2
Fixed raw.cfg generation function. Selective palette mode is now working.
1.0.1
Added feature of choosing where to save preview (F7) in Options dialog.
Added selective palette mode feature (enable in Options to generate raw.cfg during Palette packing).
Program can now be associated with bin and json files (tries to unpack and open a file from command line parameters).
Inputboxes now show previous value.
1.0.0
Added boxes feature for sections with two pairs of coordinates. It's green if X2>X1 and Y2>Y1, otherwise it's red.
Added magnitude feature. Preview can now have double and triple size.
0.9.8
Added a ruler near preview which is replaced to the right upper corner of a window.
Added grid feature - changeable alignment (left/center), color, size. Don't forget to turn it off before saving to PNG.
Fixed some bugs
0.9.7
Added button highlighting: red button means you need to choose files for this section before packing, yellow button means this feature is optional.
Added optional section [PackingOptions] in Lib\WF_Builder.ini (for advanced user who need to change these options).
Switched to Mi Band 4 WF Tool 1.4.1 - added new sections: time separator, steps icon (it's placing depends on alignment), line progress bar of steps (I know, it works really weird for now, but it works the same way on Mi Band).
Images are now drawn by pixels, ignoring DPI (like they do in Mi Band). But Mi Band 4 WF Tool still needs 96 DPI to draw correct gif.
0.9.6
Fixed color saving in Steps indicator (circle).
Optimized redrawing operation during creating/saving/packing watchfaces.
Changed battery icon preview states to match Mi Band 4 behaviour.
WF_builder allows you to change all known parameters of a watchface. It shows how watchface will look like with different data on it. Program uses Mi Band 4 WF Tool for packing\unpacking watchfaces and has it inside Lib subdirectory. Lots of thanks to @lvpokka for this tool.
Previous versions
1.0.3
WFB_103_2.png
WFB_103_2.png (66.52 KiB) Viewed 650310 times
Download
1.0.2
WFB_102_2.png
WFB_102_2.png (97.89 KiB) Viewed 650723 times
Download
1.0.1
WFB_101_2.png
WFB_101_2.png (66.42 KiB) Viewed 651898 times
Download
1.0.0
WFB_100_2.png
WFB_100_2.png (95.65 KiB) Viewed 652174 times
Download
0.9.8
WFB_098_2.png
WFB_098_2.png (83.54 KiB) Viewed 652340 times
Download
0.9.7
WFB_097_2.png
WFB_097_2.png (71.41 KiB) Viewed 652989 times
Download
0.9.6
WFP_096_2.png
WFP_096_2.png (132.52 KiB) Viewed 653981 times
Download
0.9.5
WFB_095_1.png
WFB_095_1.png (57.03 KiB) Viewed 654813 times
Download
Recommendations
Turned section on? First of all choose all images for it (digits, suffixes, delimiters etc.).
You can choose images from any available directory. The only thing that matters is their order (0, 1, 2, 3, etc.). When saving watchface, images will be written into json-config directory.
When saving json, a backup file is created (file.json turns into file.json_HHMMSS.bak, where HHMMSS is the timestamp).
When packing, binary is renamed with suffix _Palette or _Raw, depending on the chosen mode.
There should be 21 images of weekdays (3 sets of 7 days: 2 chineese sets and 1 international set).
If your weekday sets make watchface too heavy, you may replace first 14 images with one transparent pixel images.
Virus?
There are no viruses in my program, but some antiviruses may see a threat because program is written on Autoit script language.
Program doesn't need admin permissions to work - it only needs write permissions to watchface directory.
But still. Use program at your own risk.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 26 Sep 2019, 18:28
by lumenvindex
mysiak wrote: 26 Sep 2019, 16:38
Did I miss something? :)
There IS exe in the archive. Your antivirus must have eaten it. :mrgreen:

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 27 Sep 2019, 05:03
by mysiak
lumenvindex wrote: 26 Sep 2019, 18:28
mysiak wrote: 26 Sep 2019, 16:38
Did I miss something? :)
There IS exe in the archive. Your antivirus must have eaten it. :mrgreen:
Oh great, you're right. "WF_Builder0.9.7.exe. The Trojan named Artemis!C163E601FD27 was detected and deleted." Interestingly 0.9.5 did not get deleted. Unfortunately I have no control over stupid McAffee on my work PC :\

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 27 Sep 2019, 07:08
by mysiak
Any chance that you could share the au3 file so we, with stupid forced antivirus software can run it directly from source? :)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 27 Sep 2019, 08:17
by lumenvindex
mysiak wrote: 27 Sep 2019, 07:08
share the au3 file
Only if you promise me not to share it with anyone else. :D Mail me about it (see help message in any version of a program).

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 27 Sep 2019, 13:03
by mysiak
lumenvindex wrote: 27 Sep 2019, 08:17
mysiak wrote: 27 Sep 2019, 07:08
share the au3 file
Only if you promise me not to share it with anyone else. :D Mail me about it (see help message in any version of a program).
:D I ended up with a basic Windows XP VM and managed to run WF_Builder in there. As long as it's running in XP I'll be fine. But thanks a lot anyway, I might contact you with this request in the future. :)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 27 Sep 2019, 19:58
by lumenvindex
First message updated: added link to WF_Builder 0.9.8.

UPD: added link to WF_Builder 1.0.0.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 01 Oct 2019, 10:34
by mysiak
I'm having quite interesting problem. Due to a "virus" I must use virtual PC (Windows XP) and here I face difficulty with sorting order of numbers and weekdays.

This is how it works on my XP machine, whenever I load images with "Files" button:
- numbers MUST be "1,2..9,0", otherwise they're shifted by 1 (1 displayed instead of 2 etc.).
- weekdays MUST be "TUE, WED,...MON", otherwise they're shifted by one day (Monday displayed when it's Tuesday etc.).

Once I select them in this "wrong" order and save them, they are saved to the WF folder correctly (0-9, MON-SUN). If I replace WF images directly and reload the JSON file, WF displays and builds correctly. The issue is present only if I load images with "Files" button.

It's pain in the *** to work this way so I would appreciate if anyone has any idea why it's behaving this way. I checked all my localization settings (language, region, ..) and everything seems to be the same with my host Windows 7 where I do not face these issues.

Thanks in advance :)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 01 Oct 2019, 17:21
by lumenvindex
Well, the FileOpenDialog function returns a string with a list of filenames. On Windows XP this function places last filename at the begining. On other versions of Windows this behaviour has changed - filenames list is sorted alphabetically.

Will make some workaround for this situation in 1.0.1 (For now you can try redownloading 1.0.0 and using WF_Builder1.0.0_upx.exe - it has little less score on Virustotal).

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 05:05
by mysiak
Oh wow, never realized this strange behavior of XP. If I select the files in reverse order in the FileOpenDialog (click on the last file first and then shift click on the first file), funnily enough, they are opened in an ascending order.. So you probably don't need to do anything, maybe just raise a warning for unaware XP users like me (if there are any still using XP)..? :)

Thank you for the upx file, but it still gets deleted by McAfee.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 07:32
by lumenvindex
mysiak wrote: 02 Oct 2019, 05:05
So you probably don't need to do anything, maybe just raise a warning
I'll better sort the filenames array for WinXP. You can now try WF_Builder 1.0.1 (first message updated).

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 08:23
by mysiak
Thanks! New method works fine. Just not sure that I understand the difference between "Copy Data & Hdr/Row" and "Copy Data Only" buttons, both seem to load pictures correctly. Also "Exit script" closes the whole WF_builder app, one can easily lose work by clicking this button instead of the red "X" :)

Just wondering - is this new FileOpenDialog going to show on all Windows versions or is it exclusive to XP?

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 08:40
by lumenvindex
mysiak wrote: 02 Oct 2019, 08:23
Just wondering - is this new FileOpenDialog going to show on all Windows versions or is it exclusive to XP?
Oops, this window is for debugging purposes only, I just forgot to remove it. It won't show on other systems than XP.

UPD: Recompiled the binary without it. Redownload, please. Sorry.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 10:15
by mysiak
Thanks a lot, now the magic's done in the background. :)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 16:30
by Avone
Hey OP, so Windows 10 detected a trojan in the program. Please look into this

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 02 Oct 2019, 18:07
by lumenvindex
Avone wrote: 02 Oct 2019, 16:30
Please look into this
Please look into the original post (Virus spoiler). :?
You should use version 1.0.1 - I "removed trojan" from it. :D

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 03 Oct 2019, 13:44
by Freddious
lumenvindex wrote: 02 Oct 2019, 18:07
Avone wrote: 02 Oct 2019, 16:30
Please look into this
Please look into the original post (Virus spoiler). :?
You should use version 1.0.1 - I "removed trojan" from it. :D
Hello lumenvindex!

Im sure im missing something basic, but I try to make an analog clock with custom clock hands. When I click on 'ON' under the analog tab, there appears a basic white hand which dinamically changes when I change the time but when I click on 'FILE' right to the text 'IMAGE' to open my custom hand png, it shows up, but only as a static object and wont change when I change the time. What am I missing?

Cheers,
Ferdinand

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 03 Oct 2019, 13:58
by lumenvindex
Freddious wrote: 03 Oct 2019, 13:44
it shows up, but only as a static object and wont change when I change the time. What am I missing?
Sadly, this image is static on Mi Band 4. You can't choose image file to use as analog hand.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 03 Oct 2019, 14:44
by Freddious
lumenvindex wrote: 03 Oct 2019, 13:58
Sadly, this image is static on Mi Band 4. You can't choose image file to use as analog hand.
Noooo, that's really bad news. :c

I was trying to make this idea of a watchface:
184677_f9eb6d3.jpg
184677_f9eb6d3.jpg (38.5 KiB) Viewed 41045 times
But thanks for your answer anyway!

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 04 Oct 2019, 16:39
by phamaral
Hey! This tool is amazing. It makes it so much easier to put the watchfaces together.
But there is something I want to know if it's possible, i can't find it anywhere.
Do you know if there is a way to change the drawing order of the elements? I want the battery icon to be behind the date, but it renders on the front, covering it up.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 04 Oct 2019, 17:45
by lumenvindex
phamaral wrote: 04 Oct 2019, 16:39
a way to change the drawing order of the elements?
The order is unchangeable. You can only use transparency of the image to show what's under the battery icon.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 10 Oct 2019, 14:44
by awrun
Hello, I try to download the file (WF_Builder1.0.1.zip), but I can not.
Error message is: "Download limit reached. You can still save this file to your Yandex.Disk".
Can I get this editor somehow?

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 10 Oct 2019, 17:15
by lumenvindex
awrun wrote: 10 Oct 2019, 14:44
Download limit reached
Didn't know they have it. Will upload the editor somewhere else ASAP.

UPD: Reuploaded the program, it should solve the problem. At least for a while.

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 11 Oct 2019, 13:46
by awrun
Thank you very much. I have it now, and try to use it. :)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 12 Oct 2019, 18:19
by lumenvindex
awrun wrote: 11 Oct 2019, 13:46
I have it now
Hurry up to get new WF_Builder 1.0.2 before the Download limit reached. :D (First post updated.)

Re: WF_Builder (watchfaces for Mi Band 4)

Posted: 15 Oct 2019, 10:03
by Notarino
Hi , I´ve tried to create a watchface with this gif, but i dont achieve that plays correctly. Could anyone make the watchface ??? i´m so hopeless... Thanks for your attention.

PD: I´ve split the gif in images and I´ve modified the size of images ,but its didnt plays correctly