Android Code Snippet [B4X] Comment link to build b4xlib

B4X:
'Ctrl + click to build b4xlib: ide://run?file=%JAVABIN%\jar.exe&WorkingDirectory=%PROJECT%\..&Args=-cMf&Args=%PROJECT_NAME%.b4xlib&&Args=..&Args=*.bas&Args=manifest.txt
It zips the modules files and a manifest.txt file that is expected to be in the same folder.
 
Last edited:
D

Deleted member 103

Guest
Hi Erel,
I only found this function today, and I can say that it is really very useful.
Question: why is this function not added as a menu option in the IDE?
It would be much better for many other users, because as a link comment can get lost.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Question: why is this function not added as a menu option in the IDE?
Because there are many options and different cases. You will quickly see, with real b4xlibs, that you need more flexibility and will actually use a batch file (that can be run with a comment link) to create the library.
 

rtek1000

Active Member
Licensed User
Longtime User
This is based on the new comment link feature. It will work with B4A, B4i and B4J versions to be released next week (July 8, 2020). It will not work with current betas.

B4X:
'Click to build b4xlib: ide://run?file=%JAVABIN%\jar.exe&WorkingDirectory=..&Args=-cMf&Args=LibraryNameHere.b4xlib&&Args=..&Args=*.bas&Args=manifest.txt
It zips the modules files and a manifest.txt file that is expected to be in the same folder.

Note:

The folder path with the source files (.bas and manifest.txt) must go before these dots:

%JAVABIN%\jar.exe&WorkingDirectory=..&Args

%JAVABIN%\jar.exe&WorkingDirectory=
Place_your_folder_here..&Args

B4X:
'Click to build b4xlib: ide://run?file=%JAVABIN%\jar.exe&WorkingDirectory=Place_your_folder_here..&Args=-cMf&Args=LibraryNameHere.b4xlib&&Args=..&Args=*.bas&Args=manifest.txt



And the destination b4xlib file must be in the same folder as the .bas and manifest.txt files


P.S.: And if you want to edit a b4xlib library, rename it to the .zip extension to be able to unzip and access the .bas and manifest.txt files
 
Last edited:

Sandman

Expert
Licensed User
Longtime User
Since this thread was started, we've gotten two new variable aliases to use:
  • %PROJECT%
  • %PROJECT_NAME%

This means we can make the link a little bit more generic:
B4X:
'Ctrl + click to build b4xlib: ide://run?file=%JAVABIN%\jar.exe&WorkingDirectory=%PROJECT%\..&Args=-cMf&Args=%PROJECT_NAME%.b4xlib&&Args=..&Args=*.bas&Args=manifest.txt
 
Top