release.vc9.bat 2.01 KB
Newer Older
Claudio Valerio's avatar
Claudio Valerio committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
REM --------------------------------------------------------------------
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM 
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
REM GNU General Public License for more details.
REM 
REM You should have received a copy of the GNU General Public License
REM along with this program.  If not, see <http://www.gnu.org/licenses/>.
REM ---------------------------------------------------------------------

Claudio Valerio's avatar
Claudio Valerio committed
16
set QT_DIR=..\Qt-sankore3.1
Claudio Valerio's avatar
Claudio Valerio committed
17 18 19 20 21 22 23
set QT_BIN=%QT_DIR%\bin

set VS_BIN="C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"
set WIN_SDK_BIN="C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin"
set INNO_EXE="C:\Program Files\Inno Setup 5\iscc.exe "
set BUILD_DIR=build\win32\release

24
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%
Claudio Valerio's avatar
Claudio Valerio committed
25 26 27

call %VS_BIN%\vcvars32.bat

28 29 30 31 32
REM this checks if the custom qt directory path
REM is correct. This is important because installer
REM pick up dll from this directory
IF NOT EXIST "..\Qt-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR

Claudio Valerio's avatar
Claudio Valerio committed
33 34 35 36
rmdir /S /Q %BUILD_DIR%

set EDITION=MNEMIS_EDITION

37
"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%"
Claudio Valerio's avatar
Claudio Valerio committed
38

39 40 41 42 43 44 45 46
set /p VERSION= < build\win32\release\version
git rev-list --tags --max-count=1 > tmp
set /p LAST_TAG= < tmp
erase tmp
git describe %LAST_TAG% > tmp
set /p LAST_TAG_VERSION=< tmp
erase tmp

Claudio Valerio's avatar
Claudio Valerio committed
47 48 49
echo %VERSION%
echo %LAST_TAG_VERSION%

50
if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR
51

Claudio Valerio's avatar
Claudio Valerio committed
52 53 54 55
nmake release-install

del .\build\win32\release\product\Sankore 3.1.pdb

56
set INSTALLER_NAME=Sankore 3.1
Claudio Valerio's avatar
Claudio Valerio committed
57 58 59 60

set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe

call %INNO_EXE% "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
61 62

:EXIT_WITH_ERROR
63
	echo ERROR