rem rem G N O K I I rem rem A Linux/Unix toolset and driver for the mobile phones. rem rem This file is part of gnokii. rem rem Gnokii 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 2 of the License, or rem (at your option) any later version. rem rem Gnokii 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 gnokii; if not, write to the Free Software rem Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA rem rem Copyright (C) 2006-2008 Jari Turkia rem rem Nightly build script. rem rem gnokii.dll rem Build log was saved at "file://d:\temp\gnokii-0.6.14\win32\MSVS2005\Release\BuildLog.htm" rem gnokii.exe rem Build log was saved at "file://d:\temp\gnokii-0.6.14\win32\MSVS2005\Release\BuildLog.htm" set SOURCEDIR=D:\Development\Gnokii\CVS set BUILDDIR=D:\temp set CYGWINDIR=D:\Cygwin\bin set include=%include%;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include;%BUILDDIR%\gnokii\include set lib=%lib%;C:\Program Files\SQLXML 4.0\bin\;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib set PATH=%PATH%;%CYGWINDIR% rem MSbuild rem set MSBuildEmitSolution=1 set FTPHOST="-missing" set FTPUSER="-missing-" set FTPPASSWORD="-missing-" set FTPDIR="-missing" set FTPURL="ftp://%FTPUSER%:%FTPPASSWORD%@%FTPHOST%/%FTPDIR%" set VERSION=unknown set REVISION=%date:~9,4%%date:~6,2%%date:~3,2% rem rem Start rem call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86 D: cd %SOURCEDIR%\gnokii %CYGWINDIR%\cvs update -CPdA set M4MACROS=define(`AC_INIT', `divert(0)$2divert(-1)')divert(`-1') rem Old rem for /F %%i IN (D:\Development\Gnokii\CVS\gnokii\VERSION) DO set VERSION=%%i echo %M4MACROS% | %CYGWINDIR%\m4 - configure.in | %CYGWINDIR%\sed -e "s/\[//" | %CYGWINDIR%\sed -e "s/]//" > VERSION for /F %%i IN (VERSION) DO set VERSION=%%i echo Version: %VERSION%-%REVISION% del /q /s /f %BUILDDIR%\gnokii-%VERSION% > nul rd /q /s %BUILDDIR%\gnokii-%VERSION% > nul cd .. md %BUILDDIR%\gnokii-%VERSION% xcopy /s gnokii %BUILDDIR%\gnokii-%VERSION% > nul cd %BUILDDIR% cd gnokii-%VERSION%\win32 call gen_gnokii_h.bat cd %BUILDDIR% %CYGWINDIR%\zip -9r %TEMP%\gnokii-%VERSION%-%REVISION%.src.zip gnokii-%VERSION%/* cd gnokii-%VERSION%\win32\MSVS2005 vcbuild /useenv gnokii.sln "Release|Win32" if errorlevel 1 goto build_failure echo Build Success! cd release %CYGWINDIR%\zip -9 %TEMP%\gnokii-%VERSION%-%REVISION%.zip gnokii.exe gnokii.dll copy %BUILDDIR%\gnokii-%VERSION%\win32\MSVS2005\Release\BuildLog.htm %TEMP%\BuildLog-%VERSION%-%REVISION%.html > nul %SystemDrive% echo Simple regression testing... echo [global] > %TEMP%\gnokiirc.fake echo port = foobar >> %TEMP%\gnokiirc.fake echo model = fake >> %TEMP%\gnokiirc.fake echo connection = serial >> %TEMP%\gnokiirc.fake %BUILDDIR%\gnokii-%VERSION%\win32\MSVS2005\release\gnokii --config %TEMP%\gnokiirc.fake --identify > %TEMP%\gnokii.regression.out if errorlevel 1 goto build_failure echo Clean up.. cd %TEMP% del /q /s /f %BUILDDIR%\gnokii-%VERSION% > nul del /q /s /f %TEMP%\gnokii.regression.out > nul rd /q /s %BUILDDIR%\gnokii-%VERSION% > nul echo Transferring... echo cd %FTPDIR% > ftp.sess.txt echo del * >> ftp.sess.txt echo put gnokii-%VERSION%-%REVISION%.zip >> ftp.sess.txt echo put gnokii-%VERSION%-%REVISION%.src.zip >> ftp.sess.txt echo bin >> ftp.sess.txt echo put BuildLog-%VERSION%-%REVISION%.html >> ftp.sess.txt %CYGWINDIR%\ncftp %FTPURL% < ftp.sess.txt if errorlevel 1 goto general_failure echo Transfer success! del gnokii-%VERSION%-%REVISION%.zip del gnokii-%VERSION%-%REVISION%.src.zip del ftp.sess.txt del BuildLog-%VERSION%-%REVISION%.html goto ende :build_failure echo Build failed. copy %BUILDDIR%\gnokii-%VERSION%\win32\MSVS2005\Release\BuildLog.htm %TEMP%\BuildLog-%VERSION%-%REVISION%.html > nul %SystemDrive% cd %TEMP% del /q /s /f %BUILDDIR%\gnokii-%VERSION% > nul rd /q /s %BUILDDIR%\gnokii-%VERSION% > nul echo Transferring... echo cd %FTPDIR% > ftp.sess.txt echo bin >> ftp.sess.txt echo del BuildLog-* >> ftp.sess.txt echo put BuildLog-%VERSION%-%REVISION%.html >> ftp.sess.txt echo del gnokii.regression.out >> ftp.sess.txt echo put gnokii.regression.out >> ftp.sess.txt %CYGWINDIR%\ncftp %FTPURL% < ftp.sess.txt if errorlevel 1 goto general_failure echo Transfer success! rem del gnokii-%VERSION%-%REVISION%.src.zip del ftp.sess.txt del BuildLog-%VERSION%-%REVISION%.html goto ende :general_failure echo Failed generally. :ende