New FB version.

For other topics related to the FreeBASIC project or its community.
D.J.Peters
Posts: 8023
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » May 13, 2011 20:47

now you you can load dynamical a lib with linux without to crash a terminal ?
in this case thank you for the "hard" work

Joshy
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » May 14, 2011 3:11

TJF wrote:
Galeon wrote:And installing packages is not something you can just stop whenever you want, ...

There is the prerm script as well, which gets executed before removing an older package (if any). This scipt might be a better choise to check for a non-package-installed FreeBasic version. See:

http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html


I said "you cannot stop the installation of the package" and not "there's no script to remove something before installing the packages". As clear as water, unless it's flood XD.
Landeel
Posts: 735
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Postby Landeel » May 14, 2011 12:42

I said "you cannot stop the installation of the package" and not "there's no script to remove something before installing the packages". As clear as water, unless it's flood XD.


Yeah, I agree the installation can't be interrupted.

But just a warning will do no harm.
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » May 14, 2011 12:45

Landeel wrote:
I said "you cannot stop the installation of the package" and not "there's no script to remove something before installing the packages". As clear as water, unless it's flood XD.


Yeah, I agree the installation can't be interrupted.

But just a warning will do no harm.


Nah, I mean in the time you still haven't thought about the warning.

And I just saying that with TJF hehe. Don't take it as offensive though.
TJF
Posts: 3546
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Postby TJF » May 14, 2011 12:59

Landeel wrote:Yeah, I agree the installation can't be interrupted.

But just a warning will do no harm.

Installation can and should be interrupted.

Just a warning isn't enough. If the old version is not removed/renamed and unpacking goes on after the warning, it's like 'hihi, now something goes wrong and you stupid user cannot do anything against it'.
Landeel
Posts: 735
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Postby Landeel » May 14, 2011 14:20

The installation will not be interrupted even if the scripts return errors.

The package will still be installed, but apt will think the package is not properly configured. I have seen this behaviour before with VirtualBox, VMware, Nvidia drivers, etc. It just doesn't help.

Maybe it should give the option to rename the old fbc automatically, but the warning should be enough.
Landeel
Posts: 735
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Postby Landeel » May 14, 2011 14:28

Updated:

Code: Select all

#!/bin/bash
#FreeBASIC .deb installer prerm script

oldfbc=$(type -P fbc)

title="FreeBASIC Installer"

text="FreeBASIC detected at\n\n$oldfbc.\n\nFirst, since this is a non-package-installed version, move, rename, or uninstall it in order to get this new version running.\n(You may run 'install.sh -u' or 'install-standalone.sh -u' in your archiv folder.)"


if [ $oldfbc ]
        then echo fbc is already installed in $oldfbc

        if [ "$oldfbc" != "/usr/bin/fbc" ]
                then
                if [ $(pidof X) ]
                        then echo X is running
                                if [ $(pidof ksmserver) ]
                                        then echo using kdialog
                                                kdialog --title "$title" --sorry "$text"
                                        else echo looking for zenity
                                        if [ $(type -P zenity) ]
                                                then echo found zenity
                                                        zenity --title "$title" --warning --text "$text"
                                                else echo using dialog
                                                        dialog --title "$title" --msgbox "$text" 12 48
                                        fi
                                fi
                        else echo X is NOT running
                                dialog --title "$title" --msgbox "$text" 12 48
                        fi
        fi

        else echo fbc is not installed yet.
fi
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » May 14, 2011 15:06

Hai, hai. With that mis-configured something, I can see a disaster. It's even a bigger problem than our current problem!!!
Galeon
Posts: 563
Joined: Apr 08, 2009 5:30
Location: Philippines
Contact:

Postby Galeon » May 15, 2011 15:08

You may add a message in the download section of SourceForge by adding a README file. There you can explain this situation!
dkl
Site Admin
Posts: 3210
Joined: Jul 28, 2005 14:45
Location: Germany

Postby dkl » May 15, 2011 17:13

Allright, I added a "you should uninstall the old FB" note to the news post, and there now also is that readme at the SourceForge downloads page.

It's indeed true that uninstalling the previous version is typically what you want to do, but not always. Not even the FB Windows installer does that. I had added a check for that in 0.21.1, but removed it again now, because it did feel like a restriction of the user's freedom. A proper FB Debian package will never care about /usr/local, because that's not its job.

D.J.Peters wrote:now you you can load dynamical a lib with linux without to crash a terminal ?

I think that problem is still around, unfortunately. I looked at it a while back but couldn't figure out what exactly the problem was. The FB runtime is doing some magic to get INPUT and such working on Linux, and with the shared library there are two FB runtimes around (one in the executable, the other in the .so), and that's all possibly part of the problem.
Landeel
Posts: 735
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Postby Landeel » May 16, 2011 15:21

I still think the warning dialog is a good idea.

1) It would not break anything. Many official debian packages use this kind of script to do pre-install and post-install verifications and procedures.

2) It would not affect most of the users at all. The dialog would only show-up if the user have fbc installed in a non-standard directory.

3) It would avoid dozens of useless posts in this forum, like "fbc -version still reports old version".

4) It would avoid useless bug reports (people running an old version thinking they're running the fresh one).
D.J.Peters
Posts: 8023
Joined: May 28, 2005 3:28
Contact:

Postby D.J.Peters » May 27, 2011 11:42

i tested 0.22 on WIN and LIN now

good job so far

the example "examples/manual/gfx/screenglproc.bas" is included for WIN and LIN but used WINDOWS only code.

here are for WIN and LIN

Code: Select all

#include "fbgfx.bi"

#ifndef __FB_WIN32__
# ifdef __FB_DOS__
# error must be WINDOWS or LINUX
# else
  const as string SWAP_EXTENSION = "GLX_SGI_swap_control" ' LINUX
# endif
#else
  const as string SWAP_EXTENSION = "WGL_EXT_swap_control" ' WINDOWS
#endif

Dim SwapInterval As Function(ByVal interval As Integer) As Integer
Dim extensions As String

'' Setup OpenGL and retrieve supported extensions
ScreenRes 640, 480, 32,, FB.GFX_OPENGL
ScreenControl FB.GET_GL_EXTENSIONS, extensions

If (InStr(extensions, SWAP_EXTENSION) <> 0) Then
  '' extension supported, retrieve proc address
  SwapInterval = ScreenGLProc(SWAP_EXTENSION)
  If (SwapInterval <> 0) Then
    '' Ok, we got it. Set OpenGL to wait for vertical sync on buffer swaps
    SwapInterval(1)
  End If
End If

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests