release.win7.vc9.bat 2.4 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 16 17 18 19 20 21 22 23 24 25
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 ---------------------------------------------------------------------

set QT_DIR=..\Qt-sankore3.1
set QT_BIN=%QT_DIR%\bin

set PROGRAMS_FILE_PATH=C:\Program Files

set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe 
set BUILD_DIR=build\win32\release
26
set LRELEASE=%QT_DIR%\bin\lrelease
27
set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
Claudio Valerio's avatar
Claudio Valerio committed
28 29 30 31 32 33 34 35 36 37 38 39

set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%

call "%VS_BIN%\vcvars32.bat"

echo %PATH%

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

40
rmdir /S /Q %BUILD_DIR%
Claudio Valerio's avatar
Claudio Valerio committed
41 42 43 44 45

set EDITION=MNEMIS_EDITION

"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%"

46 47
%LRELEASE% Sankore_3.1.pro

48 49 50 51 52 53 54
REM set /p VERSION= < build\win32\release\version
REM git rev-list --tags --max-count=1 > tmp
REM set /p LAST_TAG= < tmp
REM erase tmp
REM git describe %LAST_TAG% > tmp
REM set /p LAST_TAG_VERSION=< tmp
REM erase tmp
Claudio Valerio's avatar
Claudio Valerio committed
55

56 57
REM echo %VERSION%
REM echo %LAST_TAG_VERSION%
Claudio Valerio's avatar
Claudio Valerio committed
58 59 60 61 62

REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR

nmake release-install

63 64

copy %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm build\win32\release\product\i18n\
65 66
copy resources\customizations build\win32\release\product\

67 68
del build\win32\release\product\i18n\qt_help*

Claudio Valerio's avatar
Claudio Valerio committed
69 70 71 72 73 74
del ".\build\win32\release\product\Sankore.pdb"

set INSTALLER_NAME=Open-Sankore

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

75
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
Claudio Valerio's avatar
Claudio Valerio committed
76 77 78

:EXIT_WITH_ERROR
	echo ERROR