We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDUtilities.Version() function
#1
I downloaded the latest version 1.24 and the beta version 1.25 and copied each into the LIB directory.
The file attribute also shows these versions.
However, the LDUtilities.Version() function always runs to error 403 and shows version 1.23.
The extension manager cannot download the database.
Maybe the old URL is still accessed here?
Reply
#2
(09-10-2023, 08:40 PM)Scout Wrote: I downloaded the latest version 1.24 and the beta version 1.25 and copied each into the LIB directory.
The file attribute also shows these versions.
However, the LDUtilities.Version() function always runs to error 403 and shows version 1.23.
The extension manager cannot download the database.
Maybe the old URL is still accessed here?

Hi,

I moved this to a new question, rather a reply to my post.

You should only have one version in the lib folder at a time, so just go for the Beta.
Make sure that you unblock the downloaded zip before unzipping it.
Close Small Basic.
Only copy the litdev.dll and litdev.xml to the lib folder.
As a test, make sure there is nothing else in the lib folder, maybe move anything else you have there to be sure.

For me, then  LDUtilities.Version() works - I tested by downloading, not just using my version.

   

The extension manager had to be updated to cope with the change to website address (where the extensions are stored).
I have updated SB-Prime (needs to be downloaded Version 1.1.8.0) to use the extension manager tool.  The standalone version of the extension manager has not been updated yet.
Reply
#3
I have updated the download for extension manager as well as SB-Prime. In either case, after downloading and unblocking zip, extract the contents to a new folder.
Reply
#4
(09-10-2023, 09:29 PM)litdev Wrote:
(09-10-2023, 08:40 PM)Scout Wrote: I downloaded the latest version 1.24 and the beta version 1.25 and copied each into the LIB directory.
The file attribute also shows these versions.
However, the LDUtilities.Version() function always runs to error 403 and shows version 1.23.
The extension manager cannot download the database.
Maybe the old URL is still accessed here?

Hi,

I moved this to a new question, rather a reply to my post.

You should only have one version in the lib folder at a time, so just go for the Beta.
Make sure that you unblock the downloaded zip before unzipping it.
Close Small Basic.
Only copy the litdev.dll and litdev.xml to the lib folder.
As a test, make sure there is nothing else in the lib folder, maybe move anything else you have there to be sure.

For me, then  LDUtilities.Version() works - I tested by downloading, not just using my version.



The extension manager had to be updated to cope with the change to website address (where the extensions are stored).
I have updated SB-Prime (needs to be downloaded Version 1.1.8.0) to use the extension manager tool.  The standalone version of the extension manager has not been updated yet.

When I sent it I knew it was more of a new thread than an answer (sorry).
Future users want to read something relevant to the topic and not be confronted with any side problems straight away.
Huh
The reason for the "Error 403" in the LDUtilities.Version() function and "Method not found" in the LDNetwork.SetSSL() function was that the program was not saved in a directory. Executing the program directly in the user directory /Appdata/Local/Temp seems to cause problems.
When using the Extension Manager, it became apparent that files were transferred to the Lib directory that might cause confusion, such as XML language versions or SBDebugger.dll. This DLL also showed up in Temp directory and some files like SBExtension...
I think a description of the ExtensionManager's processes and how language versions are handled would be quite helpful.
Reply
#5
Thanks for reply,

Yeah, some of the default MyBB is a bit odd, like the Quote thing.  I think the intended idea it to use the big Black Reply button, but we can see how it goes if folk start using it.  I've initially tried to stick with defaults and try to understand how they designed it to be used before imposing too many changes.

Running LDUtilities.Version() for me without saving works OK, but I have noticed that anti virus stuff does prevent some compiled programs with extensions, so I do tend to save to a folder that I have excluded from MS Windows security - obviously I have not added an exclusion to %temp%.

In brief what the extension manager does is:

1] Gets the SB installation path (for 32 or 64 bit systems), assuming this is the default - there are ways to over-ride the default SB installation location
2] Checks that the lib folder exists, if not, then either the installation path is wrong or lib folder isn't there and it closes with a warning
3] Download the current xml database from my website, if this fails then close.
4] Get the current Small Basic version from SmallBasicLibrary.dll
5] Read the database and setup the interface buttons
6] Add any extensions in the lib, that are not in the database to the interface - some checking that they are SB extensions
7] Go through each extension and check its state, present, active or not (inactive have .dll replaced with ._dll)

If we want to download an extension:
1] Download the zip to a temp file (in %temp%)
2] Unblock the zip
3] Unzip the dowload to a temp folder
4] Some checks on the download for dll and xml files and they are SB extensions
5] If valid, then delete old xml and dll from lib folder if they already exist, then copy downloaded versions
6] UAC may be needed for these actions
7] Check for security (still blocked) of the copied dll and xml
8] Update all the interface button status
9] Finally delete the temp zip file and unzipping folder

There should be warnings if any of the various stages fail - but this may not be perfect.

So xml language versions should not be affected I don't think unless they are in the download zip.  Some De (German) ones are for some extensions, so these would be over-written.  You can always look inthe downloaded database (ExtensionDatabase.xml) to see what xml languages are in each extension zip.

SBDebugger.dll is associated with SB-Prime debugging only, it is not an extension as such.
SBExtension.dll I think is a test extension (on my PC anyway).

When SB is compiled, all required files (exe and all of the lib extension dlls - needed or not) are copied to the run location.  For a saved file this is its location, however for unsaved programs then they all go to %temp%.  I don't think SB cleans them up from %temp% so they will hang around there.  This was one of the issues folk had many years ago and the advice to regularly clean out %temp% folder when using SB without saving to files.

Hope this helps.
Reply
#6
Managed to get the Reply and Quote to work a bit more how I would expect
Reply
#7
Thanks for the detailed information.
The last litdev.dll was copied to the temp directory in August 2020. That was version 1.23, so versions 1.24 and 1.25 were no longer copied to %temp%.
After deleting the entire %temp% directory, version 1.25 was copied to %temp% in directly executable mode and everything worked. So it looks more like the extension is not being copied due to security concerns, but because it already exists.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)