Like Charles, build a single ZIP file for each plugin, containing
1/ 32b DLL (name might include
32)
2/ 64b DLL (name should include
64)
3/ all support files, *.chm *.html *.txt *.ini, as applicable (presumably shared by 32b and 65b DLL)
4/ text file containing timestamp, size, and redundancy code (CRC32, MD5, or both) for each file above
All ZIP files may be in the same directory.
For the set of all plugins a text file containing timestamp, size, and redundancy code (CRC32, MD5, or both) for each ZIP file
------------------------------
Having the 32b and 64b DLLs in the same ZIP file increases download time and volume for those who want only one type, reduces it for those who want both.
------------------------------
Assume:
1/ All files to be distributed for plugin XXX are in CWD;
2/ All files named XXX* are part of the distribution, and no others
3/ File named XXX.CAT stores the file attributes of 4/ above
4/ Directory alias PLUGINS refers to the distribution directory
5/ File PLUGINS:\PLUGINS.CAT is the validation file for the ZIP files
6/ The name XXX of the plugin to be added or updated is passed to the batch file as parameter 1
7/ No TCC internal command's name used below is an alias
The batch file below will build the ZIP file and rebuild PLUGINS.CAT.
Code:
@echo off
iff %# lt 1 then
echo No plugin specified - quitting
quit
endiff
del/eqyz %1.cat
:: build catalog to find youngest file AND check minimum file count
sift /r/i/n 4 ages %[1]* > nul:
iff "%ages[2,0]" EQ "" then
echo Not enough files for plugin %1 - quitting
REM 32b DLL, 64b DLL, help
unsetarray ages
quit
endiff
setlocal
:: build archive catalog
pdir /[!%1.cat]/ne /t:wu/(z r m dy-m-d"Z"th:m:s fn) %1* > %1.cat
touch /q /r %@quote[%ages[0,0]] %1.cat
zip /q /l6 /u /i plugins:%1.zip %[1]*
:: change ZIP file timestamp to latest member (ought to be ZIP command option)
touch /q /r %1.cat plugins:%1.zip
pdir /ne /t:wu/(z r m dy-m-d"Z"th:m:s fn) plugins:*.zip > plugins:plugins.cat
unsetarray ages