@echo off
SET PACKDIR=A

if "%2"=="" goto noexename
SET MMCPACKEXENAME=%2
goto doversion
:noexename
SET MMCPACKEXENAME=mpxp_mmc.exe

:doversion
if "%1"=="" goto noversion
SET MMCPACKVERSION=%1
goto dopack
:noversion
SET MMCPACKVERSION=305

:dopack
SET ZIPNAME=MpxplayMMC_v%MMCPACKVERSION%_portable.zip
md %PACKDIR%
md %PACKDIR%\DOCS
del %PACKDIR%\*.exe
del %PACKDIR%\*.ini
del %PACKDIR%\*.diz
del %PACKDIR%\DOCS\*.WIN
del %PACKDIR%\DOCS\*.TXT
del %PACKDIR%\DOCS\*.%VERSION%
del %ZIPNAME%
copy ..\%MMCPACKEXENAME% %PACKDIR%
copy MMC\*.* %PACKDIR%\
copy MMC\DOCS\*.* %PACKDIR%\DOCS\
cd %PACKDIR%
\work\ext\upx\upx.exe -9 %MMCPACKEXENAME%
c:\UTILS\7z.exe a -tzip -r -scsWIN ..\%ZIPNAME% > NUL
cd ..
