project version info: added default values while saving

git-svn-id: trunk@9909 -
This commit is contained in:
mattias 2006-09-15 17:59:31 +00:00
parent 1fc24bdcc9
commit 14b9d0eadc
4 changed files with 58 additions and 38 deletions

View File

@ -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 <http://www.gnu.org/copyleft/gpl.html>. 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+}

View File

@ -10,6 +10,25 @@
<TargetFileExt Value=""/>
<Title Value="componentstreaming"/>
</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)"/>

View File

@ -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">

View File

@ -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/');