From 14b9d0eadc5b5b0939e349b67311807ff31fea22 Mon Sep 17 00:00:00 2001 From: mattias Date: Fri, 15 Sep 2006 17:59:31 +0000 Subject: [PATCH] project version info: added default values while saving git-svn-id: trunk@9909 - --- examples/widestringstreaming/mainunit.pas | 20 +++++++++++ .../widestringstreaming.lpi | 19 +++++++++++ examples/xmlstreaming/streamasxmldemo.lpi | 23 ++----------- ide/project.pp | 34 +++++++++---------- 4 files changed, 58 insertions(+), 38 deletions(-) diff --git a/examples/widestringstreaming/mainunit.pas b/examples/widestringstreaming/mainunit.pas index 0fbbd51a7e..451aa87a90 100644 --- a/examples/widestringstreaming/mainunit.pas +++ b/examples/widestringstreaming/mainunit.pas @@ -1,3 +1,23 @@ +{ + *************************************************************************** + * * + * This source is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This code is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * General Public License for more details. * + * * + * A copy of the GNU General Public License is available on the World * + * Wide Web at . You can also * + * obtain it by writing to the Free Software Foundation, * + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * * + *************************************************************************** +} unit MainUnit; {$mode objfpc}{$H+} diff --git a/examples/widestringstreaming/widestringstreaming.lpi b/examples/widestringstreaming/widestringstreaming.lpi index aa8a71bd14..d6aab418b0 100644 --- a/examples/widestringstreaming/widestringstreaming.lpi +++ b/examples/widestringstreaming/widestringstreaming.lpi @@ -10,6 +10,25 @@ </General> + <VersionInfo> + <UseVersionInfo Value="False"/> + <AutoIncrementBuild Value="False"/> + <CurrentVersionNr Value="0"/> + <CurrentMajorRevNr Value="0"/> + <CurrentMinorRevNr Value="0"/> + <CurrentBuildNr Value="0"/> + <ProjectVersion Value="1.0.0.0"/> + <Language Value="0409"/> + <CharSet Value="04E4"/> + <Comments Value=""/> + <CompanyName Value=""/> + <FileDescription Value=""/> + <InternalName Value=""/> + <LegalCopyright Value=""/> + <LegalTrademarks Value=""/> + <OriginalFilename Value=""/> + <ProductName Value=""/> + </VersionInfo> <PublishOptions> <Version Value="2"/> <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> diff --git a/examples/xmlstreaming/streamasxmldemo.lpi b/examples/xmlstreaming/streamasxmldemo.lpi index effe5c5282..ede01ca867 100644 --- a/examples/xmlstreaming/streamasxmldemo.lpi +++ b/examples/xmlstreaming/streamasxmldemo.lpi @@ -9,25 +9,6 @@ <IconPath Value="./"/> <TargetFileExt Value=""/> </General> - <VersionInfo> - <UseVersionInfo Value="False"/> - <AutoIncrementBuild Value="False"/> - <CurrentVersionNr Value="0"/> - <CurrentMajorRevNr Value="0"/> - <CurrentMinorRevNr Value="0"/> - <CurrentBuildNr Value="0"/> - <ProjectVersion Value="1.0.0.0"/> - <Language Value="0409"/> - <CharSet Value="04E4"/> - <Comments Value=""/> - <CompanyName Value=""/> - <FileDescription Value=""/> - <InternalName Value=""/> - <LegalCopyright Value=""/> - <LegalTrademarks Value=""/> - <OriginalFilename Value=""/> - <ProductName Value=""/> - </VersionInfo> <PublishOptions> <Version Value="2"/> <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> @@ -41,10 +22,10 @@ </RunParams> <RequiredPackages Count="2"> <Item1> - <PackageName Value="CodeTools"/> + <PackageName Value="LCL"/> </Item1> <Item2> - <PackageName Value="LCL"/> + <PackageName Value="CodeTools"/> </Item2> </RequiredPackages> <Units Count="2"> diff --git a/ide/project.pp b/ide/project.pp index 953284c9f4..d46a498dc6 100644 --- a/ide/project.pp +++ b/ide/project.pp @@ -1646,23 +1646,23 @@ begin xmlconfig.SetDeleteValue(Path+'LazDoc/Paths', LazDocPaths, ''); // VersionInfo - xmlconfig.SetValue(Path+'VersionInfo/UseVersionInfo/Value', VersionInfo.UseVersionInfo); - xmlconfig.SetValue(Path+'VersionInfo/AutoIncrementBuild/Value', VersionInfo.AutoIncrementBuild); - xmlconfig.SetValue(Path+'VersionInfo/CurrentVersionNr/Value', VersionInfo.VersionNr); - xmlconfig.SetValue(Path+'VersionInfo/CurrentMajorRevNr/Value', VersionInfo.MajorRevNr); - xmlconfig.SetValue(Path+'VersionInfo/CurrentMinorRevNr/Value', VersionInfo.MinorRevNr); - xmlconfig.SetValue(Path+'VersionInfo/CurrentBuildNr/Value', VersionInfo.BuildNr); - xmlconfig.SetValue(Path+'VersionInfo/ProjectVersion/Value', VersionInfo.ProductVersionString); - xmlconfig.SetValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang); - xmlconfig.SetValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet); - xmlconfig.SetValue(Path+'VersionInfo/Comments/Value', VersionInfo.CommentsString); - xmlconfig.SetValue(Path+'VersionInfo/CompanyName/Value', VersionInfo.CompanyString); - xmlconfig.SetValue(Path+'VersionInfo/FileDescription/Value', VersionInfo.DescriptionString); - xmlconfig.SetValue(Path+'VersionInfo/InternalName/Value', VersionInfo.InternalNameString); - xmlconfig.SetValue(Path+'VersionInfo/LegalCopyright/Value', VersionInfo.CopyrightString); - xmlconfig.SetValue(Path+'VersionInfo/LegalTrademarks/Value', VersionInfo.TrademarksString); - xmlconfig.SetValue(Path+'VersionInfo/OriginalFilename/Value', VersionInfo.OriginalFilenameString); - xmlconfig.SetValue(Path+'VersionInfo/ProductName/Value', VersionInfo.ProdNameString); + xmlconfig.SetDeleteValue(Path+'VersionInfo/UseVersionInfo/Value', VersionInfo.UseVersionInfo,false); + xmlconfig.SetDeleteValue(Path+'VersionInfo/AutoIncrementBuild/Value', VersionInfo.AutoIncrementBuild,false); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CurrentVersionNr/Value', VersionInfo.VersionNr,0); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CurrentMajorRevNr/Value', VersionInfo.MajorRevNr,0); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CurrentMinorRevNr/Value', VersionInfo.MinorRevNr,0); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CurrentBuildNr/Value', VersionInfo.BuildNr,0); + xmlconfig.SetDeleteValue(Path+'VersionInfo/ProjectVersion/Value', VersionInfo.ProductVersionString,'1.0.0.0'); + xmlconfig.SetDeleteValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang,'0409'); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet,'04E4'); + xmlconfig.SetDeleteValue(Path+'VersionInfo/Comments/Value', VersionInfo.CommentsString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/CompanyName/Value', VersionInfo.CompanyString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/FileDescription/Value', VersionInfo.DescriptionString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/InternalName/Value', VersionInfo.InternalNameString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/LegalCopyright/Value', VersionInfo.CopyrightString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/LegalTrademarks/Value', VersionInfo.TrademarksString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/OriginalFilename/Value', VersionInfo.OriginalFilenameString,''); + xmlconfig.SetDeleteValue(Path+'VersionInfo/ProductName/Value', VersionInfo.ProdNameString,''); // Save the compiler options CompilerOptions.SaveToXMLConfig(XMLConfig,'CompilerOptions/');