1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
@echo off
pushd ..\setup\windows\
if not exist ..\releases mkdir ..\releases
rem Set SETUP_VERSION
if not exist set_source_dir.cmd goto ERROR3
call set_source_dir.cmd
rem override SOURCE_DIR
Set SOURCE_DIR="..\..\..\release"
echo Creating noinstall.zip ...
pushd ..\..\..
rem rename directory
rename release "MySQL GUI Tools %SETUP_VERSION_MAIN%"
if not exist "MySQL GUI Tools %SETUP_VERSION_MAIN%" goto ERROR4
del mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win-noinstall.zip 1> nul 2> nul
zip -r9 mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win-noinstall.zip "MySQL GUI Tools %SETUP_VERSION_MAIN%"\*
move mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win-noinstall.zip common\setup\releases\mysql-gui-tools-noinstall-%SETUP_VERSION_BUNDLE%-win32.zip 1> nul
pause
rename "MySQL GUI Tools %SETUP_VERSION_MAIN%" release
popd
:MSI
rem check if source_dir exists
if not exist %SOURCE_DIR% goto ERROR2
echo Creating the GPL version of the msi file...
rem Cleaning is necessary because *.wixobj files must be remade if the license
rem type changes.
make /NOLOGO -f Makefile.mak clean
make /NOLOGO -f Makefile.mak LICENSE_TYPE=gpl all
if errorlevel 1 (
echo BUilding the setup-files failed. Error messages should have been provided above.
) else (
echo Build was successful. You can find the generated files in the bin\dist\ directory.
)
echo Moving msi file to setup\releases\ ...
move mysql_gui_tools.msi ..\releases\mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win32.msi 1> nul
echo Generating md5sums ...
pushd ..\releases
..\..\..\win-external-libs\bin\md5sum.exe mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win32.msi > mysql-gui-tools-%SETUP_VERSION_BUNDLE%-win32.msi.md5
..\..\..\win-external-libs\bin\md5sum.exe mysql-gui-tools-noinstall-%SETUP_VERSION_BUNDLE%-win32.zip > mysql-gui-tools-noinstall-%SETUP_VERSION_BUNDLE%-win32.zip.md5
popd
popd
EXIT /B 0
:ERROR2
echo The release dir cannot be found.
popd
pause
EXIT /B 1
:ERROR3
echo You have to call the SetVersion.cmd batch file in the repos root to set the version correctly.
popd
pause
EXIT /B 1
:ERROR4
echo The bin directory cannot be renamed
popd
pause
EXIT /B 1
|