B4J Question [BANanoVuetifyAD3] Images in the Assets folder not getting updated

Anser

Well-Known Member
Licensed User
Longtime User
Hi,
I am trying to learn BVAD3. I started with a new project.

My first task is to replace few of the Icons/images with my own instead of the default Icons/Images. For eg I have replaced the following 5 images with my own Images and Ico

BANano.Header.AddFavicon("./assets/favicon.ico", "16x16")
BANano.Header.AddAppleTouchIcon("apple-touch-icon.png", "180x180")
BANano.Header.AddManifestIcon("android-chrome-192x192.png", "192x192")
BANano.Header.AddManifestIcon("android-chrome-512x512.png", "512x512")

and also the App Logo displayed on the vAppBar (baseloyout)

I did not change the file names, instead, I created the required images and ICO files with the same file names and resolutions and then copied them using the FileManager in B4J. I physically inspected the Files folder inside my B4J project folder and confirmed that the files have been replaced and the images are changed. Unfortunately when I compile the project, the generated assets folder in the Laragon ie D:\laragon\www\parts\assets is not getting updated with the new images, instead, it is showing the old images itself. I know that I can copy the images directly to the assets folder and the WebApp will read the images from the assets folder, but then I don't think that's the right way.

Here are the screen snapshot of the Project\Files folder and D:\laragon\www\parts\assets folder

Project\Files folder

FilesFolder.png


D:\laragon\www\parts\assets folder

AssetsFolder.png


Is there anything wrong that I am doing? Appreciate your help

Regards
 

Mashiane

Expert
Licensed User
Longtime User
Is there anything wrong that I am doing?
Nope. There is nothing wrong that you are doing. This is by design and it not a bug either.

First, thanks for showing interest in BANanoVuetifyAD3.

The BVAD3 library is made up of source code and resources that comes pre-bundled with it. When you get the BVAD3 source code (so that you can compile to a b4xlib), you also get these resources. As soon as you click Run (on your project) to compile the b4xlib (DO NOT COMPILE TO LIBRARY), all the attached resources are bundled within the b4xlib and become the resources of your project. This has been done on purpose

The good thing is, you have the source code and can customize it to suit your needs and the safe resources that you can remove are the images.

1629191809994.png


You have 2 options:

1. In the BVAD3 library source, remove the images via the Files tab, click Sync, run the library to compile your b4xlib. As these will always come bundled with BVAD3 library, each time there is a new release of the library, you will have to do this over and over and over again.

2. After your project is compiled, copy the resources to your project. Easier option.

All the best!
 
Upvote 0
Top