Objective:
Add some additional flexibility to @Erel's Zipper utility (https://www.b4x.com/android/forum/threads/comment-links-with-date-and-time.132262/#post-834930)
That utility enables us to have this in our B4XPages projects:
This version introduces something like this, which can be used in traditional (i.e. non-B4XPages) projects as well:
Usage:
- create an exclusions file if desired (see below)
- put ZipperWm.jar and the exclusions file (if desired; it can be stored anywhere you like) in the relevant (B4A/B4I/B4J) additional libraries directories
- add the IDE comment link to your project - see above for an example ("ide://...")
Arguments:
- just one string, starting with the delimiter character between the different arguments you're passing (see above for an example)
- valid arguments are: target <file name or path> exclude <exclusions file path> explorerwine <path to file manager executable> movedown includemodules
- defaults: target file name 'Project.zip', no exclusions file, no explorer for wine specified, no 'movedown', no 'includemodules'
- 'movedown': moves the zip file into the project's top-level directory (as opposed to letting it stay in the parent directory); a B4XPages project is detected by the presence of the 'Shared Files' directory
- 'includemodules': includes modules that aren't present within the project folder, like the IDEs' 'Export As Zip' does; the modules are put in directory 'ZWM_modules' that is created in each relevant folder; when running the IDE on Linux under wine, environment variable 'WINEPREFIX' should be set to a non-empty-string value as internally, references to '...\Documents\...' will then be changed to '...\My Documents\...'
- 'explorerwine': when running the IDE on Linux under wine, this one can be used to open the containing directory after processing; that environment is detected by having a non-empty-string environment variable 'WINEPREFIX'; otherwise it is ignored
- additional argument substitutions (case-SENSITIVE): %DD%, %MM%, %YYYY% for date parts; %HH%, %mm%, %SS% for time parts
Exclusions file (a text file):
- contents are case-insensitive
- lines without a valid prefix or without a value after the '=' are ignored
- multiple lines may exist for each of the 4 types
- directory name (only the name, not the full path): 'D=...' (e.g.: D=archive)
- file extension (with or without a leading '.'): 'E=...' (e.g.: E=exe)
- file name (only the name, not the full path; including extension): 'F=...' (e.g.: F=notneeded.txt)
- full path (file or directory): 'P=...' (e.g.: P=C:\Users\Me\Documents\MyProject\skipthis)
Changes:
- v2.00 - 2024-05-18: new argument 'includemodules'
Enjoy!
Add some additional flexibility to @Erel's Zipper utility (https://www.b4x.com/android/forum/threads/comment-links-with-date-and-time.132262/#post-834930)
That utility enables us to have this in our B4XPages projects:
B4X:
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
This version introduces something like this, which can be used in traditional (i.e. non-B4XPages) projects as well:
B4X:
'Ctrl + click to export as zip: ide://run?File=%ADDITIONAL%\ZipperWm.jar&Args=|target|%PROJECT_NAME%_%YYYY%-%MM%-%DD%.zip|exclude|%ADDITIONAL%\zipperwmexclusions.txt|movedown|includemodules|explorerwine|/usr/bin/nemo
Usage:
- create an exclusions file if desired (see below)
- put ZipperWm.jar and the exclusions file (if desired; it can be stored anywhere you like) in the relevant (B4A/B4I/B4J) additional libraries directories
- add the IDE comment link to your project - see above for an example ("ide://...")
Arguments:
- just one string, starting with the delimiter character between the different arguments you're passing (see above for an example)
- valid arguments are: target <file name or path> exclude <exclusions file path> explorerwine <path to file manager executable> movedown includemodules
- defaults: target file name 'Project.zip', no exclusions file, no explorer for wine specified, no 'movedown', no 'includemodules'
- 'movedown': moves the zip file into the project's top-level directory (as opposed to letting it stay in the parent directory); a B4XPages project is detected by the presence of the 'Shared Files' directory
- 'includemodules': includes modules that aren't present within the project folder, like the IDEs' 'Export As Zip' does; the modules are put in directory 'ZWM_modules' that is created in each relevant folder; when running the IDE on Linux under wine, environment variable 'WINEPREFIX' should be set to a non-empty-string value as internally, references to '...\Documents\...' will then be changed to '...\My Documents\...'
- 'explorerwine': when running the IDE on Linux under wine, this one can be used to open the containing directory after processing; that environment is detected by having a non-empty-string environment variable 'WINEPREFIX'; otherwise it is ignored
- additional argument substitutions (case-SENSITIVE): %DD%, %MM%, %YYYY% for date parts; %HH%, %mm%, %SS% for time parts
Exclusions file (a text file):
- contents are case-insensitive
- lines without a valid prefix or without a value after the '=' are ignored
- multiple lines may exist for each of the 4 types
- directory name (only the name, not the full path): 'D=...' (e.g.: D=archive)
- file extension (with or without a leading '.'): 'E=...' (e.g.: E=exe)
- file name (only the name, not the full path; including extension): 'F=...' (e.g.: F=notneeded.txt)
- full path (file or directory): 'P=...' (e.g.: P=C:\Users\Me\Documents\MyProject\skipthis)
Changes:
- v2.00 - 2024-05-18: new argument 'includemodules'
Enjoy!
Attachments
Last edited: