B4J Question [BANanoVuetifyAD3] Compile to library as jar or compress as b4xlib?

Solution
BANano libraries generaly have something like this in their AppStart:

B4X:
' start the build
#if release
        BANano.BuildAsB4Xlib("1.25")
#else
        BANano.Build(File.DirApp)
#end if

This allows BANanoLibrary builders to test it (in debug mode) and to make the final .b4xlib (in release mode).

So if you run it in release mode, BANano will make the .b4xlib for you, and put it in your Additional Libraries folder. The generated .jar file in the /Objects folder can be ignored.

Alwaysbusy

alwaysbusy

Expert
Licensed User
Longtime User
BANano libraries generaly have something like this in their AppStart:

B4X:
' start the build
#if release
        BANano.BuildAsB4Xlib("1.25")
#else
        BANano.Build(File.DirApp)
#end if

This allows BANanoLibrary builders to test it (in debug mode) and to make the final .b4xlib (in release mode).

So if you run it in release mode, BANano will make the .b4xlib for you, and put it in your Additional Libraries folder. The generated .jar file in the /Objects folder can be ignored.

Alwaysbusy
 
Upvote 0
Solution

Mashiane

Expert
Licensed User
Longtime User
Hi Aeric

This is what has been currently on the first post of the BVAD3 b4J Tutorial.

1642186208530.png


Do you perhaps think I should perhaps rephrase some of the wording here to make it clearer to some people who might not understand. It could be interpretation Im not sure, and it will help if we could have the same understanding.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
2.2 Copy the contents of the BANanoServer library folder to your B4J External Libraries Folder

Can you explain what are the contents referring to?

Do you mean copy BANanoServer.b4xlib and Template.bjl from B4JServerDemo/Library folder to my B4X/B4J Additional Libraries folder?

1642187562377.png
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
It has to run to make the .b4xlib and it seems you are running out of Java Heap space. Maybe you can try to restart your computer so you start fresh?

Or you can try to add this to the project to increase the VMs heap size:

B4X:
#VirtualMachineArgs: -Xms1024m -Xmx1024m

Note that 32bit JVMs are limited to 2gb.

Alwaysbusy
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Yes it is the same library but there has been a lot of people who had indicated that it does not work.

This also confused me.

So we did a test, the source was provided and people would run the project in their computers, the b4xlib would be generated and it would work.

But copying the same precompiled b4xlib from github would not work. This was odd and it kept happening. Why it happened, I don't have a clue.

So I made a call, and decided to avail the source and people can just run it to generate their own b4xlib from their devices.

Do I like that approach? Hell no.

I guess if we knew what causes it we would know how to deal with it.

But perhaps I should just make available a precompiled b4xlib again as an option again and see what happens.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Yes it is the same library but there has been a lot of people who had indicated that it does not work.

This also confused me.

So we did a test, the source was provided and people would run the project in their computers, the b4xlib would be generated and it would work.

But copying the same precompiled b4xlib from github would not work. This was odd and it kept happening. Why it happened, I don't have a clue.

So I made a call, and decided to avail the source and people can just run it to generate their own b4xlib from their devices.

Do I like that approach? Hell no.

I guess if we knew what causes it we would know how to deal with it.

But perhaps I should just make available a precompiled b4xlib again as an option again and see what happens.
I see. I think 2 options is better in case one doesn't work.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
It is worth for you investigating why your library has problems (I kind of remember you do a lot of 'outside' BANano scope stuff like PostProcessing that may cause this). None of the BANanoLibraries I made ever had such a problem. I would look into the extra assets you may need to copy with some hack.

Alwaysbusy
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Do you perhaps think I should perhaps rephrase some of the wording here to make it clearer to some people who might not understand. It could be interpretation Im not sure, and it will help if we could have the same understanding.
Yes, honestly I think the instructions are not clear enough. I also want to suggest to add the step to copy BVAD3.b4xtemplate to B4J Additional Library.

Extra/Optional suggestions:
1. Either promote just use a single template (drop BVAD3 Blank.b4xtemplate) to avoid further confusion.
2. Call External Libraries Folder as Additional Libraries folder (more familiar for B4X community)
3. Add screenshots of folder contents like my post #4 above
4. Do not advice to run Kitchen Sink project at this point (This is a getting started, a beginner's brain like me need some time to digest, so don't introduce new concept at this moment) Put Kitchen Sink example in other section or next chapter.
5. Let's stop by demonstrating a very minimum template by using the File->New->BVAD3 from B4J menu.
6. Make the GitHub guide as the main. In B4X thread, you have 7 steps (included sub steps like 2.1 and 2.2) while in GitHub readme, it has 11 steps.
7. Avoid introducing BANanoServer at this point
8. What is purpose of BVAD3Classes which doesn't explain why I need to make a reference. Can I skip this step in Get Started?
 
Last edited:
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
1. Either promote just use a single template (drop BVAD3 Blank.b4xtemplate) to avoid further confusion.
This is the current list of files in the "External Libraries" folder on github which should be copied to the "Additional Libraries". Updating the content to reflect "Additional" instead of "External" is right and will be done.

1642241007773.png


The BVAD3 and BVAD3 Blank templates do different things. Perhaps I am using incorrect wording. BVAD3 is composed of 3 pages (including leaflet) whilst the blank template is just 1 page to get one started. The former template is more advanced in terms of what is demonstrated and due to legacy issues has been left intact.

I think people can decide for themselves here and include / not include the templates on their additional libraries folders.

3. Add screenshots of folder contents like my post #4 above
This speaks to the BANanoServer and perhaps to that being advanced, should be removed for now.

5. Let's stop by demonstrating a very minimum template by using the File->New->BVAD3 from B4J menu.
This is covered with Up & Running with Vuetify in 5 minutes using BANanoVuetifyAD3. I can just create a link of that post. If perhaps you feel like a different minimum template will suffice, you can indicate which components it might use besides the ones in that example.

8. What is purpose of BVAD3Classes which doesn't explain why I need to make a reference. Can I skip this step in Get Started?
Perhaps you missed item 4.2. of the BVAD3 main thread.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Upvote 0

aeric

Expert
Licensed User
Longtime User
Hi Aeric

I have made some updates to the github main page as per your comment here. Can you please take a look. After that we can make it as the main guide.


Thank you so much!
Good job on updating the GitHub guide. Hope you can fix the b4xlib issue and the steps could be more simplified.
 
Upvote 0
Top