Share My Creation [Tool] Manifest.txt Writer for B4XLib

Version 2.20

1758384997351.png


GitHub: https://github.com/pyhoon/manifest-writer-non-ui-b4j

Download jar: https://github.com/pyhoon/manifest-writer-non-ui-b4j/releases/download/v2.20/manifest-writer.jar

A tool for writing or updating manifest.txt for b4xlib distribution.

How to use

  1. Add the #Macro tag to call manifest-writer.jar from B4X additional libraries folder
    e.g
    B4X:
    #Macro: Title, Version, ide://run?file=%ADDITIONAL%\..\B4X\manifest-writer.jar&Args=%PROJECT%\..\release&Args=%PROJECT%\..\release&Args=Version&Args=add.1
  2. This tool expects at least 2 arguments
  3. First argument is source folder contains the manifest.txt
  4. Second argument is the destination folder where the updated manifest.txt is saved (in my practice I use a release folder)
  5. Adding 2 more arguments to update the entry
    e.g Version add.1
    So the Macro tag will call a command like:
    B4X:
    java.exe -jar manifest-writer.jar source_path destination_path Version add.1
    This will auto increment the version by 0.1
  6. More arguments can be added in pairs
  7. Click the title button to activate the action
Tips:
  1. The manifest.txt file in source folder can be a template with empty values
  2. The source folder can be the same as destination folder
  3. Use %20 or + for blank space in key or value
    e.g. Supported Platforms=B4J (the keys contains a blank space)
    The command should look like:
    B4X:
    java.exe -jar manifest-writer.jar source_path destination_path Version 2.10 Supported+Platforms B4J
 

Attachments

  • manifest-writer.jar
    98.7 KB · Views: 28
Last edited:

aeric

Expert
Licensed User
Longtime User
Version 2.00

What's New​

  1. Support auto increment version
  2. Create an empty source manifest.txt if not exist
  3. Added more macros
  4. Added more logs
  5. Simplified some logic
  6. Added ExitApplication
Edit: There is a bug. The macro is not working with + sign. A patch will be applied on next version.
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Version 2.10

What's New​

  1. Fix bug auto increment not working when using macro
  2. Show version in logs

Auto increment version​

The following macro will update the version number in destination manifest.txt by 0.1
B4X:
#Macro: Title, Version, ide://run?file=%ADDITIONAL%\..\B4X\manifest-writer-non-ui.jar&Args=%PROJECT%\..\release&Args=%PROJECT%\..\release&Args=Version&Args=add.1
Make sure the source and destination are the same.
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Note: In some projects, I will write manifest-writer.jar instead of manifest-writer-non-ui.jar

Nothing special, just a rename of the file name to be shorter.
 

aeric

Expert
Licensed User
Longtime User
Version 2.20

What's New​

  1. Support unlimited even numbers of arguments
  2. Supports removing unused keys with '-' in argument pair value
  3. Handles '+' in arguments for blank space value

Example:
B4X:
#Macro: Title, Update Manifest, ide://run?file=%ADDITIONAL%\..\B4X\manifest-writer.jar&Args=%PROJECT%&Args=%PROJECT%&Args=Version&Args=1.00&Args=B4A.DependsOn&Args=-&Args=B4i.DependsOn&Args=-&Args=B4J.DependsOn&Args=-&Args=DependsOn&Args=B4XCollections&Args=CustomClassTemplates&Args=-&Args=CustomClassTemplates&Args=MiniHtml+View+(Main)|MainView

Original manifest.txt
INI:
Author=Aeric
Version=0.90
B4J.DependsOn=Json,B4XCollections
B4i.DependsOn=iJSON,B4XCollections
B4A.DependsOn=JSON,B4XCollections
CustomClassTemplates=MiniHtml View (Main)|MainView

New manifest.txt
INI:
Author=Aeric
Version=1.00
DependsOn=B4XCollections
CustomClassTemplates=MiniHtml View (Main)|MainView
 
Last edited:
Top