zipdist.bat 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. @echo off
  2. rem Copyright (C) 2001-2012 Free Software Foundation, Inc.
  3. rem Author: Christoph Scholtes cschol2112 at gmail.com
  4. rem This file is part of GNU Emacs.
  5. rem GNU Emacs is free software: you can redistribute it and/or modify
  6. rem it under the terms of the GNU General Public License as published by
  7. rem the Free Software Foundation, either version 3 of the License, or
  8. rem (at your option) any later version.
  9. rem GNU Emacs is distributed in the hope that it will be useful,
  10. rem but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. rem GNU General Public License for more details.
  13. rem You should have received a copy of the GNU General Public License
  14. rem along with GNU Emacs. If not, see http://www.gnu.org/licenses/.
  15. SETLOCAL
  16. rem arg 1: Emacs version number
  17. set EMACS_VER=%1
  18. set TMP_DIST_DIR=emacs-%EMACS_VER%
  19. rem Check, if 7zip is installed and available on path
  20. :ZIP_CHECK
  21. 7z
  22. if %ERRORLEVEL% NEQ 0 goto :ZIP_ERROR
  23. goto ZIP_DIST
  24. :ZIP_ERROR
  25. echo.
  26. echo ERROR: Make sure 7zip is installed and available on the Windows Path!
  27. goto EXIT
  28. rem Build distributions
  29. :ZIP_DIST
  30. rem Build and verify full distribution
  31. 7z a -bd -tZIP -mx=9 -x!.bzrignore -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-bin-i386.zip %TMP_DIST_DIR%
  32. 7z t emacs-%EMACS_VER%-bin-i386.zip
  33. rem Build and verify binary only distribution
  34. 7z a -bd -tZIP -mx=9 -x!.bzrignore -x!.gitignore -xr!emacs.mdp -xr!*.pdb -xr!*.opt -xr!*~ -xr!CVS -xr!.arch-inventory emacs-%EMACS_VER%-barebin-i386.zip %TMP_DIST_DIR%/README.W32 %TMP_DIST_DIR%/bin %TMP_DIST_DIR%/etc/DOC-X %TMP_DIST_DIR%/COPYING
  35. 7z t emacs-%EMACS_VER%-barebin-i386.zip
  36. goto EXIT
  37. :EXIT