This is an attempt to simplify the process of creating b4xlib projects. It will create an archive file from one or more project folders, allowing you to select the modules and files to add to the library and set the structure if the b4xlib file.
It uses the JDK (if installed) to create the zip fiiles, otherwise you will need to install 7Zip. I tried with winzip but it was slow and the results were unreliable so have removed it for now.
Initial Setup:
The first thing you need to do is set up some paths, you only need to do this once.
Click on Options / File Locations:
If you are going to want to create an archive from multiple projects you need to set a directory where manifests for the multiple projects can be stored. Do this using the Path to Multi Manifests button on the right of the option.
If you want to be able to view the created library file from within the app, you will need to set a path to a GUI zip viewing tool. Do this with the Path to Zip Giu Tool button.
You will see if the JDK jar (used to create the zip files by default) is available. If not select your path to 7Zip with the 7Zip option.
You should see the Archive Method set message at the bottom of the screen to your selected Zip tool.
Go back to the main screen:
Here you need to set the path to the B4xlib folder in which you want to create the library files (Click the open folder button at the top right of the screen).
That's the initial setup complete and the information entered will be remembered on subsequent app starts.
Create deploy data:
You can now add one or more Project folders (Click the + button) that you want to create the library from or drag one or more folders (each of which must contain at least 1 .bas file) from file explorer and drop onto the file list . You will then be presented with a list of modules and files that are contained in the projects. You can identify each module, file or application as belonging to a project by it's colour identifier which you can change by clicking the colour button in the Project Folders list.
The Library name is just a memo field, which will be filled automatically from the project path which you can change if you want to. The Library target is the name for the library you want to create which is initially the same as the Library name, you can change this as well.
Select the Modules and files you want to include and save the Data (File/Save or Ctrl S) somewhere appropriate, but preferably not in the project folder.
Then click Deploy and the library file will be created. If you set up a zip GUI tool in the options menu you can click the view button View attachment 85699 next to the Library target field and the tool will open showing your library. Remember to close it before you try to deploy the library again as the file will be locked.
Additional Info:
When more than 1 project folder is loaded, the Edit Manifest button will automatically edit the Multi Manifest, the Manifests for the individual projects (if there is one) will remain in it's existing location.
You can select a folder for specific targets if a module or file is not appropriate for all (B4a, B4j, B4i).
If you click on an entry in the Apps list, the appropriate B4x version should open and load the project.
Editing of Manifest files is now done in a dialog with just a text area for editing..
The last library loaded will be remembered when you restart the app, to create a new library select File / New DeployData.
As Always, please test this in a safe manner: back up your projects (no code is changed but just in case), set a different target library directory to your main B4x library directory until you are happy that it works as expected.
The project code is in the B4xLibDeploy1.6.zip download and a runnable jar is on my dropbox. Download here.
If you try it, please let me know how you get on with it.
Version 1.1:
Depends On:
It uses the JDK (if installed) to create the zip fiiles, otherwise you will need to install 7Zip. I tried with winzip but it was slow and the results were unreliable so have removed it for now.
Initial Setup:
The first thing you need to do is set up some paths, you only need to do this once.
Click on Options / File Locations:
If you are going to want to create an archive from multiple projects you need to set a directory where manifests for the multiple projects can be stored. Do this using the Path to Multi Manifests button on the right of the option.
If you want to be able to view the created library file from within the app, you will need to set a path to a GUI zip viewing tool. Do this with the Path to Zip Giu Tool button.
You will see if the JDK jar (used to create the zip files by default) is available. If not select your path to 7Zip with the 7Zip option.
You should see the Archive Method set message at the bottom of the screen to your selected Zip tool.
Go back to the main screen:
Here you need to set the path to the B4xlib folder in which you want to create the library files (Click the open folder button at the top right of the screen).
That's the initial setup complete and the information entered will be remembered on subsequent app starts.
Create deploy data:
You can now add one or more Project folders (Click the + button) that you want to create the library from or drag one or more folders (each of which must contain at least 1 .bas file) from file explorer and drop onto the file list . You will then be presented with a list of modules and files that are contained in the projects. You can identify each module, file or application as belonging to a project by it's colour identifier which you can change by clicking the colour button in the Project Folders list.
The Library name is just a memo field, which will be filled automatically from the project path which you can change if you want to. The Library target is the name for the library you want to create which is initially the same as the Library name, you can change this as well.
Select the Modules and files you want to include and save the Data (File/Save or Ctrl S) somewhere appropriate, but preferably not in the project folder.
Then click Deploy and the library file will be created. If you set up a zip GUI tool in the options menu you can click the view button View attachment 85699 next to the Library target field and the tool will open showing your library. Remember to close it before you try to deploy the library again as the file will be locked.
Additional Info:
When more than 1 project folder is loaded, the Edit Manifest button will automatically edit the Multi Manifest, the Manifests for the individual projects (if there is one) will remain in it's existing location.
You can select a folder for specific targets if a module or file is not appropriate for all (B4a, B4j, B4i).
If you click on an entry in the Apps list, the appropriate B4x version should open and load the project.
Editing of Manifest files is now done in a dialog with just a text area for editing..
The last library loaded will be remembered when you restart the app, to create a new library select File / New DeployData.
As Always, please test this in a safe manner: back up your projects (no code is changed but just in case), set a different target library directory to your main B4x library directory until you are happy that it works as expected.
The project code is in the B4xLibDeploy1.6.zip download and a runnable jar is on my dropbox. Download here.
If you try it, please let me know how you get on with it.
Version 1.1:
- Improved creating b4xlibs from multiple projects (see flow above)
- Layout is now responsive.
- Bug fix when deploying lib without creating manifest
- Bug Fix Module Target specific Modules not remembered
- Added select target specific folder for files
- Added create XML from deployed library using Erels code from V1.21 : b4xlib2XML
- Improved manifest management
- Added manifest Author and Version fields to the Gui
- Added check for removed folders
- Small bug fixes
- Added Drag & drop folders (Requires DragAndDrop2 b4xlib)
- Modified XMLGenerator to check for returntype for Subs that do not have parameters.
- Added integrated Library documentation viewer with load and Drag and Drop disabled.
- Internal manifest editor and Improved manifest handling
Depends On:
- BCTextEngine
- DragAndDrop2 b4xlib
- XML2Map b4xlib
- Correctly configured SQLite (jSQL)
- jRandomAccess.
Attachments
Last edited: