Share My Creation [Tool] Additional Libraries Downloader

Version: 2.60

libdownloader-png.163885

A tool for downloading the updated version or missing libraries for B4A or B4J projects.

Download jar: https://github.com/pyhoon/libget-b4j/releases/download/v2.60/libget.jar
GitHub: https://github.com/pyhoon/libget-b4j

How to use​

  1. Download and put the libget.jar file into B4X additional libraries folder
  2. Open project with the GetLibraries macro
  3. Click the macro
  4. Wait for any download to complete and the tool ended
  5. Refresh the Libraries Manager tab
  6. If downloading missing b4xlib libraries, restart the IDE.

Sharing libs.json file​

  1. Create a libs.json file
  2. Put the libs.json file inside your project's folder (same level as .b4a or .b4j file)
  3. In Main module (or B4XMainPage), add the following Macro tag to the top of the code:
    B4X:
    #Macro: Title, GetLibraries, ide://run?file=%ADDITIONAL%\..\B4X\libget.jar&Args=%PROJECT%&Args=AutoUpdate
  4. Share your project or template.
Note:
First argument is project path containing the libs.json file
Second argument is option

Available options:
  • AutoUpdate (or if second argument is not specified)
  • ForceDowngrade
  • CheckOnly
Sample:
libs.json:
{
    "Libraries": [
        {
            "Name": "MiniJS.b4xlib",
            "Platform": "B4X",
            "Version": 0.40,
            "Link": "https://github.com/pyhoon/MiniJs-B4X/releases/download/v0.40/MiniJs.b4xlib",
            "Update": "https://github.com/pyhoon/MiniJs-B4X/releases/download/v0.40/update.json"
        },
        {
            "Name": "WebApiUtils.b4xlib",
            "Platform": "B4J",
            "Version": 5.90,
            "Link": "https://github.com/pyhoon/WebApiUtils-B4J/releases/download/v5.90/WebApiUtils.b4xlib"
        }        
    ]
}

update.json:
{
    "Name": "MiniJS.b4xlib",
    "Platform": "B4X",
    "Version": 0.50,
    "Link": "https://github.com/pyhoon/MiniJs-B4X/releases/download/v0.50/MiniJs.b4xlib"
}
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Version 1.10

What's New
  • Support B4A project

Changes:
  • Put the libget-non-ui.jar file inside B4X additional folder - so it can be shared with B4A and B4J
  • Comment link now reads libs.json file inside project folder (formerly Objects folder) - file inside Objects folder is deleted in B4A
  • Comment link can be put in B4XMainPage to download all additional libraries for all platforms
Please check updated instructions on first post.
 

aeric

Expert
Licensed User
Longtime User
Version 2.00

What's New
  • Check b4xlib version
  • Second parameter ForceUpdate (boolean)
 

aeric

Expert
Licensed User
Longtime User
Version 2.20

What's New
  • Bug fix
 

aeric

Expert
Licensed User
Longtime User

aeric

Expert
Licensed User
Longtime User
Version 2.50

What's New
  • Add #Macro tag
    • Quickly open Objects folder
    • Rename result.jar
  • Add #CustomBuildAction tag
    • Move jar to B4X Additional Library folder
  • Do no update if major is not same.
    • e.g version 3.x will not updated to version 4.x
  • Update CheckAndLog sub
    • Remove redundant occurrences.
 

aeric

Expert
Licensed User
Longtime User
Version 2.60

What's New
  1. Change second argument ForceUpdate (Boolean) to options (String)
    • AutoUpdate (default if not specified or option is false)
    • ForceDowngrade (or when option is true)
    • CheckOnly (or when option is invalid)
  2. Check for available version update
  3. Logs shows 2 digit decimals for version minor
  4. Show a message to reopen the IDE when downloading missing libraries
  5. Code refactored
In this version, let say you have MiniJS.b4xlib v0.30 and you are opening a Pakai Server v6 project generated from a new version of project template.
You click on the Macro GetLibraries.
This tool will first read libs.json file inside the project.
Let say the required version is v0.40
This tool will read the update.json file from the remote server
Let say there is a newer version v0.50 available
This tool will download the newer version instead of the required version stated in the libs.json, provided the second argument is not set or set to "AutoUpdate".
If the second argument is set to ForceDowngrade, this tool will download version 0.40 even your latest version is v0.50
If the second argument is set to CheckOnly (or any other invalid option) then no download will be executed. The logs will still show the Required version and your Current version.
If there is an error of missing library when opening Pakai Server project, the logs will show a reminder: "Note: Please restart your B4X IDE to refresh libraries." after this tool is executed. Then you need to close the IDE and reopen the project.
 
Last edited:
Top