linkchecker/windows/dist.bat

47 lines
1.8 KiB
Batchfile
Raw Normal View History

2012-11-08 11:49:18 +00:00
:: Generating the LinkChecker Windows .exe installer
2011-04-22 06:16:22 +00:00
:: Copyright (C) 2010-2011 Bastian Kleineidam
:: This program is free software; you can redistribute it and/or modify
:: it under the terms of the GNU General Public License as published by
:: the Free Software Foundation; either version 2 of the License, or
:: (at your option) any later version.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License along
:: with this program; if not, write to the Free Software Foundation, Inc.,
:: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2009-02-24 10:56:25 +00:00
@echo off
2010-09-22 22:42:56 +00:00
set PYDIR=C:\Python27
2011-12-26 18:12:30 +00:00
set UPX_EXE="C:\Software\upx308w\upx.exe"
2010-12-20 20:13:06 +00:00
set SZ_EXE="C:\Programme\7-Zip\7z.exe"
for /f "usebackq tokens=*" %%a in (`%PYDIR%\python.exe setup.py --version`) do set VERSION="%%a"
2011-04-27 12:25:36 +00:00
set PORTDIR=LinkChecker-%VERSION%
2010-12-20 22:51:05 +00:00
2012-11-08 11:49:18 +00:00
:: uncomment for skipping portable dist creation
::goto :dist
2011-04-22 06:16:22 +00:00
echo Building portable distribution
set LINKCHECKER_PORTABLE=1
rd /s /q dist > nul
%PYDIR%\python.exe setup.py py2exe
rd /s /q %PORTDIR% > nul
2010-12-20 20:13:06 +00:00
xcopy /e /i dist %PORTDIR%
del %PORTDIR%\omt.iss
echo Compressing Python libraries and executables
:: skip DLL compression as it causes the GUI not to start
for /r %PORTDIR% %%f in (*.pyd,*.exe) do %UPX_EXE% "%%f" --best
echo Generating portable distribution file
2012-10-14 11:48:35 +00:00
%SZ_EXE% a -mx=9 LinkChecker-%VERSION%-portable.zip %PORTDIR%
2010-12-20 22:51:05 +00:00
rd /s /q %PORTDIR%
2012-11-08 11:49:18 +00:00
:dist
set LINKCHECKER_PORTABLE=0
rd /s /q build > nul
call %~dp0\build.bat
rd /s /q dist > nul
%PYDIR%\python.exe setup.py py2exe
:finish