mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:59:14 +02:00
parent
20448170ae
commit
9581fe6649
@ -114,6 +114,7 @@ const
|
|||||||
'lrs',
|
'lrs',
|
||||||
'res'
|
'res'
|
||||||
);
|
);
|
||||||
|
|
||||||
function StrToResourceType(const s: string): TResourceType;
|
function StrToResourceType(const s: string): TResourceType;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -493,8 +494,8 @@ begin
|
|||||||
SetDeleteValue(Path+'VersionInfo/CurrentMinorRevNr/Value', VersionInfo.MinorRevNr,0);
|
SetDeleteValue(Path+'VersionInfo/CurrentMinorRevNr/Value', VersionInfo.MinorRevNr,0);
|
||||||
SetDeleteValue(Path+'VersionInfo/CurrentBuildNr/Value', VersionInfo.BuildNr,0);
|
SetDeleteValue(Path+'VersionInfo/CurrentBuildNr/Value', VersionInfo.BuildNr,0);
|
||||||
SetDeleteValue(Path+'VersionInfo/ProjectVersion/Value', VersionInfo.ProductVersionString,'1.0.0.0');
|
SetDeleteValue(Path+'VersionInfo/ProjectVersion/Value', VersionInfo.ProductVersionString,'1.0.0.0');
|
||||||
SetDeleteValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang,'0409');
|
SetDeleteValue(Path+'VersionInfo/Language/Value', VersionInfo.HexLang,DefaultLanguage);
|
||||||
SetDeleteValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet,'04E4');
|
SetDeleteValue(Path+'VersionInfo/CharSet/Value', VersionInfo.HexCharSet,DefaultCharset);
|
||||||
SetDeleteValue(Path+'VersionInfo/Comments/Value', VersionInfo.CommentsString,'');
|
SetDeleteValue(Path+'VersionInfo/Comments/Value', VersionInfo.CommentsString,'');
|
||||||
SetDeleteValue(Path+'VersionInfo/CompanyName/Value', VersionInfo.CompanyString,'');
|
SetDeleteValue(Path+'VersionInfo/CompanyName/Value', VersionInfo.CompanyString,'');
|
||||||
SetDeleteValue(Path+'VersionInfo/FileDescription/Value', VersionInfo.DescriptionString,'');
|
SetDeleteValue(Path+'VersionInfo/FileDescription/Value', VersionInfo.DescriptionString,'');
|
||||||
@ -523,8 +524,8 @@ begin
|
|||||||
VersionInfo.MinorRevNr := GetValue(Path+'VersionInfo/CurrentMinorRevNr/Value', 0);
|
VersionInfo.MinorRevNr := GetValue(Path+'VersionInfo/CurrentMinorRevNr/Value', 0);
|
||||||
VersionInfo.BuildNr := GetValue(Path+'VersionInfo/CurrentBuildNr/Value', 0);
|
VersionInfo.BuildNr := GetValue(Path+'VersionInfo/CurrentBuildNr/Value', 0);
|
||||||
VersionInfo.ProductVersionString := GetValue(Path+'VersionInfo/ProjectVersion/Value', '1.0.0.0');
|
VersionInfo.ProductVersionString := GetValue(Path+'VersionInfo/ProjectVersion/Value', '1.0.0.0');
|
||||||
VersionInfo.HexLang := GetValue(Path+'VersionInfo/Language/Value', '0409');
|
VersionInfo.HexLang := GetValue(Path+'VersionInfo/Language/Value', DefaultLanguage);
|
||||||
VersionInfo.HexCharSet := GetValue(Path+'VersionInfo/CharSet/Value', '04E4');
|
VersionInfo.HexCharSet := GetValue(Path+'VersionInfo/CharSet/Value', DefaultCharset);
|
||||||
VersionInfo.CommentsString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/Comments/Value', ''));
|
VersionInfo.CommentsString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/Comments/Value', ''));
|
||||||
VersionInfo.CompanyString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/CompanyName/Value', ''));
|
VersionInfo.CompanyString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/CompanyName/Value', ''));
|
||||||
VersionInfo.DescriptionString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/FileDescription/Value', ''));
|
VersionInfo.DescriptionString := LineBreaksToSystemLineBreaks(GetValue(Path+'VersionInfo/FileDescription/Value', ''));
|
||||||
|
@ -116,6 +116,10 @@ function MSHexLanguages: TStringList;
|
|||||||
function MSCharacterSets: TStringList;
|
function MSCharacterSets: TStringList;
|
||||||
function MSHexCharacterSets: TStringList;
|
function MSHexCharacterSets: TStringList;
|
||||||
|
|
||||||
|
const
|
||||||
|
DefaultLanguage = '0409';
|
||||||
|
DefaultCharSet = '04E4';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -275,6 +279,8 @@ var
|
|||||||
ARes: TVersionResource;
|
ARes: TVersionResource;
|
||||||
st: TVersionStringTable;
|
st: TVersionStringTable;
|
||||||
ti: TVerTranslationInfo;
|
ti: TVerTranslationInfo;
|
||||||
|
lang: String;
|
||||||
|
charset: String;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := True;
|
||||||
if UseVersionInfo then
|
if UseVersionInfo then
|
||||||
@ -284,7 +290,12 @@ begin
|
|||||||
ARes.FixedInfo.FileVersion := FVersion;
|
ARes.FixedInfo.FileVersion := FVersion;
|
||||||
ARes.FixedInfo.ProductVersion := ExtractProductVersion;
|
ARes.FixedInfo.ProductVersion := ExtractProductVersion;
|
||||||
|
|
||||||
st := TVersionStringTable.Create(HexLang + HexCharSet);
|
lang:=HexLang;
|
||||||
|
if lang='' then lang:=DefaultLanguage;
|
||||||
|
charset:=HexCharSet;
|
||||||
|
if charset='' then charset:=DefaultCharSet;
|
||||||
|
|
||||||
|
st := TVersionStringTable.Create(lang + charset);
|
||||||
st.Add('Comments', Utf8ToAnsi(CommentsString));
|
st.Add('Comments', Utf8ToAnsi(CommentsString));
|
||||||
st.Add('CompanyName', Utf8ToAnsi(CompanyString));
|
st.Add('CompanyName', Utf8ToAnsi(CompanyString));
|
||||||
st.Add('FileDescription', Utf8ToAnsi(DescriptionString));
|
st.Add('FileDescription', Utf8ToAnsi(DescriptionString));
|
||||||
@ -297,8 +308,8 @@ begin
|
|||||||
st.Add('ProductVersion', StringReplace(Utf8ToAnsi(ProductVersionString), ',', '.', [rfReplaceAll]));
|
st.Add('ProductVersion', StringReplace(Utf8ToAnsi(ProductVersionString), ',', '.', [rfReplaceAll]));
|
||||||
ARes.StringFileInfo.Add(st);
|
ARes.StringFileInfo.Add(st);
|
||||||
|
|
||||||
ti.language := StrToInt('$'+HexLang);
|
ti.language := StrToInt('$'+lang);
|
||||||
ti.codepage := StrToInt('$'+HexCharSet);
|
ti.codepage := StrToInt('$'+charset);
|
||||||
ARes.VarFileInfo.Add(ti);
|
ARes.VarFileInfo.Add(ti);
|
||||||
AResources.AddSystemResource(ARes);
|
AResources.AddSystemResource(ARes);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user