SWV: A simple HTML/JS desktop GUI engine for PB

Everything else that doesn't fall into one of the other PB categories.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Tristano »

Demo Not Working on Win 10

I've downloaded the Demo 2 and and tried it under Win10: the exe launches, hangs for a short while and then silently crashes.

Tried recompiling form source using PB 5.72 32-bit: same result. Probably the issue is with the DLL itself.

Issues with DLLs that suddenly stop working under Win10 (for whatever mysterious reasons) are my main concern when considering purchasing third party libraries for PB that are shipped as precompiled binaries — I've seen demos of other commercial libraries for PB that were no longer working after less than a year from their release. I'm not sure what's making these binaries break under Win10 (I mean, I have some software from the Win 95 era that still runs under Win10, so there must be something intrinsically broken if they break so soon).

Offering the source code for similar commercial products seems the only viable approach to me.

Also, having to include a DLL with an application which could otherwise be shipped as a standalone binary seems a high price to pay if all that one is getting is Trident engine.

I've also noticed that the https://www.radsix.com website is not showing any home page. Does this mean the SWV project is dead?

WebView2 vs Sciter

It would be nice if the new WebView2 (Edge Chromium) browser component could be made accessible to PureBasic applications — in this case, having to rely on a DLL would be a fair price to pay since you'd be getting all the Chrome features without the bloat (since it's now a native Win 10 component).

Having peaked at the WebView2 documentation it seems that a wrapper is most likely needed — if it's doable at all — because there are quite a lot of requirements, including a dedicate SDK for the component.

If the WebView2 component can't be interfaced to PB apps, I think that Sciter would be the best option, but (as already discussed elsewhere in this forum) a wrapper need to be created.
The PureBASIC Archives: FOSS Resources:
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by firace »

Tristano wrote:Demo Not Working on Win 10

I've downloaded the Demo 2 and and tried it under Win10: the exe launches, hangs for a short while and then silently crashes.

Tried recompiling form source using PB 5.72 32-bit: same result. Probably the issue is with the DLL itself.

Issues with DLLs that suddenly stop working under Win10 (for whatever mysterious reasons) are my main concern when considering purchasing third party libraries for PB that are shipped as precompiled binaries — I've seen demos of other commercial libraries for PB that were no longer working after less than a year from their release. I'm not sure what's making these binaries break under Win10 (I mean, I have some software from the Win 95 era that still runs under Win10, so there must be something intrinsically broken if they break so soon).

Offering the source code for similar commercial products seems the only viable approach to me.

Also, having to include a DLL with an application which could otherwise be shipped as a standalone binary seems a high price to pay if all that one is getting is Trident engine.

I've also noticed that the https://www.radsix.com website is not showing any home page. Does this mean the SWV project is dead?

WebView2 vs Sciter

It would be nice if the new WebView2 (Edge Chromium) browser component could be made accessible to PureBasic applications — in this case, having to rely on a DLL would be a fair price to pay since you'd be getting all the Chrome features without the bloat (since it's now a native Win 10 component).

Having peaked at the WebView2 documentation it seems that a wrapper is most likely needed — if it's doable at all — because there are quite a lot of requirements, including a dedicate SDK for the component.

If the WebView2 component can't be interfaced to PB apps, I think that Sciter would be the best option, but (as already discussed elsewhere in this forum) a wrapper need to be created.
Thanks for your post!
I have been too busy with personal life lately, but the project is definitely still alive.
I have just updated the demo and it should work on Windows 10. Could you try it again? (Note that currently, the DLL is time-limited.)

To address the concerns about source code availability, I plan to offer a "source code included" option for paying customers, once I am ready for the first release.

I am also looking into the feasibility of a Webview2-based SWV version, based on how much demand there would be for it and how much work it would take.
User avatar
Kiffi
Addict
Addict
Posts: 1353
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Kiffi »

Hello,

some time ago I published the first version of a WebViewGadget in the german PureBoard. It is based on the WebView2 from Microsoft. This version has some limitations. The version, which I developed here at home, has much more features.

Because nobody in the German board seems to be interested in the gadget at the moment, I am not in a hurry with the release of the new version.

Notes for those who want to try the WebViewGadget:

* Microsoft requires at least the installation of the new Microsoft Edge from the dev channel in order to use the WebView. If you do not want to install this browser, you can download and install the WebView2 Runtime Installer.

* Currently there is only a 32Bit version of the gadget available. Therefore it can only be called with 32Bit PureBasic programs

* The exe calling the DLL must be located in the same directory as the DLL to be called.

* When the DLL is called for the first time, a kind of temporary user folder is created, which contains such things as cookies, cache and similar things. This folder is about 20 MB in size. By default, this folder is created in the same directory where the WebViewGadget.dll is located. You can change the folder with WebViewGadgetSetUserDataFolder(). For example to the temp directory (WebViewGadgetSetUserDataFolder(GetTemporaryDirectory())

* The use of the WebViewGadget should currently only be used productively at your own risk.

* I don't know yet how to proceed with the WebViewGadget. It is possible that I will release the source, but it is also possible that the gadget will be charged. For this reason, the current version is limited until 31.12.2020. After that date, it can no longer be accessed.


Here you can download and examine the new WebViewGadget together with a small sample source: https://github.com/tuebben/WebViewGadget/releases/tag/0.1a

Do not be surprised: The sample source currently contains only five of > 25 commands.

Greetings ... Peter
Hygge
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by firace »

@kiffi: very interesting :)

However the example fails to run here. I'm getting the following error message:

Code: Select all

!!! WebViewGadget(): Conversion from string "31.12.2020" to type 'Date' is not valid.
(PB 5.72 x86, windows 10 1903)
User avatar
Kiffi
Addict
Addict
Posts: 1353
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Kiffi »

firace wrote:However the example fails to run here.
sorry, please try again: https://github.com/tuebben/WebViewGadget/releases/tag/0.1b

Greetings ... Peter
Hygge
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Tristano »

firace wrote: I have just updated the demo and it should work on Windows 10. Could you try it again? (Note that currently, the DLL is time-limited.)
I've downloaded it again, same result: I get to see the "limited demo" message, then it crashes.

Is the download link correct? I'm downloading the SWV_Demo1_native_x86.zip file, or is there a more recent demo version?

Selling this library with its source code seems reasonable, it enable end users to handle problems if things break up in the future.
Is the DLL created via PB code or in some other languages?

The WebView2 is an interesting alternative, but Ultralight seem to me the most interesting solution:

https://ultralig.ht/

It's really lightweight (8 Mb on Windows), very fast, cross platform (including ARM support) and open source.
Since it supports C bindings it should be usable by PB apps — but the catch is that it requires MSVS 2019 on Windows, so there might problems with PureBasic depending on the C runtime from 2010.

It's even better than Sciter, possibly, for Sciter doesn't (yet) support JavaScript but its own version of it, whereas Ultralight supports it and is heading toward full HTML5 and CSS3 compliance.
Sciter does though offer some interesting GUI-specific features (custom tags and CSS) and very nice database support, but it's commercial.

According to Sciter's author it should be easy to create PB bindings for Sciter, but I'm skeptical about it — with the CRT problem, and the lack of support for 32-bit unsigned integers.

Surely, it's no little work to create bindings (or a wrapper) for either Sciter or Ultralight, especially when it comes to the various options regarding threads, etc., and to do it for all supported platforms.
The PureBASIC Archives: FOSS Resources:
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by firace »

Tristano wrote:
firace wrote: I have just updated the demo and it should work on Windows 10. Could you try it again? (Note that currently, the DLL is time-limited.)
I've downloaded it again, same result: I get to see the "limited demo" message, then it crashes.

Is the download link correct? I'm downloading the SWV_Demo1_native_x86.zip file, or is there a more recent demo version?

Selling this library with its source code seems reasonable, it enable end users to handle problems if things break up in the future.
Is the DLL created via PB code or in some other languages?
Yes this is the correct file: SWV_Demo1_native_x86.zip
Check if the size of the ZIP file is 90344 bytes. If not, please clear your browser cache and try to download it again.

Yes, the DLL is written is PB (about 1300 lines of code currently), with a healthy dose of Windows API.
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by ChrisR »

Tristano wrote: I've downloaded it again, same result: I get to see the "limited demo" message, then it crashes.
here, Windows 10 x64 also, I get the demo message and then it works, I don't know why it's not the same for you!

I discover, it's very interesting.
I hope one day we will be able to develop the kind of interface as presented in SWV
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by ChrisR »

Kiffi wrote: * Microsoft requires at least the installation of the new Microsoft Edge from the dev channel in order to use the WebView. If you do not want to install this browser, you can download and install the WebView2 Runtime Installer.
I tried to download the WebView2 Runtime Installer, I accept the license and get the message:
Your download will begin shortly but nothing happens. Did you have a direct link ?

With Microsoft Edge from the dev channel, it worked well and I got the html5test page: OUR BROWSER SCORES 533 OUT OF 571 POINTS
Webview2 seems very interesting, to be continued. Thanks for your efforts..
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by ChrisR »

About the WebView2 component, shouldn't it be a native PB component in future?
With a call for contributions, if needed, to pay for search, development.
User avatar
Kiffi
Addict
Addict
Posts: 1353
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Kiffi »

@firace: Sorry for hijacking your thread! :oops:
ChrisR wrote:I tried to download the WebView2 Runtime Installer, I accept the license and get the message:
Your download will begin shortly but nothing happens. Did you have a direct link ?
For me it helped to switch off the Ad-Blocker (uBlock). After that the download worked.
ChrisR wrote:About the WebView2 component, shouldn't it be a native PB component in future?
If I have understood this correctly, then in the future the WebView2 - Control will be an integral part of the Microsoft Edge - installation, so that it does not have to be delivered separately from the programmers.

Greetings ... Peter
Hygge
User avatar
ChrisR
Addict
Addict
Posts: 1127
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by ChrisR »

Kiffi wrote:For me it helped to switch off the Ad-Blocker (uBlock). After that the download worked.
Yes, it is indeed uBlock origin that blocked the download. I should have thought about it, thank you

I read the same thing about Control will be an integral part of the Microsoft Edge - installation.
So it will be a native Win10 component, also. I hope it will be the same, native on PB.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Tristano »

firace wrote:Yes this is the correct file: SWV_Demo1_native_x86.zip
Check if the size of the ZIP file is 90344 bytes. If not, please clear your browser cache and try to download it again.
I've downloaded it again using a different browser and now it works — you were right, I was getting a cached version, and the size of the archive differed.

I wonder why so many PB pre-compiled binaries stopped working all of a sudden under Win10. I had to recompile some of my applications that had been working for ages, and all of a sudden started crashing without error, after hanging for a short while. This problem seems to affect binaries compiled with various PB versions.
firace wrote:Yes, the DLL is written is PB (about 1300 lines of code currently), with a healthy dose of Windows API.
This is good news, having access to the code would empower users/customers to feel safe on the long run regarding using this library for their projects.

Personally, I don't feel that by giving the sources to your customers you'd be exposing yourself to losses due to piracy. To begin with, we are a rather tight and affectionate community, so I would count on loyalty in this respect. As for the "bad apples" (wherever they come from) who would pirate your library, they probably are not missed customers anyways, for they wouldn't buy the library if they didn't find it for free.

In general, I think that software protection is a lost battle that ultimately only harms legitimate customers — crackers always find their ways to get their free ride, and strong software protection tend to create a lot of problems for legit customers (from interferences with antiviruses, to the inabilily to continue using a product after its life-end, due to impossibility to register it).

Buying a software product is not only about getting hold of it, it's also about having real time access to updates, getting support for bug fixes and features request. The whole idea is to entrust a third party product to unburden oneself of some maintainance work, in order to spend more time working on one's code/product. Hence the need (and willingness) to pay for tools and libraries that make our developers life easier.

As a final thought, leaving aside all the pros and cons of the WebGadget (and Trident) compared to other browser engines/controls, I would still think that having a PB library that simplifies creating and managing GUIs with the WebGadget would be of great help in many projects, and I'd probably buy it (even if solutions based on WebView2, etc, were available). Sometimes the WebGadget is more than enough for many projects, with all the limitations of Trident; furthermore, if one has already created many assets designed to target IE7/11, it might not be worth the effort of having to port them to Chromium, not if they serve their purpose well enough.

Of course, HTML5 and CSS3 opened to doors to huge improvements and possibilities, but this doesn't mean that all the CHM Help files (HTML for IE7) should be trashed immediately. A book is a book, and if its contents are good then the book is fine (regardless of whether it could be better presented).
The PureBASIC Archives: FOSS Resources:
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 190
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by Tristano »

Actually, firace, I think that if you were to release SWV as an open source project (e.g. on GitHub) that people could use freely for non commercial project, but pay to be able to use it for commercial ones, you might find the strategy more beneficial (this is what Sciter does, for example).

1. It would make SWV more known to the public (since every project would have to credit it and offer a back link).

2. It would enable programmer to start to create free tools which become commercial only once they are mature, and they would pay the license when this happens.

3. Users could contribute to the source library, helping you with its maintenance (you'll need to be clear about the fact that the non-commercial clause remains, and that contributors will not be eligible to take shares in its sales profits, by making them sign an agreement in this regard).

4. Some users will be happy to make spontaneous donations, especially in view of new features requests.

I'm confident that if the library price is going to be reasonable people will be willing to invest in it for their commercial projects.

For many programmers embarking in new projects it's often hard to invest in commercial components if they are not sure whether their product will actually make it to the commercial stage — often the free version is a test ground to determine whether the project has indeed a commercial future or not.

Also, you could think of different commercial licensing terms, ranging from a low entry price per-application, to a life-time unrestricted use permission coming at a higher price.
The PureBASIC Archives: FOSS Resources:
firace
Addict
Addict
Posts: 899
Joined: Wed Nov 09, 2011 8:58 am

Re: SWV: A simple HTML/JS desktop GUI engine for PB

Post by firace »

@Tristano: Thanks a lot for sharing your thoughts and suggestions. I need to take some time off now but will keep them in mind when deciding how to proceed with this project.
Post Reply