It is currently Mon Dec 17, 2018 3:40 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 225 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next
Author Message
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Fri Jun 01, 2018 9:29 pm 
Offline
User
User

Joined: Fri Aug 16, 2013 2:52 pm
Posts: 59
Thanks to Fred and Team for the new version! Qt support for Linux is the way to go, I'm very happy about it and can't wait to start testing.

Oh, and by the way: Stay cool about the tone of some people here. Don't need to tell you anything about developing and releasing software, just wanted to let you know that I've been through this for decades by myself. Even if you release a program that calculates next week's lottery numbers, some unhappy ones will complain immediately about any crappy detail you never had in mind. That's just how it is!

I love PB the way it is and it's developing. When the new LTS is ready it's time for another donation!

_________________
This signature was removed by [removed] for your own safety.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Fri Jun 01, 2018 10:18 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5770
Location: Germany
Here is some more info regarding the Qt subsystem:

We have introduced this subsystem because there are a number of problems with the Gtk3 subsystem which are rooted in deep differences between the PB and Gtk philosophy and therefore cannot be fixed easily. Qt is much more "PB friendly" as it turns out. Since Qt is also available under the LGPL since some time, there is also no license issue in the way anymore. We are hoping that this new subsystem becomes stable enough to be the new default on Linux at some point in the future. Don't worry if you still want to use Gtk: We do not plan to remove support for it, it just might stop being the default sometime.

License:
The license is LGPL and we are not statically linking (the binaries provided with the Linux distribution are used). So the license situation is the same as with Gtk. Commercial use should be no problem.

Dependencies:
The minimum Qt version is 5.5.
The following should install everything you need to compile (Ubuntu). The runtime dependencies should be available on any recent Linux distribution already:
Code:
apt-get install qtbase5-dev qttools5-dev qtmultimedia5-dev qtdeclarative5-dev libqt5svg5-dev libqt5webkit5-dev libqt5multimedia5-plugins

Usage:
Just set "qt" as the used subsystem and all related libraries will switch to Qt (there should be no Gtk dependency anymore then). Of course this also means you cannot use any Gtk functions anymore to manipulate the GUI.

Scripting:
Since Qt is a C++ framework we cannot provide simple library imports to allow manipulating PB objects directly via API like it is possible with Gtk (or the Windows API). To allow at least some measure of API access, there is a new QtScript() command available which allows executing JavaScript code in the Qt QML engine and allows access to the PB GUI objects that inherit from QObject. It also allows interaction with the PB runtime library.

The command is simple:
Code:
Result$ = QtScript(Script$)

If you have the PB debugger enabled, then errors in the JavaScript code will be reported through the PB debugger.

The following functions are available inside the script:
Code:
PB object access. Returns the JS object representing the given PB object id.
  gadget(id)
  menu(id)
  statusbar(id)
  systray(id)
  toolbar(id)
  window(id)

Misc functions:
  debug(message)          - send a message to the PB debugger. Does nothing if debugger is off
  dump(object)            - dump a Qt object to a string. Useful for debugging or to discover what members are available in an object

PB Runtime integration:
  runtime.get(key)        - read a PB runtime value (variable, constant)
  runtime.set(key, value) - set a PB runtime variable
  runtime.call(key)       - call a PB runtime procedure. The procedure must have 0 arguments! If you want to pass a value, use runtime.set() on a global variable

More functions may be added later.

An example:
Code:
  Runtime Procedure QtSignalHandler()
    MessageRequester("", "Signal received!")
  EndProcedure 
 
  If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 10,  10, 300, 50, "Original Text")

    ; show the ButtonGadget object's content
    Debug QtScript("dump(gadget(0))")
   
    ; modify the gadget text   
    QtScript(~"gadget(0).text = \"Modified Text\"")
   
    ; Connect a function to the "clicked" signal and call back into PB code
    ; Now if you click the gadget, the procedure is called
    QtScript(~"gadget(0).clicked.connect(function() { runtime.call(\"QtSignalHandler()\"); })")   

    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf


Other OS:
I know some of you are hoping for Qt on all OS, but I don't think this will be happening for various reasons:
  • Even though Qt is cross-platform, there are still a number of OS-specifics that are visible, especially in the details. So we would have to support and bugfix a "different" Qt subsystem for each OS. This is more work than you probably think, even if most of the code is shared.
  • On the other OS we already have a quite good integration with the native API, so we want to focus on that and not spend work on an "alternative" GUI subsystem that most people will not have any use for.
  • To me, having the same underlying framework on all OS only brings a benefit if you have full access to the framework in a cross-platform way as well. If you are limited to only what PB offers through its libraries, then what does it matter if it is Qt or Windows API below? (except that Qt would bring a ton of Dll dependencies on Windows)
  • As I said above, we developed this subsystem to solve a specific problem on Linux. The benefit of having it available on all OS simply do not justify the cost in my opinion.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 12:50 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 421
Location: Germany / one of the fishheads
Thank you very much Fred and Team for the brand new version.
I love the DPI aware feature! Great Job! Image

_________________
Excuse my bad english, my nativ language is german.
PB 5.62, OS: Windows 7 Pro x64, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520
"Happiness is a pet." | "Never run a changing system!"
My current age: 50 years


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 1:58 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1667
kurzer wrote:
I love the DPI aware feature!

I have no idea how it works. Can someone explain?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 4:44 am 
Offline
User
User
User avatar

Joined: Sun Feb 23, 2014 2:05 am
Posts: 76
Location: Australia
fryquez wrote:
Thanks for the DPI Aware feature.
Any thoughts about PerMonitor Awareness? It can be set in the manifest, too.

Code:
<dpiAware>True/PM</dpiAware>
<dpiAwareness>PerMonitorV2, PerMonitor</dpiAwareness>


High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update (1703)


I'm going to have to quote this post and add a big +1 to it. This is definitely something much needed on Windows 10 for multi-monitor setups with different scaling...

Ted.

_________________
https://tuts4you.com


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 6:23 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 25, 2003 9:27 pm
Posts: 188
Location: Kent, UK
freak wrote:
Here is some more info regarding the Qt subsystem:

We have introduced this subsystem because there are a number of problems with the Gtk3 subsystem which are rooted in deep differences between the PB and Gtk philosophy and therefore cannot be fixed easily. Qt is much more "PB friendly" as it turns out. Since Qt is also available under the LGPL since some time, there is also no license issue in the way anymore. We are hoping that this new subsystem becomes stable enough to be the new default on Linux at some point in the future. Don't worry if you still want to use Gtk: We do not plan to remove support for it, it just might stop being the default sometime.

License:
The license is LGPL and we are not statically linking (the binaries provided with the Linux distribution are used). So the license situation is the same as with Gtk. Commercial use should be no problem.

Dependencies:
The minimum Qt version is 5.5.
The following should install everything you need to compile (Ubuntu). The runtime dependencies should be available on any recent Linux distribution already:
Code:
apt-get install qtbase5-dev qttools5-dev qtmultimedia5-dev qtdeclarative5-dev libqt5svg5-dev libqt5webkit5-dev libqt5multimedia5-plugins

Usage:
Just set "qt" as the used subsystem and all related libraries will switch to Qt (there should be no Gtk dependency anymore then). Of course this also means you cannot use any Gtk functions anymore to manipulate the GUI.

Scripting:
Since Qt is a C++ framework we cannot provide simple library imports to allow manipulating PB objects directly via API like it is possible with Gtk (or the Windows API). To allow at least some measure of API access, there is a new QtScript() command available which allows executing JavaScript code in the Qt QML engine and allows access to the PB GUI objects that inherit from QObject. It also allows interaction with the PB runtime library.

The command is simple:
Code:
Result$ = QtScript(Script$)

If you have the PB debugger enabled, then errors in the JavaScript code will be reported through the PB debugger.

The following functions are available inside the script:
Code:
PB object access. Returns the JS object representing the given PB object id.
  gadget(id)
  menu(id)
  statusbar(id)
  systray(id)
  toolbar(id)
  window(id)

Misc functions:
  debug(message)          - send a message to the PB debugger. Does nothing if debugger is off
  dump(object)            - dump a Qt object to a string. Useful for debugging or to discover what members are available in an object

PB Runtime integration:
  runtime.get(key)        - read a PB runtime value (variable, constant)
  runtime.set(key, value) - set a PB runtime variable
  runtime.call(key)       - call a PB runtime procedure. The procedure must have 0 arguments! If you want to pass a value, use runtime.set() on a global variable

More functions may be added later.

An example:
Code:
  Runtime Procedure QtSignalHandler()
    MessageRequester("", "Signal received!")
  EndProcedure 
 
  If OpenWindow(0, 0, 0, 320, 250, "FrameGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 10,  10, 300, 50, "Original Text")

    ; show the ButtonGadget object's content
    Debug QtScript("dump(gadget(0))")
   
    ; modify the gadget text   
    QtScript(~"gadget(0).text = \"Modified Text\"")
   
    ; Connect a function to the "clicked" signal and call back into PB code
    ; Now if you click the gadget, the procedure is called
    QtScript(~"gadget(0).clicked.connect(function() { runtime.call(\"QtSignalHandler()\"); })")   

    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf


Other OS:
I know some of you are hoping for Qt on all OS, but I don't think this will be happening for various reasons:
  • Even though Qt is cross-platform, there are still a number of OS-specifics that are visible, especially in the details. So we would have to support and bugfix a "different" Qt subsystem for each OS. This is more work than you probably think, even if most of the code is shared.
  • On the other OS we already have a quite good integration with the native API, so we want to focus on that and not spend work on an "alternative" GUI subsystem that most people will not have any use for.
  • To me, having the same underlying framework on all OS only brings a benefit if you have full access to the framework in a cross-platform way as well. If you are limited to only what PB offers through its libraries, then what does it matter if it is Qt or Windows API below? (except that Qt would bring a ton of Dll dependencies on Windows)
  • As I said above, we developed this subsystem to solve a specific problem on Linux. The benefit of having it available on all OS simply do not justify the cost in my opinion.
Thank you for the detailed information freak. Keep up the great work Team PB. Things just keep on improving with every release.


Regards

Andy

_________________
Regards

Andy

Image
Registered PB & PureVision User


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 6:46 am 
Offline
Addict
Addict

Joined: Mon Feb 16, 2015 2:49 pm
Posts: 1667
freak wrote:
Qt would bring a ton of Dll dependencies on Windows

No, thanks. :) One of the main advantages of PureBasic is that it creates standalone exes without the need for DLLs and/or runtime files on Windows.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sat Jun 02, 2018 6:48 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Jul 19, 2013 7:36 am
Posts: 165
Location: Novosibirsk
Freak, what Linux distribution are you using for debugging at this stage?

p.s. I already wrote about this.
I suggest in the first stage to test everything in one environment and after achieving stable work,
to gradually look at the possible regress in other distributions.

_________________
Dawn will come inevitably.
His (http://translate.yandex.ru/) English is not as good as we would like
If the English text is not correct, please correct me in private message


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 12:48 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 04, 2013 5:28 pm
Posts: 332
https://msdn.microsoft.com/library/windows/desktop/mt843498(v=vs.85).aspx(d=robot)

1. What kind of level of DPI Awareness this new PB version is aiming for on Windows ?

System, Per-Monitor V1, V2, something else ?

2. Are the new DPI related commands

DesktopResolutionX(), DesktopResolutionY(), DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY()

working even if the DPI Aware check in the compiler's options is disabled ?

3. Do those commands reflect dynamic changes in the DPI settings after the process has been started and if queried report the new values ?

4. Do those commands report updated values if the process window is moved to another screen or are tied to the main screen only ?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 5:56 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 539
Location: US or Estonia
QT over GTK is a much welcome change

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 10:07 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 528
DontTalkToMe wrote:
https://msdn.microsoft.com/library/windows/desktop/mt843498(v=vs.85).aspx(d=robot)
1. What kind of level of DPI Awareness this new PB version is aiming for on Windows ?
System, Per-Monitor V1, V2, something else ?
2. Are the new DPI related commands
DesktopResolutionX(), DesktopResolutionY(), DesktopScaleX(), DesktopScaleY(), DesktopUnscaleX(), DesktopUnscaleY()
working even if the DPI Aware check in the compiler's options is disabled ?
3. Do those commands reflect dynamic changes in the DPI settings after the process has been started and if queried report the new values ?
4. Do those commands report updated values if the process window is moved to another screen or are tied to the main screen only ?


0. Thanks for the link :wink:
1. I don't know
2. No (in my test)
3. No (in my test) but when changing scale Windows ask to rebbot to complete (sometime), so can't test running program.
4. No (in my test)

Test:
Code:
; ! Enable DPIaware in compile

; Config Test: Windows 10 x64 v1803 2 screens
; Screen 1 (right): 20" 1920 x 1080 zoom @ 100%
; Screen 2 (left) : 17" 1280 x 1024 zoom @ 150%

ExamineDesktops()

OpenWindow(0, 0, 0, 500, 300, "", #PB_Window_SystemMenu)

Debug "Screen 1 : " + RSet(Str(DesktopX(0)), 5, " ") + " DesktopResolutionX: " + DesktopResolutionX()
Debug "Screen 2 : " + RSet(Str(DesktopX(1)), 5, " ") + " DesktopResolutionX: " + DesktopResolutionX()

; Move screen from screen 1 to 2

While WaitWindowEvent() <> #PB_Event_CloseWindow
    Debug DesktopResolutionX()
Wend

It also seems that wherever window opens, it is the zoom of the main window that is tested
Code:
OpenWindow(0, 0, -1500, 500, 300, "", #PB_Window_SystemMenu)

Debug "Screen 1 : " + RSet(Str(DesktopX(0)), 5, " ") + " DesktopResolutionX: " + DesktopResolutionX()
Debug "Screen 2 : " + RSet(Str(DesktopX(1)), 5, " ") + " DesktopResolutionX: " + DesktopResolutionX()

Code:
Screen 1 :     0 DesktopResolutionX: 1
Screen 2 : -1280 DesktopResolutionX: 1

But maybe I'm misusing the new features?


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 11:00 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Feb 04, 2013 5:28 pm
Posts: 332
Marc56us wrote:
0. Thanks for the link :wink:


It's a nice one !

Marc56us wrote:
1. I don't know
2. No (in my test)
3. No (in my test) but when changing scale Windows ask to rebbot to complete (sometime), so can't test running program.
4. No (in my test)


Thanks for the tests, I can't do them myself at the moment so I had to ask.
So it seems it's a System DPI awareness kind of thing, done once at startup.

Anyway it would be nice to have some confirmation from Fred


Last edited by DontTalkToMe on Thu Jun 07, 2018 10:40 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 4:02 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Feb 08, 2014 3:26 pm
Posts: 528
useful wrote:
Ubuntu 18.04(64) start IDE = segmentation fault
XUbuntu 16.04(64) start IDE = segmentation fault
Lubuntu 18.04(32) start IDE = segmentation fault

Debian 9.4 x64 / xfce
Code:
sh checkinstall.sh

This script try to detect if all developments packages are correctly installed. If you are using a Debian or Ubuntu like distribution, you can use the following line to install all needed packages:

$ sudo apt-get install gcc g++ libc6-dev libsdl1.2-dev libgtk-3-dev unixodbc-dev libgnome2-dev libxine2-dev libwebkitgtk-3.0-dev libxxf86vm-dev libwebkitgtk-dev libwebkitgtk-3.0-dev

Everything seems correctly setup for PureBasic !

$ cd purebasic
$ ./purebasic

segmentation fault :(

(5.62 works fine) :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 5:11 pm 
Offline
Always Here
Always Here

Joined: Mon Sep 22, 2003 6:45 pm
Posts: 7439
Location: Norway
I only get an error message.
Code:
./purebasic: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./purebasic)
./purebasic: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./purebasic)
./purebasic: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./purebasic)


On Ubuntu 14.04.


Last edited by Trond on Sun Jun 03, 2018 6:13 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 5.70 LTS beta 1 is out !
PostPosted: Sun Jun 03, 2018 6:07 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 11, 2006 12:07 am
Posts: 421
Location: Germany / one of the fishheads
Dude wrote:
kurzer wrote:
I love the DPI aware feature!

I have no idea how it works. Can someone explain?

Simply activate "create DPI aware executable" in the compiler settings and your GUI will be automatically scaled on machines with different monitor DPI settings.

Take the ButtonGadget() example from the help file and compile it with and without the DPI aware checkbox.
If you have changed your desktop scaling to 125%, it should then look like this.

Image

I use a high DPI monitor on my system, so I set the Windows desktop scaling to 125%. Otherwise the font on the desktop would be too small for me.

Non-DPI-aware programs look very small on my screen (like the example on the right). But DPI-aware programs scale their GUI to 125% (in my case) and the ratio "GUI size" to "monitor size" is the same, even if the program runs on a high DPI monitor or on an old 1024-pixel monitor (only if the user has set the desktop scaling to his liking).

_________________
Excuse my bad english, my nativ language is german.
PB 5.62, OS: Windows 7 Pro x64, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520
"Happiness is a pet." | "Never run a changing system!"
My current age: 50 years


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 225 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 15  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye