Include libraries version in PB Documentation!

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Include libraries version in PB Documentation!

Post by Tristano »

On PB website, with new releases often comes news such as "- Updated: SQLite version 3.13.0 ".

But in the actual documentation version numbers of libraries like SQLite, PCRE, Scintilla, ecc., are not mentioned.

I really would like to see, in future updateds of PureBasic documentation, details of the libraries version that come along with PB.

It's not clear to me the reasons for not disclosing information about the libraries version, but knowing the exact version of the library one is working with would make life much easier when studying online documentations and tutorials.

It would be appreciated to see the version mentioned both in the main page of a library, as well as in an Appendix which could list all of PB libraries, their version, and a link to the library website and online documentation.

Thanks.
The PureBASIC Archives: FOSS Resources:
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Include libraries version in PB Documentation!

Post by Tenaja »

+1.


...especially since so many libraries are rarely updated or kept current. I've read the scintilla docs and wondered why I could not get a feature to work only to discover the version PB used was several years old, before the feature was implemented. That is very frustrating.
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Include libraries version in PB Documentation!

Post by StarBootics »

+1

For SQLite this is a workaround :

Code: Select all

Procedure.s GetSQLiteVersion()
  
  Protected DatabaseHandle.i = OpenDatabase(#PB_Any, ":memory:", "", "", #PB_Database_SQLite)
	DatabaseQuery(DatabaseHandle, "SELECT sqlite_version()")
	NextDatabaseRow(DatabaseHandle)
	Protected SQLite_Version.s = GetDatabaseString(DatabaseHandle, 0)
  FinishDatabaseQuery(DatabaseHandle)
	CloseDatabase(DatabaseHandle)
	
	ProcedureReturn SQLite_Version
EndProcedure

CompilerIf #PB_Compiler_IsMainFile
  
  UseSQLiteDatabase()
  Debug GetSQLiteVersion()
  
CompilerEndIf
The Stone Age did not end due to a shortage of stones !
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Include libraries version in PB Documentation!

Post by IdeasVacuum »

+1 it is also sometimes the case that the lib's license is different for different versions
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Include libraries version in PB Documentation!

Post by Keya »

I'd also like to see license info & credits for other algorithms (apologies if such a list already exists but i couldn't find one in the helpfile, although several products like Ogre, udis etc already have license information which is good), for example "AES implementation by John Coder" etc, so that i can then also pay due credit in my app, and also it'd be good to have license information about them such as a simple indication of whether they're Public Domain or otherwise - at the moment it's ambiguous and we just have to assume everything is ok to use, and because the original authors aren't credited i can't personally google for them to find out myself (i'm sure they're all fine to use but clarity would be great for various reasons including legal!)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Include libraries version in PB Documentation!

Post by Fred »

We have a full license file to put with your app if you distribute it:

http://www.purebasic.com/documentation/ ... ation.html
http://www.purebasic.com/documentation/ ... ine3d.html
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Include libraries version in PB Documentation!

Post by Keya »

perfect, thanks! It's hard to find in the help file though - I can't find a way to it via the index, but it is there via search. It'd be good to add a link to it in the Terms & Conditions helpfile page or similar, thanks!
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Include libraries version in PB Documentation!

Post by Dude »

Keya wrote:It's hard to find in the help file though
It's on the front page under the "Legal Information" section.
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: Include libraries version in PB Documentation!

Post by Tristano »

Thanks for the SQLite version hack @StarBootics!

I was wondering if having PB resident constants regarding library versions (eg. #PB_SQLITE_VERSION) wouldn't be a good solution (in addition to having this info in the Help file), so that similar checks could be done from within the source code without having to resort to complex workarounds.

PS: Fred jsut posted a similar hack to peek into PCRE lib version:
http://www.purebasic.fr/english/viewtop ... 16#p495416
The PureBASIC Archives: FOSS Resources:
User avatar
Tristano
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Nov 26, 2015 6:52 pm
Location: Italy
Contact:

Re: Include libraries version in PB Documentation!

Post by Tristano »

PureLibs Info at PB-Archives Repo/Wiki

I’ve started to document PureLibaries info and versions on the PureBASIC Archives Wiki:
And also created a purelibs section in the PureBASIC Archives repo:
It’s still very much WIP, but I’ve included the various hack codes that have been posted around — thanks @StarBootics for your SQLite workaround, I’ve included it with due credits.

I’m trying to put order in my working notes, so when I end up dedicating time to a particular library I then publish there my notes, the docs I’ve found, and any usueful stuff that might help for that lib. Hopefully, this might save some time for others looking for the same info — and, most of all, I hope that others will share their notes and docs too.

Info on PCRE Compile Options

By the way, I’ve also created Get_PCRE_Info.pb, a tool for extracting detailed info about PCRE version and compilation options — it the creates a markdwon table with all the info and place it in the clibpobard. I use it to keep udated the PB Archives documentation.

You can see how its output looks like at this link.

I am not sure that I’m handling correctly C unsigned long integer types ( didn’t have time to investigate it fully), but so fare it seems to do a good job (the C unsigned long issue would affect only a few values anyway).
The PureBASIC Archives: FOSS Resources:
Post Reply