File: MakeSetupGpl.cmd

package info (click to toggle)
mysql-gui-tools 5.0r12-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 105,540 kB
  • ctags: 50,897
  • sloc: sql: 348,439; pascal: 285,780; cpp: 94,578; ansic: 90,768; objc: 33,761; sh: 25,629; xml: 10,924; yacc: 10,755; java: 9,986; php: 2,806; python: 2,068; makefile: 1,945; perl: 3
file content (77 lines) | stat: -rw-r--r-- 2,198 bytes parent folder | download
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