1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reply to Steve F (checksums, et c.)

Discussion in 'Plugins' started by vefatica, Sep 18, 2013.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,058
    Likes Received:
    30
    I have MAKENEW.BTM (and MAKENEW64.BTM) which copies plugin DLLs from their build directories, creates accompanying TXT files, and zips them up. A typical scenario is ... weeks/months go by while I play with the 32-bit versions (because I use the 32-bit versions). A time comes when I want to update what's on lucky so I do a "batch build"; if the 32-bit version is up-to-date, it doesn't get rebuilt. I'll try to remember to do "batch rebuild" (no promises).

    If you can suggest something I might put in MAKENEW.BTM that would provide the info you want, either in the TXT file or in a separate file, suggest it.

    P.S. Keep up the packrat behavior. I don't keep old versions.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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
    
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,058
    Likes Received:
    30
    I did a little of what you asked for. Each of the 3 major plugins now has a .DAT file zipped up with it. For example,
    Code:
    c:\users\vefatica\desktop\4plugins> type 4utils.dat
    4utils.dll
    Size:  115712
    CRC: 4AF26560
    MD5: FD4C649B7EB160593BB528E5B3DD399A
    TimeStamp: 2013-09-19 01:15:46
    The ZIP files are touched so their write time matches that of the plugin DLL.

    I also rebuilt everything so all the timestamps should be up-to-date.
     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Thanks, downloaded and expanded all, evaluating later today.
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Sorry, I never reported that all worked (and still works) well. I did come up with an interesting issue re 4autotray. Occasionally the icon disappears from the system tray. I think it happened a few min. ago when I closed the instance which created the tray icon, while another instance remained open. Sorry, I don't know whether or not the open instance was tray-minimized. BTW, I still use the "othertray" version.
     

Share This Page