windows installer build script:

+ added batch file to create revision.inc, so that svnrevisioninc doesn't need to build before the export
* use different naming schemes for snapshot and release build

git-svn-id: trunk@32140 -
This commit is contained in:
vincents 2011-09-01 11:41:44 +00:00
parent 55f3a736d6
commit 3f9a1eba05
5 changed files with 24 additions and 3 deletions

1
.gitattributes vendored
View File

@ -6061,6 +6061,7 @@ tools/install/win/lazarus-cross.iss svneol=native#text/plain
tools/install/win/lazarus_install_cheetah.bmp -text svneol=unset#image/bmp
tools/install/win/lazarus_install_cheetah_small.bmp -text svneol=unset#image/bmp
tools/install/win/readme.txt svneol=native#text/plain
tools/install/win/svn2revisioninc.bat svneol=native#text/x-msdos-program
tools/jsonviewer/README.txt svneol=native#text/plain
tools/jsonviewer/frmmain.lfm svneol=native#text/plain
tools/jsonviewer/frmmain.pp svneol=native#text/plain

View File

@ -138,6 +138,10 @@ del %INSTALL_BINDIR%\fpc.cfg
%OLDCURDRIVE%
cd %OLDCURDIR%
FOR /F "delims='" %%F IN (%LAZSVNDIR%\ide\version.inc) DO set LAZVERSION=%%F
SET OutputFileName=lazarus-%LAZVERSION%-fpc-%FPCFULLVERSION%-cross-%FPCFULLTARGET%-%FPCSourceOS%
if [%BUILDLAZRELEASE%]==[] SET OutputFileName=lazarus-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-cross-%FPCFULLTARGET%-%FPCSourceOS%
%ISCC% lazarus-cross.iss
:CLEANUP

View File

@ -72,7 +72,7 @@ SET PATH=%FPCBINDIR%
:: copy lazarus dir
rmdir /s /q %BUILDDIR%
%SVN% export %LAZSVNDIR% %BUILDDIR% >> %LOGFILE%
..\..\svn2revisioninc %LAZSVNDIR% %BUILDDIR%\ide\revision.inc
call svn2revisioninc.bat %LAZSVNDIR% %BUILDDIR%\ide\revision.inc
call build-fpc.bat
@ -100,8 +100,16 @@ if not exist %BUILDDIR%\startlazarus.exe goto END
if exist %GDBDIR% %SVN% export %GDBDIR% %BUILDDIR%\mingw
:: create the installer
IF [%BUILDLAZRELEASE%]==[] GOTO SNAPSHOT
SET OutputFileName=lazarus-%LAZVERSION%-fpc-%FPCFULLVERSION%-%FPCTARGETOS%
if not [%IDE_WIDGETSET%]==[win32] SET OutputFileName=lazarus-%IDE_WIDGETSET%-%LAZVERSION%-fpc-%FPCFULLVERSION%-%FPCTARGETOS%
GOTO GO_ON
:SNAPSHOT
SET OutputFileName=lazarus-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-%FPCTARGETOS%
if not [%IDE_WIDGETSET%]==[win32] SET OutputFileName=lazarus-%IDE_WIDGETSET%-%LAZVERSION%-%LAZREVISION%-fpc-%FPCFULLVERSION%-%DATESTAMP%-%FPCTARGETOS%
:GO_ON
%ISCC% lazarus.iss >> installer.log
:: do not delete build dir, if installer failed.

View File

@ -2,7 +2,6 @@
EnableISX=true
[Defines]
#define AppVersion GetEnv('LazVersion')
#define LazRevision GetEnv('LazRevision')
// LazVersion may be 0.9.30.2RC1
// A valid file version contains only digits, so drop the RC part
#if pos('RC',AppVersion)>0
@ -10,6 +9,7 @@ EnableISX=true
#else
#define FileVersion = AppVersion
#endif
#define LazRevision GetEnv('LazRevision')
#define FPCVersion GetEnv('FPCVersion')
#define FPCFullVersion GetEnv('FPCFullVersion')
#define FPCSourceOS GetEnv('FPCSourceOS')
@ -18,6 +18,7 @@ EnableISX=true
#define AppName "Lazarus"
#define SetupDate GetEnv('DateStamp')
#define BuildDir GetEnv('BuildDir')
#define OutputFileName GetEnv('OutputFileName')
[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
@ -29,7 +30,7 @@ ArchitecturesInstallIn64BitMode=x64
DefaultDirName={code:GetDefDir|c:\lazarus}
DefaultGroupName={#AppName}
InternalCompressLevel=ultra
OutputBaseFilename={#AppName}-{#AppVersion}-{#LazRevision}-fpc-{#FPCFullVersion}-{#SetupDate}-cross-{#FPCFullTarget}-{#FPCSourceOS}
OutputBaseFilename={#OutputFileName}
SolidCompression=true
VersionInfoVersion={#FileVersion}
VersionInfoTextVersion={#AppVersion}-{#SetupDate}

View File

@ -0,0 +1,7 @@
%SVN% info %1 | %windir%\system32\find "Last Changed Rev:" > svninfo.txt
set /P SVNINFO=<svninfo.txt
echo const RevisionStr = '%SVNINFO:~18%'; > %2