Page 1 of 1

Include libraries version in PB Documentation!

Posted: Tue Oct 04, 2016 3:42 pm
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.

Re: Include libraries version in PB Documentation!

Posted: Tue Oct 04, 2016 5:12 pm
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.

Re: Include libraries version in PB Documentation!

Posted: Tue Oct 04, 2016 5:56 pm
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

Re: Include libraries version in PB Documentation!

Posted: Wed Oct 05, 2016 1:11 am
by IdeasVacuum
+1 it is also sometimes the case that the lib's license is different for different versions

Re: Include libraries version in PB Documentation!

Posted: Wed Oct 05, 2016 1:17 am
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!)

Re: Include libraries version in PB Documentation!

Posted: Thu Oct 06, 2016 8:23 am
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

Re: Include libraries version in PB Documentation!

Posted: Thu Oct 06, 2016 9:19 am
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!

Re: Include libraries version in PB Documentation!

Posted: Thu Oct 06, 2016 11:30 am
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.

Re: Include libraries version in PB Documentation!

Posted: Thu Oct 06, 2016 4:34 pm
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

Re: Include libraries version in PB Documentation!

Posted: Sun Dec 25, 2016 12:47 pm
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).